mcp-eval
MCP Agent Evaluation Harness
一个精简的参考项目,用于评估使用 Model Context Protocol 工具的编码智能体。该评测框架为智能体提供受控的仓库访问,运行可重复执行的检查,对比多次执行的结果,并返回结构化的验证报告。
项目演示内容
一个提供仓库列表、读取、搜索和验证工具的 MCP 服务器
限制在根目录内的文件访问,并具备路径穿越防护
在固定 locale、时区和 Python 哈希种子下执行确定性命令
必需与禁止的代码模式检查
重复运行对比,用于检测不确定性
为可复现的 bug 修复任务提供黄金参考材料
标准库单元测试和持续集成工作流
Related MCP server: mcp-software-engineering-challenge
架构
MCP client or coding agent
|
v
Repository MCP tools
|
v
SafeWorkspace boundary
|
v
DeterministicVerifier
|
v
Structured VerificationReport核心验证器没有任何第三方依赖。MCP 适配器使用官方 Python SDK v2。
快速开始
运行单元测试。
python -m unittest discover -s tests -v运行内置的评估任务。
PYTHONPATH=src python -m mcp_eval_harness.cli verify \
examples/rounding-bug/task.json \
examples/rounding-bug/workspace安装 MCP 适配器并启动 stdio 服务器。
python -m pip install -e ".[mcp]"
mcp-eval serveMCP 工具
工具 | 用途 |
| 在配置的根目录下返回稳定且有序的文件列表 |
| 读取单个 UTF-8 文件并阻止路径穿越 |
| 按确定性顺序和固定结果数量查找字面文本 |
| 运行任务规范并返回结构化验证报告 |
任务规范
每个任务都是一个 JSON,声明了文件、代码要求、验证命令、超时时间和重复次数。
{
"task_id": "decimal-rounding-fix",
"required_files": ["calculator.py", "test_calculator.py"],
"required_patterns": {"calculator.py": ["Decimal", "ROUND_HALF_UP"]},
"forbidden_patterns": {"calculator.py": ["round("]},
"command": ["python", "-m", "unittest", "discover", "-s", ".", "-p", "test_*.py"],
"timeout_seconds": 10,
"repeat_count": 2
}安全边界
路径检查保护配置的仓库根目录。命令验证器是为受信任的本地任务定义而设计的。请在容器或其他操作系统沙箱中运行不可信的候选代码。
作者
Mohammed Ibrahim Sadiq
许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Paid deterministic data-quality and execution-verification tools for AI agents.
Repository evidence for agents before they adopt dependencies, enter codebases, compare, or merge.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
QA platform for agents: coverage signals, in-repo test plans, verified tests and release governance.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables reproducible evaluation of AI coding agents by exposing repository inspection, code editing, test running, and deterministic verification through MCP tools.-
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to safely inspect, edit, and test code within a bounded repository environment to solve software engineering tasks and verify fixes.-
- FlicenseNot gradedqualityCmaintenanceEnables deterministic, sandboxed evaluation and RL training of software engineering agents via MCP, providing repository and terminal tools, failure classification, and live dashboards.-
- AlicenseNot gradedqualityBmaintenanceProvides bounded MCP tools for AI agents to inspect, write, verify, and diff files in a sandboxed repository, requiring human approval and logging an audit trail.MIT