MCP Software-Engineering RL Environment
MCP 软件工程强化学习(RL)环境(迷你项目)
一个可复现的基准测试环境,用于通过 Model Context Protocol(MCP)评估 AI 编程智能体。
智能体接收任务,通过 MCP 工具发现仓库信息、编辑代码,并运行确定性验证。基准测试会记录智能体是否正确使用了工具,以及最终仓库是否满足规范。
场景
该仓库包含一个简单的库存服务。InventoryService.search() 故意存在一个 bug:当一个产品有多个匹配标签时,它可能在结果中出现多次。智能体必须诊断这个 bug,实现一个不破坏现有功能的修复,并添加一个回归测试。
Related MCP server: Coding Tools MCP
环境约定
智能体可以使用以下 MCP 工具:
list_files()- 查看仓库结构read_file(path)- 读取仓库文件search_code(query)- 搜索源代码write_file(path, content)- 修改/创建文件run_tests()- 运行确定性测试git_diff()- 查看变更
环境本身通过 verify.py 验证结果。参考解决方案单独存储在 golden/solution.patch 中。
运行
python -m venv .venv
# Linux/macOS
source .venv/bin/activate
# Windows PowerShell: .venv\\Scripts\\Activate.ps1
pip install -r requirements.txt
python -m mcp_rl_env.server在另一个终端中:
python verify.py运行参考解决方案:
python apply_golden.py
python verify.py评估基准思路
一次评估回合的流程是:
将仓库重置到任务种子状态。
只给智能体提供任务说明。
启动 MCP 服务器。
智能体用 MCP 发现文件。
智能体诊断并修改代码。
智能体运行测试。
确定性验证器计算奖励。
一个简单的奖励可以设计为:
reward = 0.50 * tests + 0.20 * regression_test + 0.15 * tool_use + 0.15 * patch_quality
关键在于验证是确定性的,模型不会做自我评分。
This server cannot be deployed
Maintenance
Related MCP Connectors
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
1Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
AlicenseAqualityAmaintenanceMCP server that gives AI coding agents direct access to evaluation tools.2322 PyPIApache 2.0- AlicenseNot gradedqualityBmaintenanceEmpower any MCP-compatible AI Agent(MCP Client) with engineering-grade capabilities to understand, modify, run, and deliver real-world code repositories.208 PyPI1,216Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables deterministic evaluation of coding agents by exposing controlled repository tools and returning structured verification reports with pattern checks and repeat-run comparisons.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to access unified development tools including code generation, documentation synchronization, test case rendering, and architecture graph queries through a single MCP server.-