Blog / Test MCP servers with agents

How to test agents against a production MCP server without spending, writing or sending anything

A mock server tells you how agents read your descriptions. Only production tells you what your real data, real limits and real errors do to them. The catch: an agent with your production login can spend, write and send. Here's the setup we use so it can't.

Leonid Bugaev · Published 21 Oct 2026

Why test on production at all

A mock is great for wording: it shows how agents read your names, descriptions and errors. It can't show what your real data does: a 14,517-token overview result, a real 12,689-token error, a real screen label that doesn't match the API. We found each of those only on a 99-tool production MCP server.

The risk is real too. An agent signed in with your account can call any tool it sees. Some of them spend credits, write records or send messages.

The setup: four layers

  1. Allowlist proxy between the agent app and the server. Only named read tools pass.
  2. Agent app limits: read-only sandbox, browser tools disabled, other MCP servers and shell turned off for the run.
  3. Scorer checks: any blocked call, shell command or browser use fails the run's safety check, whatever the answer.
  4. Read-only jobs: questions that only need reads, such as “how many credits are left?” or “which group performs best?”.
agent appallowlist proxyproduction MCP

Want your production MCP tested without risk?

We run agents against your real server through a read-only guard, with your users' jobs, and report what breaks. Nothing is written, spent or sent.

Test your MCP safely

The allowlist proxy

Ours is a small HTTP proxy addon. For each tools/call it checks the tool name against a set of 37 reviewed read tools. Anything else never reaches the server: the proxy answers locally with an error and writes a BLOCKED line to the log.

if name not in ALLOW:
    log({"BLOCKED": name, "args": args})
    return jsonrpc_error(-32001,
      f"Blocked by read-only proxy: {name} can change data or spend credits. This session is read-only.")

What the guard caught

Write attempts, live rounds
0
Runs that hit the guard (skills trial)
1/24 runs, 3 blocked calls
First pass: runs that used the browser
13/36 runs (22–52%)

Checklist

Next: evaluate agents on your API and report pass rates with ranges. Back to the agent testing guide.

Go deeper: Agents escape to the browser, Annotations and spend safety, Testing write paths, Validate your scorer.

How we measured

FAQ

Can I test an MCP server against production safely?

Yes, if the agent can only reach read tools. Put an allowlist proxy between the agent and the server, return an error for anything else, disable the agent app's browser and shell tools, and fail any run that tries them.

Why an allowlist instead of blocking write tools?

New tools appear and names mislead. A tool annotated read-only can still fetch pages from the outside web. An allowlist denies anything you didn't review, including tools added after you wrote it.

Is the read-only annotation enough?

No. It's a hint that agent apps may or may not act on, and it can be wrong. Enforce read-only outside the agent, in a proxy.

What should a blocked call return?

A normal JSON-RPC error with a plain reason, such as “blocked: this session is read-only”. The agent then carries on or explains, and you log it as a finding.

What can't read-only testing show?

Anything on write, spend or send paths: confirmation before spending, enrolment, feedback writes. Test those on a mock or a sandbox account.

Want your production MCP tested without risk?

We run agents against your real server through a read-only guard, with your users' jobs, and report what breaks. Nothing is written, spent or sent.

Test your MCP safely