Skip to main content
A refactor, a dependency bump or a new tool can break your MCP server without failing a single unit test. The server still starts. An agent that connects to it gets a tool whose result no longer matches the declared schema, or a handler that accepts arguments it should reject. Smoke mode catches that in CI: --smoke runs the normal audit, then calls your server’s tools over the same connection and checks the answers.
One run gives you the audit score and, under it, one line per smoke check. Each line reads verdict check_id [tool]: reason. This server has four tools: honest works, dishonest breaks its own output schema, sloppy accepts anything, and writer was never called because it is not annotated read-only.
--smoke invokes tools/call on the target. Run it against servers you operate. The ordinary audit never calls tools, so it is the right choice for anyone else’s server.

Smoke-test your own server

The steps below take a minimal server built with the MCP Python SDK from no coverage to a CI gate. Each step changes one thing and shows the run that proves it. The server has one tool:
server.py

Step 1: Run it and read the skips

Point mcpscore at the server and add --smoke. A server in its own project environment runs through uv run, the same way you start it yourself:
Tools called: 0 of 1. mcpscore calls only tools annotated readOnlyHint: true, and add has no annotations. The spec defaults a missing readOnlyHint to false, so add might write something, and smoke mode leaves it alone. Every skip says why, so the gap in coverage is visible. The failure is about the server, not about add. Step 3 explains it.

Step 2: Annotate the tool

Tell clients that add has no side effects. This is the one-line change:
server.py
Run the same command again:
add is now called twice. With valid arguments it returned a result that matches the output schema the SDK derived from -> int. With a string where an integer belongs it refused, which is the rejection the check wants. A tool that answers gets a returned line: the number and types of content blocks, whether structuredContent was present, whether the result was flagged isError, and the first 80 characters of text. The annotation also raised the score from 118/140 to 121/141, because tools_annotations_present now passes. The same annotation tells every client that add does not modify its environment, and your smoke run now covers it.

Step 3: Read a failure

smoke_unknown_tool calls a tool name that cannot exist on your server and expects a JSON-RPC error, as Tools §Error Handling requires for unknown tools. This server answers with a tool result flagged isError, which tells the client the tool exists and ran. The MCP Python SDK answers this way by default, in both FastMCP (1.x) and MCPServer (2.x), so a server built on it fails this check until the SDK changes or the server rejects unknown names itself. A failure in your own tool reads the same way. The first example on this page shows the two most common ones:
dishonest declares an output schema with a required result field and returns an object without it. sloppy returned a success result for arguments its input schema forbids. Both would reach an agent in production.

Step 4: Gate CI on it

Any smoke failure exits with code 4. Add the score gate the same way, and CI can tell a low score apart from broken tools:
Raise the threshold to 90 against the 84% server from Step 1 and both gates fail. The score gate wins:
Skips never gate. A server with no readOnlyHint: true tools and a correct unknown-tool rejection exits 0 and reports what it skipped and why. The full exit-code table is in the stability contract.

What each check catches

Each check reports pass, fail or skip. Skip means the check could not run. It never means the server failed it. For the two rejection checks, any JSON-RPC error code counts as a rejection except three: a request timeout, a closed connection, and -32603 internal error. Those three mean the server tried to run the call and failed. Each call has 30 seconds to answer.

Which tools get called

  • Only tools annotated readOnlyHint: true are called by default. An unannotated tool is skipped, and every skip is reported with its reason.
  • --call-all lifts that default. No other flag implies it, and it has no environment-variable form. On the unannotated server from Step 1, it calls add without the annotation:
  • The unknown-tool check uses a name derived from your server’s own catalog, so it cannot match a real tool. If the tool listing failed or is incomplete, the check skips instead of guessing a name.
  • Arguments come from each tool’s input schema, in this order: default, const, the first entry of examples, the first enum value, then a zero value for the type. No language model is involved, so the same server receives the same calls on every run.
A tool that returns an error result for valid synthesized arguments reports as skip in smoke_structured_content. It may be rejecting the sample value, or a service behind it may be down, and an outage elsewhere should not fail your build. A JSON-RPC error to valid arguments skips for the same reason. Only behavior your server owns can fail a smoke check.Calls run one at a time, in catalog order: every structured-content call first, then every invalid-arguments call, then the unknown-tool call. A malformed schema fragment is tolerated rather than aborting the run.

Check that file tools stay in their root

