For the complete documentation index, see llms.txt. This page is also available as Markdown.

MCP Quickstart

Drive evals from an MCP-capable AI assistant like Claude Code or Cursor. Create, run, and calibrate evals in plain language.

Drive evals from an MCP-capable AI assistant (Claude Code, Cursor). Best for iterating with an agent that can create, run, and calibrate evals for you. Fastest path today.


The four-resource model

Every eval boils down to four resources plus a run.

  • Target: what to test. An HTTP agent endpoint, a prompt with a system message, or precomputed outputs.

  • Dataset: the test cases. Each row has an input, and depending on scoring, optional expected_output, expected_tools, or context.

  • Metric Set: how to score. A list of metrics with thresholds and weights.

  • Evaluation: the wiring. Ties the three together plus run-time settings.

  • Eval Run: the execution. Per-item scoring and aggregate results.


Install

The Harness MCP server ships as an npm package. The AI Evals toolset requires harness-mcp-v2 2.9.7 or later.


Configure

Claude Code reads MCP config from ~/.claude.json. Add a server entry with your Harness credentials and toolsets.


Build your first evaluation

The example evaluates a flight support agent. Substitute your own endpoint everywhere it appears below.

Six MCP calls take you from zero to a scored run.

1. Create the target

2. Create the dataset

expected_tools drives trajectory metrics. expected_output drives answer metrics.

3. Find metric UUIDs

Metrics are pre-seeded per account. Search for the ones you want:

4. Create the metric set

5. Create the evaluation

6. Run it

The response includes a run UUID and a pipeline_execution_id. The runner is a Harness pipeline using harnessdev/ai-evals-runner.

7. Read results

The run returns summary_scores, dimension_scores, and pass/fail counts. Items return per-row input, output, per-metric scores, and any error messages.

Or just ask. Once the MCP server is connected, describe the goal in plain language: "Register SkyBuddy at <endpoint>, create a starter dataset with four rows covering flight status and off-topic prompts, build a heuristic metric set with ToolSelectionAccuracy at 0.7 and Contains at 1.0, wire them into an evaluation and run it." Your assistant translates that into the six calls above.


What success looks like

A working MCP run returns aggregate scores plus per-item results:

What the scores mean:

  • pass_rate: 0.83: 83% of dataset rows passed all metrics

  • dimension_scores: Average scores per metric category (trajectory = tool metrics, correctness = answer metrics)

  • Status: completed: Run finished successfully (other states: running, failed, cancelled)

Open the Evaluations tab in the AI Evals UI to see the same run with the full trace side by side.

Natural language alternative

Once MCP is connected, you can also describe what you want in plain language:

Claude translates that into the six MCP calls above and returns the run results.


Troubleshooting

Agent target returns HTTP 400 error with message about unexpected input structure

Without request_template on an agent target, the runner double-nests row input. Your agent receives {input: {input: ...}} instead of the expected structure and rejects with HTTP 400. Always specify the outgoing body shape explicitly on type: agent targets using the request_template field.

MCP server changes in ~/.claude.json are not taking effect after restart

Claude Code caches MCP server processes. Editing ~/.claude.json does not automatically re-spawn them. Run pkill -9 -f harness-mcp-v2 to kill the cached process, then run /mcp in the client to reconnect. Restarting the terminal alone is not enough.

Last updated

Was this helpful?