dify-eval-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dify-eval-mcp 帮我跑一下 erp-copilot 的回归集,和上次的基线比一下"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dify-eval-mcp
把 dify-eval 的评测能力暴露成 MCP Server—— Claude Desktop / Cursor / CodeBuddy 里直接对 AI 说「跑一遍回归评测」,它就会调。
为什么做这个项目
dify-eval 解决「AI 应用发布前的质量门禁」, 但它是 CLI:人要在终端里敲命令。而 AI 应用的开发者越来越多时间泡在 MCP 客户端里(Cursor / Claude), 评测能力应该长在他们的工作流里,而不是另一个终端窗口里。
一条命令行工具 → MCP Server 的封装,让「跑评测」变成 Agent 的一个工具调用:
你:帮我跑一下 erp-copilot 的回归集,和上次的基线比一下
Agent:(调 list_eval_sets 发现评测集 → run_eval 跑 mock → compare_runs 对比)
Agent:12 条用例过了 10 条,mini-003 挂了 groundedness 维度;和基线比没有回归。报告在 reports/...Related MCP server: Eval_MCP
五个工具
工具 | 干什么 | 对应 dify-eval |
| 扫目录发现评测集(名字 / 用例数 / 可否 mock) | — |
| 跑评测集,返回通过率 / 维度统计 / 失败清单 |
|
| 两次运行对比(竞品对比 / 版本回归) |
|
| 导出人工盲评 CSV |
|
| 合并人工评审(多份 = 众包,多数投票 + 一致率) |
|
设计要点:
mock 优先:
run_eval默认 mock 离线跑,Agent 随便调也不会烧钱; live 模式走DIFY_BASE_URL/DIFY_API_KEY环境变量,密钥不进工具参数协议与逻辑分离:工具实现全在
tools.py(不 import 任何mcp.*), 单测不碰协议;协议层另有一套真实 stdio JSON-RPC 端到端测试(起子进程握手、tools/list、tools/call)错误不崩 server:业务错误以
{"error": ...}返回给调用方,server 进程始终活着
安装与挂载
pip install "dify-eval-mcp @ git+https://github.com/ulinchoo-dotcom/dify-eval-mcp.git@main"Claude Desktop(claude_desktop_config.json)/ Cursor(mcp.json):
{
"mcpServers": {
"dify-eval": {
"command": "dify-eval-mcp",
"env": {
"DIFY_BASE_URL": "https://your-dify.example.com",
"DIFY_API_KEY": "app-xxx"
}
}
}
}不配环境变量也能用——那就是纯 mock 离线模式。
测试
pip install -e ".[dev]"
pytest -q # 12 个测试:工具层 8 个 + 真实 stdio 协议层 4 个协议层测试会起一个真实的 server 子进程,走完
initialize → notifications/initialized → tools/list → tools/call 全流程——
这是「Cursor 能不能真的挂上」的最低保证。
三仓库的关系
dify-eval 评测引擎(CLI / 判定器 / 报告) ← 核心
dify-eval-mcp MCP 封装(本仓库) ← 让 Agent 能调
dify-bundle 交付包工具(export/check/diff/import) ← 让配置能带走License
MIT
Available Tools
5 toolscompare_runsB
对比两次运行结果(竞品对比 / 版本回归)。输入是 run_eval 的 json_out 产物
Inputs: run_a (required), run_b (required), labels, html_out. Returns: object
export_reviewA
从运行结果导出人工盲评 CSV(自动判定留空,避免锚定效应)
Inputs: out_csv (required), result_json (required). Returns: object
import_reviewA
把人工评审 CSV 合并回运行结果;传多份 CSV 即众包(多数投票 + 一致率)
Inputs: result_json (required), review_csvs (required), html_out, out_json. Returns: object
list_eval_setsA
扫描目录里的评测集(.yaml/.yml),返回名称、用例数、是否可 mock 离线跑
Inputs: directory (required). Returns: object
run_evalB
跑一批评测用例。mock=True(默认)离线运行,不需要 Dify 实例;live 模式用 DIFY_BASE_URL/DIFY_API_KEY 环境变量
Inputs: eval_set (required), mock, tags, html_out, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct, non-overlapping purpose: running evaluations, comparing runs, exporting/importing human reviews, and listing evaluation sets. The paired export/import tools are clearly separated by their direction of data flow, and run_eval vs list_eval_sets are unambiguously different (execution vs discovery).
All tool names follow a consistent verb_noun pattern in snake_case: run_eval, compare_runs, export_review, import_review, list_eval_sets. The verbs are all lowercase and descriptive, and the nouns are appropriate. The slight singular/plural variation (eval vs eval_sets, runs) is semantically justified and does not break the pattern.
Five tools is well-scoped for the domain of Dify evaluation workflows. Each tool covers a distinct step in the lifecycle (discover, run, compare, review), without unnecessary overlap or bloat. This is within the ideal 3-15 range and feels purpose-built rather than padded.
The tool surface covers the core evaluation workflow: listing eval sets, running them, comparing results, and handling human reviews. The only noticeable gap is the lack of a way to list or inspect existing run outputs, which an agent would need to know prior runs for comparison. This is a minor dead end that can be worked around if run artifacts are known or passed explicitly.
Maintenance
Related MCP Connectors
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
Related MCP Servers
AlicenseAqualityBmaintenanceMCP server that gives AI coding agents direct access to evaluation tools.23Apache 2.0- FlicenseNot gradedqualityDmaintenanceAn MCP server for prompt and RAG evaluation workflows, enabling users to register, create API keys, and run evaluations via Claude Desktop, Cursor, or other MCP clients, with a hosted backend for heavy evaluation work.1-

Patronus MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceEnables running LLM evaluations, experiments, and custom evaluators through a standardized MCP interface.16Apache 2.0
AgentMark MCP Serverofficial
AlicenseNot gradedqualityAmaintenanceMCP server for AgentMark. Exposes the full AgentMark API to AI editors: list traces and spans, manage datasets, write scores, run experiments, manage apps, deployments, environments, and annotation queues.352AGPL 3.0