If your server reads or writes files, smoke mode can check that a path never escapes the directory the server was given. mcpscore builds a throwaway directory tree, starts your server with its allowed directory as the root, and asks your tools for files outside it. Name the tools in mcpscore.toml (or [tool.mcpscore] in pyproject.toml), then put {mcpscore_fs_root} where your --stdio command names the directory:
mcpscore.toml
That is the official reference filesystem server: every escape is refused. Each line is one attempt: A read fails the check when the response contains the content of the file outside. A write fails it when a file appears or changes outside the root. What the tool says about its own call doesn’t count either way.
  • Naming a tool is consent to call it, even a write tool without readOnlyHint: true; --call-all isn’t needed, and the summary line names these tools. Writes only target the throwaway directory, which is removed after the run.
  • Each tool must work inside the root first. mcpscore reads a file it put in the root, or writes one there. If that fails, every attempt skips with the reason, because a misconfigured tool would otherwise refuse everything and look safe.
  • The argument names default to path and content. Set read_path_argument, write_path_argument or write_content_argument when your tools use others.
  • It needs a --stdio command with the placeholder. Against a URL, or without {mcpscore_fs_root}, the check reports one skip saying so.
A pass means these paths were refused, not that the server is secure.

Check that fetch tools reach only what they should

If a tool fetches URLs, smoke mode can check that it can’t be steered to a destination it should refuse: server-side request forgery. mcpscore starts two HTTP listeners on this machine, one your server may fetch and one it must not, and asks your tool for the second one in a dozen ways. The verdict comes from the denied listener’s request log: a request that arrives there fails the attempt, whatever the tool answered. Name the tool and the policy it enforces. With policy = "allowlist", put {mcpscore_allowed_origin} where your --stdio command, or an --env value, takes the origins the server may fetch:
mcpscore.toml
This server compares the URL’s host and port with its allowlist, but then follows redirects without checking them again: a URL on the allowed origin answers 302 to the denied listener, and the server goes there. Each line is one attempt:
  • policy = "deny-private" is for a server that refuses loopback and private addresses. It can’t fetch the local allowed listener either, so there is no positive control: a request that reaches either listener, both loopback, fails, and a refusal is reported as not assessed, never as a pass.
  • With allowlist, the tool must reach the allowed origin first. mcpscore fetches {mcpscore_allowed_origin}/control. If that request never arrives, every attempt skips with the reason, because a misconfigured tool would otherwise refuse everything and look safe. A request the control sends to the denied listener still fails, as positive_control. The allowlist must match the origin’s port: both listeners are on 127.0.0.1.
  • A fetch that arrives after its call returned still counts. mcpscore waits a second after the last attempt; a request that reaches a denied listener by then is reported as late_request, because the tool fetches in the background and its answers don’t show what it reached.
  • Naming the tool is consent to call it, as for file tools. The argument name defaults to url; set url_argument when your tool uses another.
  • Nothing outside this machine is contacted. No cloud metadata endpoint, internal service or callback service: every destination is one of the two listeners, and the report shows their ports as <allowed-port> and <denied-port>.
  • It needs a --stdio server without a proxy. Against a URL, with allowlist and no placeholder, or when --env gives the server HTTP_PROXY, HTTPS_PROXY or ALL_PROXY, the check reports one skip saying so: through a proxy the probe URLs could leave this machine.
A pass means these requests didn’t arrive, not that the server is safe from request forgery.

Results stay out of the score

The score is deterministic: the same server gets the same score. Tool calls depend on upstream services and on the environment, so smoke results live in their own smoke section of the JSON report and never change score or max_score:
When --smoke is requested but there is no session to call tools on, the section reports "executed": false with the reason instead of disappearing. That happens on a partial audit of an auth-gated server, on a modern-only probe audit, and when the tools catalog had to be recovered from the stateless lifecycle because the negotiated session could not list it.

Where it does not run

  • mcpscore.dev never runs smoke checks. Invoking tools on third-party URLs from our infrastructure is outside the website’s safety model, so smoke mode is CLI-only.
  • The GitHub Action accepts --smoke in args. A smoke failure fails the job after the report and PR comment are published. The comment does not list the smoke checks yet, and there is no dedicated smoke input.
  • Your test suite still has a job. Smoke checks prove the MCP contract: honest schemas, correct rejections, tools that answer. They do not test your business logic.

Recap

  • Run mcpscore --smoke against your own server and read the skip reasons.
  • Annotate read-only tools with readOnlyHint: true so smoke mode calls them.
  • Read each FAIL line as check, tool, and reason.
  • Gate CI with --fail-under and --smoke: exit 3 is the score, exit 4 is broken tools.
  • Add [smoke.filesystem] and {mcpscore_fs_root} to check that file tools stay in their root.
  • Add [smoke.network] and {mcpscore_allowed_origin} to check that fetch tools reach only what their policy allows.

What’s next

GitHub Action

Run the same gate on every pull request

CI beyond GitHub

Exit codes and --json in any CI system

Stability Contract

Exit codes and the smoke report section

Authenticated Servers

Pass credentials so smoke can reach behind the gate