M
MCP Server Agent Coding
作者 @JMaaa32
@_@ C++ MCP Server 框架&多 Agent Coding 系统
创建于 3/23/2026
更新于 about 3 hours ago
README
Repository documentation and setup instructions
MCP Coding Agent
基于自研 C++ MCP Server 的多 Agent 代码助手系统。
架构
Python Agent(LangGraph) → HTTP JSON-RPC → C++ MCP Server(13 个工具)
Coder → Reviewer → Tester 沙箱执行 / 代码搜索 / 复杂度分析 ...
- LLM:API(DeepSeek / OpenAI 等)+ Ollama 本地模型,可灵活切换
- 编排:LangGraph 状态图,条件路由,最多 3 轮迭代
- 工具:read/write_file、execute_code、run_tests、code_search、git_diff、analyze_code 等 13 个
- 安全:命令白名单 + 引号感知危险符号过滤 + 路径沙箱
- 数据:自动收集轨迹,导出 SFT / DPO 训练数据
快速开始
1. 编译 MCP Server
cmake -B build && cmake --build build -j4
2. 启动 Server
./build/src/mcp_server --config config/server.json --port 8089
3. 安装 Python 依赖
pip install -r agent/requirements.txt
4. 配置 DeepSeek API Key
export DEEPSEEK_API_KEY=your_key_here
5. 运行 Agent
# 单次任务
python3 agent/main.py "在 workspace/ 下创建 is_palindrome 函数,写单测,确保通过"
# 持续对话
python3 agent/main.py --chat
# 开启 SSE 实时监控(浏览器访问 http://localhost:8765)
python3 agent/main.py --chat --sse
目录结构
agent/ Python Agent 层(LangGraph 编排)
src/ C++ MCP Server 源码
workspace/ Agent 文件沙箱
trajectories/ 轨迹数据输出
docs/plan/ 项目文档(规划 / 排错 / 面试准备)
config/ Server 配置
快速设置
此服务器的安装指南
安装命令 (包未发布)
git clone https://github.com/JMaaa32/MCP-Server-Agent-Coding-
手动安装: 请查看 README 获取详细的设置说明和所需的其他依赖项。
Cursor 配置 (mcp.json)
{
"mcpServers": {
"jmaaa32-mcp-server-agent-coding": {
"command": "git",
"args": [
"clone",
"https://github.com/JMaaa32/MCP-Server-Agent-Coding-"
]
}
}
}