Skip to main content
Glama
Philippe012

MCP Software-Engineering RL Environment

by Philippe012

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

评估基准思路

一次评估回合的流程是:

  1. 将仓库重置到任务种子状态。

  2. 只给智能体提供任务说明。

  3. 启动 MCP 服务器。

  4. 智能体用 MCP 发现文件。

  5. 智能体诊断并修改代码。

  6. 智能体运行测试。

  7. 确定性验证器计算奖励。

一个简单的奖励可以设计为:

reward = 0.50 * tests + 0.20 * regression_test + 0.15 * tool_use + 0.15 * patch_quality

关键在于验证是确定性的,模型不会做自我评分。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Empower any MCP-compatible AI Agent(MCP Client) with engineering-grade capabilities to understand, modify, run, and deliver real-world code repositories.
    825
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Provides AI coding agents with five intelligence layers (dependency graph, git history, documentation, architectural decisions, code health) via nine MCP tools, enabling deep codebase understanding and reducing exploration cost.
    11
    6,181
    AGPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to search code by meaning, explore codebase structure, store and query knowledge with temporal facts, and read source code through a set of MCP tools.
    453
    7
    MIT

View all related MCP servers

Related MCP Connectors

  • Hosted MCP for creating, checking, deploying, and hosting static sites for AI agents.

  • Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Philippe012/MCP-Agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server