eval-mcp-server

eval-mcp-server

Exposes a deterministic AI-slop scanner and RAG grounding grader as MCP Tools, Resource, and Prompt, enabling any MCP client to evaluate text quality and context faithfulness.

Category
访问服务器

README

eval-mcp-server — expose your eval gate to any AI client via MCP

TL;DR. A Model Context Protocol (MCP) server that exposes my own AI-slop scanner (and a RAG grounding grader) as MCP Tools, a Resource, and a Prompt — so any MCP client (e.g. Claude Desktop) can call my eval gate as a first-class capability. Most MCP demos ship Tools only; this one demonstrates all three primitives.

Headline metric: 3 MCP primitives exposed (2 Tools · 1 Resource · 1 Prompt) — 100% tool-schema-validity (10/10) and 100% round-trip parity (4/4) on the conformance suite (20/20 total checks). score_slop output is byte-for-byte identical to the underlying engine's score_text.

What is MCP, in two sentences

MCP is an open protocol that lets AI clients call external capabilities through three primitives — Tools (callable functions), Resources (readable context), and Prompts (reusable templates). Think of it as "USB-C for AI": one standard plug, and any host can drive any server.

How a reviewer clicks it

Run python3 test_client.py "<text>" — it prints a SLOP INDEX, a grade_rag score, the rubric resource, and the rendered prompt. No MCP host, no API key needed (it falls back to calling the logic directly if mcp isn't installed). Register the snippet in Claude Desktop and the same tools/resource/prompt appear in the client.


The three primitives

Primitive Name What it does
Tool score_slop(text) Scores prose for AI-slop tells → slop_index, verdict, per-rule rows, flagged hits. Wraps the vendored slop_engine.score_text.
Tool grade_rag(question, answer, context) Deterministic RAG grounding/faithfulness score: fraction of the answer's content tokens supported by the context → score + verdict (GROUNDED / PARTIALLY GROUNDED / UNSUPPORTED).
Resource rubric://slop-rules Serves the rule list, thresholds, scoring weights, and verdict bands — derived from the engine so it never drifts.
Prompt review-draft Reusable template that wires score_slop into a measure → diagnose → revise → re-measure editing workflow.

Run it

1. Reproduce the metric (one command, no key, no mcp)

python3 tests/test_conformance.py

Tests the stdlib logic module directly. Prints tool-schema-validity % and round-trip-parity %. Exits non-zero on any failure.

2. Call the gate (the reviewer path)

python3 test_client.py "In today's fast-paced world, let's delve into this robust, transformative paradigm."

If mcp is installed it does a real stdio round-trip against server.py; otherwise it calls the logic directly. Either way you get JSON back.

3. Run the MCP server over stdio

pip install -r requirements.txt   # installs the official `mcp` SDK
python3 -m server                 # serves Tools/Resources/Prompts over stdio

4. Register in Claude Desktop

See claude_desktop_config.snippet.json — merge the eval-gate entry into your claude_desktop_config.json, fix the absolute path, restart, and the tools/resource/prompt show up in the client.


Architecture (why it's testable without mcp)

The logic lives in stdlib-only modules that import only slop_engine:

slop_engine.py            vendored scoring core (stdlib-only; copy of the sibling slop-scanner engine)
tools/logic.py            single source of truth: registers every primitive
tools/grade_rag.py        deterministic grounding grader (+ optional Anthropic live mode)
resources/rubric.py       builds the rubric://slop-rules payload from the engine
prompts/review_draft.py   the review-draft prompt template
server.py                 THIN MCP wrapper — imports `mcp`, registers the above over stdio
test_client.py            stdio round-trip if mcp present, else direct-logic fallback
tests/test_conformance.py runnable as plain python3; tests logic, not mcp
claude_desktop_config.snippet.json
requirements.txt

server.py is a thin adapter; all behaviour is in the logic modules. That's why the conformance suite and the test-client fallback run with zero dependencies.


The four-part contract

  1. TL;DR + headline metric + run steps + reviewer line — above.
  2. Reproducible metric — python3 tests/test_conformance.py (one command).
  3. Offline / no-key path — everything here runs with no API key; the tools are fully deterministic. grade_rag has an optional Anthropic live mode (live=True), lazy-imported and gated on ANTHROPIC_API_KEY; it defaults to the stdlib check and never touches the network otherwise.
  4. Honest scope — this project is about protocol/integration rigor: it exposes deterministic eval tools over MCP correctly, with all three primitives and tested round-trip parity. It is not a claim about model quality — score_slop is a heuristic linter (flags mean "go look," not "delete"), and grade_rag is a token-overlap grounding proxy, not a semantic judge. Cross-link: this makes the sibling slop-scanner a callable capability for any agent — register it once and any MCP host can gate its own output on it.

Christian Macion — AI / Agent Engineer

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选