AI Master Control Program (MCP) Server

AI Master Control Program (MCP) Server

site icon
2025.04.07 0
PythonAI模型交互系统控制文件操作开发效率
AI Master Control Program (MCP) Server 是一个桥梁服务,允许AI模型(包括本地托管的Ollama和Claude Desktop模型)与计算机系统进行交互。它提供了执行系统命令、文件操作、程序控制以及模型间通信的能力。
View on GitHub

Overview

基本能力

产品定位

AI MCP Server 是一个桥梁服务,允许AI模型与计算机系统进行交互,执行系统操作和程序控制。

核心功能

  • 执行系统命令
  • 创建、读取、更新和删除文件
  • 控制其他程序
  • 模型间通信

适用场景

  • AI模型需要与本地系统交互的场景
  • 自动化任务执行
  • 文件操作和管理
  • 程序控制和监控

工具列表

  1. MCP Server: 中央服务器,处理来自AI模型的请求
  2. Client Library: 提供与AI模型集成的客户端库
  3. Model Connectors: 与各种AI模型后端(如Ollama、Claude Desktop)的接口
  4. Task Execution Engine: 执行系统操作和程序控制

常见问题解答

  1. Claude Desktop连接问题: 确保Claude Desktop正在运行,并验证API URL
  2. Ollama连接问题: 确保Ollama正在运行,并验证模型是否存在

使用教程

使用依赖

安装教程

自动化安装

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
cd master_mcp_server
pip install -r requirements.txt
cp .env.example .env

调试方式

启动服务器

  • Windows: 运行 start_mcp_server.bat
  • Linux/Mac: 运行 ./start_mcp_server.sh

手动启动

python startup.py

连接AI模型

from mcp_client import MCPClient
client = MCPClient("http://localhost:8000", "your-secret-api-key")
result = client.connect_model("claude-desktop", "claude", {"api_url": "http://localhost:5000/api"})
print(f"Connection result: {result}")

许可证

该项目遵循 MIT 开源许可条款。