agent-eval-mcp
An MCP-style stdio server for evaluating AI agent outputs, enabling CI-friendly quality gates, regression comparisons, and canary promotion decisions.
README
Enterprise AI Agent Evaluation & Deployment Platform
A dependency-light evaluation platform for RAG/wiki-quality AI agents. It scores agent outputs for faithfulness, retrieval relevance, hallucination risk, latency, and cost; produces CI-friendly quality gates; emits regression/canary reports; and exposes the workflow through a lightweight MCP-style stdio tool server.
What Is Included
- JSONL evaluation case format for RAG/wiki workflows.
- Deterministic checks for:
- faithfulness to retrieved context and reference answer,
- retrieval relevance against question and expected keywords,
- hallucination risk from unsupported answer content,
- latency and cost thresholds.
- 100+ synthetic case generator.
- CI/CD-style suite-level and case-level quality gates.
- Markdown and JSON evaluation reports.
- Regression report comparing baseline and candidate runs.
- Canary promotion policy with traffic ramp decisions.
- OpenTelemetry-compatible JSONL traces/metrics.
- MCP-style stdio server exposing evaluation tools.
Quick Start
git clone https://github.com/ad-github1/ENTERPRISE-AI-AGENT-EVALUATION-PLATFORM.git
cd ENTERPRISE-AI-AGENT-EVALUATION-PLATFORM
PYTHONPATH=src python3 -m agent_eval_platform generate-cases --count 120 --out examples/wiki_eval_cases.jsonl
PYTHONPATH=src python3 -m agent_eval_platform evaluate \
--cases examples/wiki_eval_cases.jsonl \
--gate examples/quality_gate.json \
--variant candidate \
--json-out reports/eval_result.json \
--markdown-out reports/eval_report.md \
--traces-out reports/traces.jsonl
PYTHONPATH=src python3 -m unittest discover -s tests
Testing
Run the test suite:
PYTHONPATH=src python3 -m unittest discover -s tests
Current local result:
Ran 5 tests in 0.015s
OK
After installation:
pip install -e .
agent-eval evaluate --cases examples/wiki_eval_cases.jsonl --gate examples/quality_gate.json
agent-eval-mcp
Case Format
Each JSONL row contains one evaluated agent run:
{
"case_id": "case-0001",
"question": "What contribution is Ada Lovelace known for in mathematics?",
"reference_answer": "Ada Lovelace is known for Analytical Engine notes.",
"expected_keywords": ["Ada Lovelace", "Analytical Engine"],
"retrieved_docs": [
{"doc_id": "wiki-1", "title": "Ada Lovelace", "text": "...", "score": 0.94}
],
"agent_answer": "Ada Lovelace is known for Analytical Engine notes.",
"latency_ms": 240.5,
"cost_usd": 0.0031,
"tags": ["wiki", "rag"]
}
CI Quality Gate
The evaluator exits non-zero when --fail-on-gate is used and thresholds fail:
PYTHONPATH=src python3 -m agent_eval_platform evaluate \
--cases examples/wiki_eval_cases.jsonl \
--gate examples/quality_gate.json \
--fail-on-gate
See .github/workflows/agent-eval.yml for a GitHub Actions example.
MCP-Style Tool Server
Run:
PYTHONPATH=src python3 -m agent_eval_platform.mcp_server
Supported JSON-RPC methods:
initializetools/listtools/callwith:run_evaluation_suitecompare_regressiondecide_canary
This is intentionally stdio and dependency-free. It follows the MCP tool shape closely enough for local agent integration demos without requiring the MCP Python SDK.
Canary Workflow
PYTHONPATH=src python3 -m agent_eval_platform canary \
--result reports/eval_result.json \
--config examples/canary_config.json \
--json-out reports/canary_decision.json
The decision is hold, increase_traffic, or promote based on suite quality and minimum case coverage.
Evaluation Results
Evaluation Run
PYTHONPATH=src python3 -m agent_eval_platform evaluate \
--cases examples/wiki_eval_cases.jsonl \
--gate examples/quality_gate.json \
--variant candidate \
--json-out reports/eval_result.json \
--markdown-out reports/eval_report.md \
--traces-out reports/traces.jsonl
Aggregate Metrics
| Metric | Value |
|---|---|
| Evaluation cases | 120 |
| Pass rate | 82.5% |
| Average faithfulness | 0.825 |
| Average retrieval relevance | 0.838 |
| Average hallucination risk | 0.153 |
| p50 latency | 392.58 ms |
| p95 latency | 663.40 ms |
| p99 latency | 872.87 ms |
| Average cost | $0.00393 |
| Total cost | $0.47158 |
Canary Decision
PYTHONPATH=src python3 -m agent_eval_platform canary \
--result reports/eval_result.json \
--config examples/canary_config.json \
--json-out reports/canary_decision.json
Result:
{
"action": "hold",
"next_traffic_percent": 10.0,
"reasons": [
"pass_rate 0.825 < 0.900"
]
}
The canary policy correctly blocked promotion because the candidate run did not meet the configured 90% pass-rate threshold. This demonstrates how the platform can prevent low-quality agent versions from being promoted automatically.
Observability
The evaluation emits OpenTelemetry-style JSONL traces to:
reports/traces.jsonl
Each case generates spans for faithfulness, retrieval relevance, hallucination risk, and final case-level pass/fail status, enabling debugging of failed agent responses.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。