LLM Evaluation Harness MCP Server
Click on "Install 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., "@LLM Evaluation Harness MCP ServerScore sample: question='What is RAG?' answer='Retrieval Augmented Generation' contexts=['RAG combines retrieval and generation.']"
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.
LLM Evaluation Harness with MCP Tool Integration
An automated RAG evaluation harness scoring faithfulness, answer relevancy, and context precision — with a Gemini LLM-as-a-Judge backend (or optional RAGAS/DeepEval), exposed as a Model Context Protocol (MCP) server so any assistant can call it as tools, and wired into GitHub Actions for per-commit eval gating.
Why this exists
RAG pipelines silently regress. This harness turns evaluation into a gate: every commit is scored on the three metrics that matter for retrieval quality, and the build fails if any drops below threshold. The same eval logic is exposed over MCP so an agent can run evals as a tool — the part few portfolios show.
Related MCP server: hallumark
Metrics
Metric | Question it answers |
faithfulness | Is the answer supported by the retrieved context? |
answer_relevancy | Does the answer actually address the question? |
context_precision | How much of the retrieved context was relevant? |
Two backends: a self-contained Gemini LLM-as-a-Judge (default), or
RAGAS/DeepEval (set USE_RAGAS=true).
Quickstart
1. Install
git clone https://github.com/SaiArja/llm-eval-mcp.git
cd llm-eval-mcp
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt2. Configure
cp .env.example .env
# set GEMINI_API_KEY=... (https://aistudio.google.com/app/apikey)3. Run the eval gate
python -m scripts.run_evalThe bundled data/sample_eval.jsonl contains three rows — one is a deliberately
off-topic answer, so the aggregate drops the faithfulness/relevancy scores and
the gate fails (exit code 1). Remove that row, or raise answer quality, and
the gate passes. That pass/fail flip is exactly what runs in CI.
Get raw JSON:
python -m scripts.run_eval --jsonRunning as an MCP server
python -m app.mcp_server.serverThis starts an MCP server over stdio exposing three tools:
Tool | Description |
| Full eval report + pass/fail gate |
| Score one output |
| Current CI gate thresholds |
Register it with any MCP client (e.g. Claude Desktop) by pointing the client at
python -m app.mcp_server.server. An assistant can then evaluate RAG outputs on
demand as a tool call.
CI gating (GitHub Actions)
.github/workflows/eval.yml runs unit tests and the eval gate on every push and
PR. Add your key as a repo secret named GEMINI_API_KEY
(Settings → Secrets and variables → Actions). A metric below threshold fails the
build — turning "did this change hurt retrieval quality?" into a red/green check.
Dataset format
JSONL, one object per line:
{"question": "...", "answer": "...", "contexts": ["...", "..."], "ground_truth": "..."}Project layout
app/
eval/config.py thresholds + backend selection
eval/judge.py Gemini LLM-as-a-Judge client
eval/metrics.py metric scoring (judge + optional RAGAS)
eval/dataset.py JSONL loader
eval/runner.py load -> score -> aggregate -> gate
mcp_server/server.py MCP tools
scripts/run_eval.py CLI gate (exits non-zero on failure)
data/sample_eval.jsonl
.github/workflows/eval.yml
tests/ smoke tests (no key needed)Tests
pip install pytest
pytest -qLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/SaiArja/llm-eval-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server