AI MCP 服务器为 AI 模型(包含本地运行的模型,如 Ollama 和 Claude Desktop)搭建了与计算机系统交互的桥梁。借助该服务器,AI 模型能够执行系统命令、进行文件操作、控制其他程序以及与其他程序通信。
AI MCP 服务器让 AI 模型能与计算机系统交互。它作为中间桥梁,支持多种操作,如执行系统命令、文件操作、程序控制和通信等。
为实现快速便捷安装,可使用提供的安装脚本:
# 克隆仓库
git clone https://github.com/GrizzFuOnYou/master_mcp_server.git
cd master_mcp_server
# 运行安装脚本
python install.py
安装脚本会完成以下操作:
若需手动安装,可按以下步骤操作:
git clone https://github.com/GrizzFuOnYou/master_mcp_server.git
| 接口路径 | 请求方式 | 描述 |
|---|---|---|
/connect_model |
POST | 连接 AI 模型 |
/disconnect_model/{model_id} |
POST | 断开与 AI 模型的连接 |
/list_models |
GET | 列出所有已连接的模型 |
/execute_task |
POST | 执行由 AI 模型请求的任务 |
/task_status/{task_id} |
GET | 获取任务状态 |
| 方法 | 描述 |
|---|---|
connect_model(model_id, model_type, config) |
连接 AI 模型 |
disconnect_model(model_id) |
断开与 AI 模型的连接 |
list_models() |
列出所有已连接的模型 |
execute_system_command(model_id, command, args, working_dir, timeout) |
执行系统命令 |
execute_file_operation(model_id, operation, path, content) |
执行文件操作 |
control_program(model_id, action, program_path, args, pid) |
控制程序 |
query_model(model_id, target_model, prompt) |
查询 AI 模型 |
要连接到 Claude Desktop,请使用以下配置:
{
"api_url": "http://localhost:5000/api",
"temperature": 0.7,
"max_tokens": 1000
}
要连接到 Ollama 模型,请使用以下配置:
{
"host": "http://localhost:11434"
}
该系统由以下部分组成:
⚠️ 重要提示
此服务器授予 AI 模型对您系统的大量访问权限,请谨慎使用。
实施的安全措施包括:
若遇到连接到 Claude Desktop 的问题,可按以下步骤排查:
http://localhost:5000/api)。若遇到连接到 Ollama 的问题,可按以下步骤排查:
ollama serve)。ollama list)。http://localhost:11434)。ollama pull modelname)。MCP 服务器可扩展以下功能:
请查看项目的许可证文件,以了解使用和分发的条款。
如果您希望为该项目做出贡献,请参考贡献者指南文档。
如需联系项目维护人员,请发送邮件至 project.contact@example.com。