@cyanheads/evals-mcp-server
Supports Cloudflare KV, R2, and D1 as pluggable storage backends for eval drafts, submitted records, and exported artifacts.
Emits structured logs and optional OpenTelemetry traces for observing eval authoring, grading, and export operations.
Supports Supabase as a pluggable storage backend for persisting eval records and their associated graders.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Overview
Build verifiable eval records with server-enforced graders. Draft a record with its own executable grader, revise it field by field, and submit through a gate that requires the gold and positive answers to pass, all negative cases to fail, and an independent check to agree. Export to JSONL, CSV, Inspect AI, or lm-evaluation-harness.
Tools
Tool | Description |
| Return the required and optional fields plus grader options for a task type. Call before drafting. |
| Create a draft eval record carrying its own grader; returns the parsed record, a review protocol, and a verification subagent prompt. |
| Read a draft or submitted record by id; the id is stable across submit. |
| Apply a surgical |
| Delete a draft record by id. Draft-only. |
| Run a grader spec against candidate answers and get PASS/REJECT per candidate, decoupled from any saved record. |
| Finalize a draft through the committability gate, then freeze it. |
| Browse and filter records by status, domain, task type, or tag. Returns a compact summary per record. |
| Compile submitted records to JSONL, CSV, Inspect AI, or lm-evaluation-harness and write the artifact under |
Resources
Resource | Description |
| The modeled fields of a draft or submitted record by id, for resource-capable clients. |
All record data is also reachable through the tool surface — evals_get_record for a single record, evals_list_records to browse. The resource is a convenience mirror for clients that support resources, not the access path.
Skill
The evals-guide covers independent verification, submission blockers, corpus coverage, and downstream scoring. It ships with plugin, npm, Docker, and MCPB installs and is available over MCP at skill://evals-guide/SKILL.md.
Related MCP server: agent-eval-mcp
Capability reference
evals_describe_schema tool
Accepts
task_type:numeric,exact_answer,set_answer,mcq,regex_answer,json_answer, orfree_response.Returns the gold shape, grader kinds, required/optional fields, and authoring notes from static schemas;
mcqrequireschoices, andfree_responserequiresllm_rubric.
evals_create_draft tool
Accepts a record with its grader and discrimination cases, plus optional
verificationandcaptures(EvalsIDs);mcqrequireschoices, andfree_responserequiresllm_rubric.Saves the record as a
draftonce its grader runs, and returns the normalized record, a review protocol, a verification-subagent prompt, and what submit still needs. A draft whose gold fails its grader is still saved.Readiness covers the record's grading, evidence, and decorrelation checks. Submit still resolves captures, checks duplicates, and handles optional confirmation.
Typed errors:
grader_unexecutable,task_type_constraint,mcq_choice_mismatch.
evals_get_record tool
Reads a draft or submitted record by
id, which stays stable across submit. Use the generated id from an authoring response orevals_list_records.Returns the full grader, discrimination cases, and verification evidence;
not_foundpoints toevals_list_records. An invalid stored record reportsrecord_invalidwith its id and affected field paths.
evals_revise_draft tool
Applies
set,append, andunsetby dotted path to a draft;task_typeand server-owned fields, including the entirecaptured_outputssubtree, cannot be changed. Arrays are replaced whole or appended, not edited by index.Re-validates the record and grader before writing, then returns the record plus
changedentries (op,path,before,after). An unknown path rejects the whole patch.Typed errors:
not_found,record_frozenfor a submitted id,invalid_patch_path,grader_unexecutable,task_type_constraint,mcq_choice_mismatch.
evals_discard_draft tool
Deletes a draft by
draft_idand returnsdiscarded: true, including a corrupt draft that cannot be read or revised.A submitted record reports
record_frozen; a missing or already discarded id reportsnot_found.
evals_run_check tool
Runs a grader against one or more
candidateswithout a saved record; supplygoldforexact_match, while target-embedding kinds such asnumericandmcqignore it.Returns PASS/REJECT,
detail, and theresolvedreference per candidate.llm_rubriccan't be run here.Numeric grading accepts only finite real values; unit-bearing, complex, nonfinite, and non-scalar candidates are rejected.
unitsis documentation only.Numeric tolerances and rubric weights must be nonnegative; rubric thresholds must be between 0 and 1, with at least one positive effective criterion weight. Zero-weight diagnostic criteria may accompany scored criteria.
exact_matchandset_matchaccept normalization operations.strip_punctreplaces ASCII punctuation with spaces;remove_punctdeletes it.strip_latexhandles nested command arguments. Set strings split on commas and newlines by default; selectcommaornewlineexplicitly to keep the other delimiter inside an element.Synchronous JSON Schema grading supports draft-07 by default and explicit 2019-09 or 2020-12 dialects. Ignored keyword or format diagnostics appear in each verdict's
detailwithout changing the verdict.Typed errors:
grader_unexecutable,mcq_choice_mismatch.
evals_submit_draft tool
Finalizes by
draft_id. Every draft needs a declared negative and decorrelated verification. Deterministic graders must pass the gold and every positive and reject every negative. Failed deterministic evidence blocks submission even without a computed value. Also resolvescapturesafresh againstEVALS_CAPTURE_DIR, rejects duplicatecontent_hash, and can ask for confirmation viaconfirmorEVALS_REQUIRE_CONFIRMATION.On success, freezes the record with
submitted_atandchecksumand returnsstatus: submitted; a refusal leaves the draft intact.free_responserecords skip grader verdicts and carryserver_verified: false.Typed errors:
not_found,record_invalid,record_frozen,verification_incomplete,grader_failed_on_gold,positive_case_failed,verification_disagrees_with_gold,missing_negative_case,negative_case_passed,duplicate,decorrelation_violation,capture_unresolved,submit_declined.
evals_list_records tool
Filters by
status(draft/submitted),domain,task_type, ortag;limitis a positive integer and defaults to 50, andoffsetdefaults to 0.Returns summaries (id, status, task_type, domain, tags, timestamps), newest-first with id as a tie-breaker, plus
shown,cap,totalCount, andtruncated. PassnextOffsetasoffsetuntil it is absent.Invalid record files are skipped with a diagnostic notice; valid records remain available.
evals_export_records tool
Exports
submittedrecords, optionally filtered bydomain,task_type, ortag, asjsonl(lossless),csv(lossy summary),inspect(Inspect AI sample array), orlm-eval(data manifest for a harness adapter).Inspect samples put context before the prompt and use Inspect choice labels (A–Z, then 1, 2, …) for multiple-choice targets. Other gold values become strings, with structured values encoded as JSON.
grader_specretains the grading contract; optional scorer hints do not replace it or configure an Inspect task automatically.The lm-eval manifest preserves context, choices, and
grader_spec; it requires a task adapter. Only compatible built-in metric hints are included.Writes under
exports/and returns the path, record count, byte size, and preview. Invalid record files are skipped with a diagnostic notice.
eval://record/{id} resource
Reads
idfromevals_list_recordsor a draft/submit response.Returns the record's modeled fields as
application/json, ornot_foundwhen no record matches. Useevals_get_recordor JSONL export to retain extension fields in hand-edited files. Invalid stored records reportrecord_invalid.Resource discovery lists all valid records; skipped invalid files are logged on the server.
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Eval authoring:
A
draft → review → surgical-revise → submitloop, with the server both storing records and running each record's own grader to reject what doesn't hold upSeven task types:
numeric,exact_answer,set_answer,mcq,regex_answer,json_answer,free_responseA grader serialized with each record; deterministic kinds (
numericvia math.js,exact_match,set_match,regex,mcq,json_match) run server-side, whilellm_rubricrelies on recorded independent verificationA submit gate: the gold and every positive must pass their grader, at least one negative is required and all must be rejected, and a recorded decorrelated verification must agree with the gold
Plain JSON files under
EVALS_DATA_DIR, with drafts, submitted records, and exports kept separate
Agent-friendly output:
evals_create_draftandevals_revise_draftreturn the parsed record, a per-field review protocol, and a ready-to-paste verification-subagent promptDraft and revise responses report pass/reject results for each positive and negative case
evals_list_recordsreports page counts andnextOffsetto continue browsingThe submit gate fails with a typed
reasonplus a recovery hint
Getting started
Add the following to your MCP client configuration file. Set EVALS_DATA_DIR to a writable folder — the server manages drafts/, submitted/, and exports/ under it.
{
"mcpServers": {
"evals-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/evals-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"EVALS_DATA_DIR": "/absolute/path/to/evals-data"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"evals-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/evals-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"EVALS_DATA_DIR": "/absolute/path/to/evals-data"
}
}
}
}Or with Docker:
{
"mcpServers": {
"evals-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-v", "evals-data:/usr/src/app/evals-data",
"ghcr.io/cyanheads/evals-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 EVALS_DATA_DIR=./evals-data bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.4 or higher (or Node.js v24+).
A writable directory for
EVALS_DATA_DIR. No external API key is required.
Installation
Clone the repository:
git clone https://github.com/cyanheads/evals-mcp-server.gitNavigate into the directory:
cd evals-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env and set EVALS_DATA_DIRConfiguration
All server configuration is validated at startup via Zod schemas in src/config/server-config.ts.
Variable | Description | Default |
| Root folder for record JSON; the store manages |
|
| When |
|
| Default | — |
| Directory of tool-call capture files read at submit. The reader is available; automatic framework capture production is pending mcp-ts-core#247. | — |
| Transport: |
|
| Port for the HTTP server. |
|
| HTTP session mode: |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Use an absolute LOGS_DIR to select a log directory outside the server's installation. For JWT deployments, set MCP_JWT_EXPECTED_AUDIENCE and, if applicable, MCP_JWT_EXPECTED_ISSUER. If a refreshed token changes the tenant, client ID, or subject, initialize a new HTTP session.
Submit confirmation expires after 10 minutes and must be repeated if the draft changes. When running more than one instance, use shared storage (STORAGE_PROVIDER_TYPE=filesystem with a shared STORAGE_FILESYSTEM_PATH, supabase, or cloudflare-d1; not cloudflare-kv) and set the same MCP_REQUEST_STATE_KEY (at least 32 bytes) on each.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t evals-mcp-server .
docker run --rm -e MCP_TRANSPORT_TYPE=stdio -v evals-data:/usr/src/app/evals-data evals-mcp-serverThe Dockerfile defaults to HTTP transport, stateful session mode, and logs to /var/log/evals-mcp-server. Mount record storage at /usr/src/app/evals-data, the default directory owned by the runtime user. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions ( |
| The record schema, draft builder, and submit gate. |
| Deterministic grader DSL execution and the committability check. |
| On-disk JSON record CRUD, the draft→submitted move, and export writes. |
| Compiling submitted records to JSONL/CSV/Inspect/lm-eval. |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging; records persist to disk via therecord-storeservice, notctx.stateRegister new tools and resources in the
createApp()arrays insrc/index.tsThe server is the source of truth — validate inputs, run the grader as a hard gate, and never admit a record on assertion alone
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP-native AI evaluation: rubric audits, eval suites, and proof reports for AI/LLM output.
Prompt evals over MCP: run a prompt on your dataset, score each output 1-5 with an LLM judge.
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
Pay-per-call AI evaluation MCP server. Score LLM outputs against benchmark rubrics via Workers AI.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP-based code evaluation harness — sandboxed execution + LLM quality scoring.MIT
- AlicenseBqualityDmaintenanceAn MCP-style stdio server for evaluating AI agent outputs, enabling CI-friendly quality gates, regression comparisons, and canary promotion decisions.3MIT
- AlicenseAqualityBmaintenanceEnables building and running custom LLM benchmarks with multi-judge evaluation, supporting GUI, MCP client, and CLI usage for ranked, auditable results.8MIT
- AlicenseNot gradedqualityBmaintenanceEnables users to list and retrieve evaluation tasks, score recorded submissions, run benchmark evaluations via OpenRouter, and access provenance information through MCP tools.18 npmMIT