# MCP servers

A tool that passes the MCP specification can still lose something in a client. Claude Code leaves out a tool whose schema isn't valid draft 2020-12, VS Code omits one that isn't valid draft-07, Copilot Studio drops one with `$ref`, and Codex removes `minimum` and `maxLength` before the model sees the schema. None of this is an error on the server: `tools/list` answers normally, and the tool is missing or different only in that client.

`is-mcp-ok` reads a server's `tools/list` and reports what each client does with it, and what the list costs in Claude tokens. Given the calls a client made, it also measures each answer and what in it the model could do without. [ismcpok.dev](https://ismcpok.dev/) runs the same checks on a public server.

```sh
npx is-mcp-ok <url | file> [options]
```

## Read a server

Give it a Streamable HTTP endpoint. is-mcp-ok sends the requests a client sends when it connects, `initialize` and then every page of `tools/list`:

```sh
npx is-mcp-ok http://localhost:3000/mcp
```

Or give it a `tools/list` saved as JSON: a tools array, `{ tools }`, `{ initialize, tools }`, or a JSON-RPC `tools/list` response. A file can also be a recorded session with `calls`; see [Check answers](https://ismcpok.dev/docs/reference/mcp#check-answers).

```sh
npx is-mcp-ok tools.json
```

Use the final endpoint URL: is-mcp-ok does not follow redirects. The output names only the endpoint's origin, since a path or query can hold a token.

| Option                      | What it does                                                                                                                                   |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `--header "Name: value"`    | Send this header with every request, such as `--header "Authorization: Bearer $TOKEN"`. Repeatable. is-mcp-ok never prints its value.          |
| `--login`                   | Sign in through your browser when the server answers 401 with an OAuth challenge. See [Sign in](https://ismcpok.dev/docs/reference/mcp#sign-in).                                     |
| `--call <file>`             | After `tools/list`, call the read-only tools listed in the file and check their answers. See [Sample calls](https://ismcpok.dev/docs/reference/mcp#sample-calls).                    |
| `--client <id>`             | Check only this client. Repeatable.                                                                                                            |
| `--copilot-studio-standard` | Treat findings documented for Copilot Studio's standard harness as applicable to that target.                                                  |
| `--max-warnings <n>`        | Also exit `1` when there are more than `<n>` warnings.                                                                                         |
| `--save <file>`             | With a URL: write the `{ initialize, tools }` it read to `<file>`, as a [baseline](https://ismcpok.dev/docs/reference/mcp#limit-the-budget). Never the calls, a header or the URL.   |
| `--baseline <file>`         | Compare the [budget](https://ismcpok.dev/docs/reference/mcp#budget) with a saved `tools/list`, and print what each tool added or removed.                                            |
| `--max-increase <n\|n%>`    | With `--baseline`: also exit `1` when the budget grew by more than `<n>` Claude tokens, or `<n>` percent.                                      |
| `--max-tokens <n>`          | Also exit `1` when the budget is over `<n>` Claude tokens.                                                                                     |
| `--summary <file>`          | Also append the result as Markdown to `<file>`, such as `"$GITHUB_STEP_SUMMARY"`. See [Show the result on GitHub](https://ismcpok.dev/docs/reference/mcp#show-the-result-on-github). |
| `--json`                    | Print the result as JSON, the same shape `POST /api/mcp` on ismcpok.dev answers.                                                               |
| `--format <name>`           | Print `text`, `agent`, `json` or `jsonl`. Without it, is-mcp-ok picks one for its reader. See [Output](https://ismcpok.dev/docs/reference/mcp#output).                               |
| `--full`                    | Print every finding with its docs link, past any limit.                                                                                        |
| `--max-chars <n>`           | Cut the `agent` output at `<n>` characters instead of 8,000.                                                                                   |
| `--quiet`                   | Leave the info findings, the budget and the answers out of the text output.                                                                    |
| `-h`, `--help`              | Print the help.                                                                                                                                |

The client ids are `claude-code`, `claude`, `claude-directory`, `chatgpt`, `codex`, `cursor`, `vscode`, `gemini-cli` and `copilot-studio`.

Without a harness target, an integer `exclusiveMinimum` or `$ref` in Copilot Studio is a standard-harness warning, not a failure across Copilot Studio. To fail CI on either finding for the standard harness, use `--client copilot-studio --copilot-studio-standard` with a CLI version that lists the flag in `npx is-mcp-ok --help`.

### Output

The output fits whoever reads it. `--format`, or the `IS_MCP_OK_FORMAT` environment variable, picks one format for every reader.

- **A person, a pipe or CI** gets text. The [budget and the answers](https://ismcpok.dev/docs/reference/mcp#budget-advice-and-answers) come first, then the verdict: the counts by severity, the server and how many tools and clients it checked. Then each finding gets one line with its code, its file, its tool and a short message, and each error and warning adds why it matters and its fix. `--full` adds the link to its code below. Last come `next:` lines, the commands worth running next, such as `--full` or `--call` for a server with read-only tools. On GitHub Actions, each finding of a checked file is also an annotation.
- **A coding agent**, such as Claude Code or Codex, gets `agent`: the verdict on line 1, then one line per finding with its fix, at most 8,000 characters. When findings don't fit, the last line counts what was cut and gives the command that prints it all. Set `AI_AGENT=0` to get text instead.
- `--json` includes the full findings, their backing client findings with source and evidence metadata, a client-by-tool matrix, and the `budget`, `advice` and `answers` sections. When the run fails before a report, it prints `{ "status": "failed", "error": { "message", "fix" } }` on stdout instead, and exits `2` or `3`.
- `--format jsonl` prints one JSON line per finding and ends with the report.

The rerun command never holds a token: it writes each URL as `<url>` and each header value as `<value>`.

## Sign in

Some servers answer 401 until you sign in with OAuth. You can sign in from ismcpok.dev or from the CLI. ismcpok.dev keeps the token in the tab's memory until you leave or reload the page, and the CLI keeps it for that one run. ismcpok.dev never sees it.

### On ismcpok.dev

When a server answers 401, [ismcpok.dev](https://ismcpok.dev/) looks for OAuth in the browser and shows a "Sign in to" button when it can sign in. If no OAuth metadata is found, you can pass a token to the CLI instead. Your browser runs the whole sign-in with the server and its authorization server, reads `tools/list` with the token, and checks it in the tab. The token stays in that tab's memory, never in storage, a cookie or the URL, so you can sample calls with it, and it is gone when you leave or reload the page. Neither the token nor the tool list goes to ismcpok.dev.

After you sign in, the authorization server sends your browser back to `ismcpok.dev` with a one-time authorization code in the URL. The page takes it out of the address bar straight away. The code is useless without the PKCE verifier, which never leaves the tab.

This works only when the server lets a web page call it (CORS). When it doesn't, the page offers CLI sign-in or a command to use a token you already have.

### With the CLI

```sh
npx is-mcp-ok https://mcp.example.com/mcp --login
```

is-mcp-ok first reads the server without a token, and signs in only if it answers 401. It listens for the callback on `127.0.0.1` port 33418, or on any free port when that one is taken, prints the sign-in link, and opens it in your browser when it runs in a terminal. Set `BROWSER=none` to only print the link. The token is used for that one run: the read, and with `--call` the calls in the same session. It is never printed or written to disk. If you decline the sign-in, or don't finish it within 5 minutes, the command exits with `3`. `--login` can't be combined with a file or an `Authorization` header.

### Client metadata

Authorization servers that support client ID metadata documents read is-mcp-ok's from these URLs:

- `https://ismcpok.dev/oauth/web-client.json` for the page, which redirects to `https://ismcpok.dev/`.
- `https://ismcpok.dev/oauth/cli-client.json` for the CLI, which redirects to `http://127.0.0.1:33418/callback` or `http://127.0.0.1/callback`.

Both clients require the authorization server to return a matching OAuth `iss` value before exchanging the code, including with dynamic registration. If the server doesn't send one, pass a token to the CLI with `--header "Authorization: Bearer $TOKEN"` instead. OAuth sign-in needs HTTPS for the MCP server, except for local loopback URLs.

## Check answers

`tools/list` says what a server offers. What its answers cost the model shows only in the calls a client makes. is-mcp-ok checks answers from a recorded session, from sample calls it makes itself, or one result at a time.

### A recorded session

A session is a `tools/list` file with the calls a client made:

```json [mcp-session.json]
{
  "initialize": {
    "protocolVersion": "2025-06-18",
    "serverInfo": { "name": "shop" },
    "instructions": "…"
  },
  "tools": [{ "name": "search_orders", "inputSchema": { "type": "object" } }],
  "calls": [
    {
      "name": "search_orders",
      "arguments": { "query": "late", "limit": 5 },
      "result": { "content": [{ "type": "text", "text": "…" }], "isError": false }
    }
  ]
}
```

`initialize` and `arguments` are optional. Each `result` is a `tools/call` result, or the JSON-RPC response that carries it, kept exactly as it came back: reformatted text changes what the checks measure.

```sh
npx is-mcp-ok mcp-session.json
```

Your coding agent is already connected to the server, so it can record the session with its own client. Paste it the prompt in [`docs/mcp-session-prompt.md`](https://github.com/words-with-agents/is-mcp-ok/blob/main/docs/mcp-session-prompt.md): it calls only tools marked read-only, runs the check, and walks you through the fixes.

### Sample calls

With a URL, `--call` makes the calls itself after `tools/list`, in the same MCP session, and checks each answer in memory. It saves nothing.

```sh
npx is-mcp-ok https://mcp.example.com/mcp --call samples.json
```

```json [samples.json]
[{ "name": "search_orders", "arguments": { "query": "late", "limit": 5 } }]
```

It calls only tools listed with `annotations.readOnlyHint: true`. Every other entry is named under "not called" with its reason: not in `tools/list`, not marked read-only, or the call failed, with the failure's kind and HTTP status. `--json` lists them in `refused` as `{ name, reason }`, without arguments or error text. Each call gets 30 seconds and the whole read 2 minutes. `--call` works with `--header` and `--login`, and not with a file, which records its calls in `calls`.

### One result

`is-mcp-ok <file> --tool <name>` checks one saved `tools/call` result, such as an answer your agent just got. Pass `-` to read it from stdin:

```sh
npx is-mcp-ok result.json --tool search_orders --tools tools.json
cat result.json | npx is-mcp-ok - --tool search_orders
```

`--tool` names the tool that answered. `--tools` takes the server's `tools/list` as JSON, in any form `is-mcp-ok <file>` reads. Without it, the checks that need the list are skipped: the [`uuid`](https://ismcpok.dev/docs/reference/mcp#uuid) cause, the tool's own result limits, and other tool names as a next step in an error. `--client` and the output options other than `--summary` work as for a server; `--json` prints one entry of `answers`. A URL and the other options of a server check are refused. It exits `1` when a client check warns on the result, `0` when none does, and `2` on invalid usage or input. Causes and advice never fail it.

### Answers on ismcpok.dev

ismcpok.dev doesn't take a recorded session: check one with `npx is-mcp-ok <file>`. `POST /api/mcp` rejects a body with `calls`.

After you [sign in](https://ismcpok.dev/docs/reference/mcp#on-ismcpokdev) to a server, choose **Preview sample calls** to review tool names and generated arguments without calling any tools. Read-only is the server's claim, not a guarantee. Select only calls you trust, then choose **Call selected tools**. The tab checks that the exact approved arguments still match the calling session's schema and skips schemas it cannot sample safely. It names skipped tools and explains why. The answers are checked in the tab and never reach ismcpok.dev. Without sign-in, ismcpok.dev reads only `tools/list` and never calls a tool.

## Diagnostic Codes

Severity reflects how serious and certain the reported problem is, not just what a client does. Tool exclusion or request failure can be a `warn` rather than an `error` when the failure is inferred. Use `--max-warnings 0` if you want either severity to fail CI.

### MCP0001

**Tools have no display title.** The tool has no non-empty string in `annotations.title`. Clients show the bare name instead. A top-level `title` isn't enough: Claude Code's transcript ignores it, and clients on the 2025-03-26 revision know only `annotations.title`. Anthropic's Connectors Directory review asks every tool for a title and flags tools without one. Add `title` to the tool's annotations.

### MCP0002

**Tools don't say whether they only read.** The Connectors Directory expects `readOnlyHint: true` for tools that only read or `destructiveHint: true` for tools that change or delete data. It warns if neither is `true`, including when both are `false`. ChatGPT separately asks users who select “Allow read-only tools” to confirm calls to tools without a boolean `readOnlyHint`. If the tool already declares `destructiveHint: true`, that prompt is expected. The ChatGPT finding alone is informational.

### MCP0003

**Tool names that clients reject.** The name is longer than 64 characters, or holds a character other than letters, digits, `_`, `-` and `.`. The Connectors Directory rejects it. Rename the tool.

### MCP0005

**Clients leave tools out.** A client leaves the tool or the whole server out, or the request fails, such as Claude Code with a schema that isn't valid draft 2020-12, or VS Code with one that isn't valid draft-07. This is the only code that is an `error`.

### MCP0006

**Clients cut long text.** A client cuts a description, the server's instructions, or the schema to a length limit. The message gives the measured length and the limit.

### MCP0007

**Clients rewrite names or schemas.** A client renames the tool, replaces an empty description, reads an `enum` as a string, or flattens the schema's root.

### MCP0008

**Clients drop schema rules.** A client drops a constraint a model can get wrong that no description states, shrinks a large schema, or deletes a root combinator. State the constraint in the property's description, or keep the schema small enough.

### MCP0009

**Clients shorten the server's instructions.** A client shows the model less of the server: no instructions under tool search, or fewer tools than the server sends.

### MCP0010

**Annotations aren't valid.** The tool's `annotations` are not an object, set `title` to something other than a string, set `readOnlyHint`, `destructiveHint`, `idempotentHint` or `openWorldHint` to something other than a boolean, or hold a serialized Zod schema (`_def`, `~standard`, `_zod`). The MCP TypeScript SDK's client rejects the whole `tools/list` response in the first two cases, which loses every tool on that page. A serialized schema is usually one passed where `server.tool()` expects annotations, and the tool then ships with an empty input schema. When MCP0010 reports a tool, MCP0001 and MCP0002 don't report its missing title and hints too.

MCP0004, indented JSON in tool output, needs the server's source, so `is-mcp-ok` doesn't report it as a code. In a recorded answer, the indentation seen on the wire is the [`indent`](https://ismcpok.dev/docs/reference/mcp#indent) cause.

## Budget, advice and answers

After the diagnostics, a report has three sections of is-mcp-ok's own: `budget`, `advice` and `answers`. Every rule in them is `info`, and none of them changes the exit code on its own. There are two exceptions: the budget fails a run over [a limit you set](https://ismcpok.dev/docs/reference/mcp#limit-the-budget), and a client check at `warn` on an answer's `clientFindings` fails it too, as [exit codes](https://ismcpok.dev/docs/reference/mcp#exit-codes) explain.

### Budget

`budget` is what `initialize` and `tools/list` cost in Claude tokens before any call. Each tool has a row: its description, its input schema, its output schema, and `total`, the whole tool entry without its output schema. The server's instructions get their own row, `instructions`, outside the tools' `total`. Output schemas are counted apart in `outputSchemas`, since whether clients send them to the model is unverified.

Tokens are characters divided by 2.4, the `ratio` in the report. The usual ÷ 4 fits OpenAI's o200k tokenizer, which measures 4.0 to 4.6 characters per token on `tools/list`. Claude 5.5 measures 1.75 to 2.9 characters per token on answers and 2.4 to 2.9 on `tools/list`, so ÷ 4 undercounts Claude by a quarter to a half. Opus, Sonnet and Haiku count the same. `claude-code/result-token-warning` keeps ÷ 4, because it copies Claude Code's own estimate.

#### Limit the budget

What a client sends the model before any call is the tools' `total` plus `instructions`. Two flags fail a run on it, as a bundle-size check does:

- `--max-tokens <n>` exits `1` when it is over `<n>` Claude tokens.
- `--max-increase <n|n%>` exits `1` when it grew by more than `<n>` tokens, or `<n>` percent, since a baseline: the last `tools/list` you accepted, saved as JSON. Pass it with `--baseline <file>`. Any file `is-mcp-ok <file>` reads works.

`--save <file>` writes what the CLI read from a server, `{ initialize, tools }`, as a baseline. Commit it, and a pull request's diff shows which descriptions and schemas changed. To accept a larger budget, run `--save` again and commit the file.

```sh
npx is-mcp-ok http://localhost:3000/mcp --save mcp-tools.json
npx is-mcp-ok http://localhost:3000/mcp --baseline mcp-tools.json --max-increase 5%
```

With `--baseline`, the text output adds each tool added, removed or whose estimated cost changed, and `--json` adds `budgetDiff`: `before`, `after`, `delta` and `share` of the budget, the `instructions` before and after, and the same tool changes. Both sides are measured with the CLI that runs, so a new ratio never shows as a change. Tool rows are rounded separately, while the tools total is rounded after adding up characters. Edits can leave individual estimates unchanged but still move the total.

```text
budget vs mcp-tools.json: 1930 → 2174, +244 Claude tokens (+12.6%)
                           before  after  change
  ask_wiki_question (new)       –    244    +244
  2 tools unchanged
```

### Advice

`advice` holds the `list/*` rules on `initialize` and `tools/list`.

| Rule                       | Reported when                                                                                                     | Fix                                                                                   |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `list/no-instructions`     | The list has an `initialize` result without `instructions`. A list without `initialize` isn't checked.            | Add instructions: what the server is for, and which tool to call first.               |
| `list/description-no-when` | A tool's description never says when to use it, such as "Use this when …" or "call it before …".                  | Name the request or step the tool fits, and the tool to call before or after it.      |
| `list/output-dotted-keys`  | The output schema has property names with dots, which read like paths into nested objects.                        | Nest the object, or rename the keys without dots.                                     |
| `list/output-mixed-keys`   | The output schema mixes key styles: snake_case, camelCase and kebab-case.                                         | Spell every output key in one style, the one the input parameters use.                |
| `list/output-open-object`  | The output schema has an object with no `properties`, no `patternProperties` and no typed `additionalProperties`. | List its properties, or type its values with `additionalProperties` when it is a map. |
| `list/concept-spellings`   | Two or more tools spell one input parameter different ways, such as `orderId` and `order_id`.                     | Give the parameter one spelling in every tool.                                        |

### Answers

`answers` has one entry per call, in order: the tool, `isError`, and the answer's size in `chars` and `tokens`. The size is the text items joined by line breaks, or the structured content when there is no text. Answer text counts at 2.2 characters per token, the median of the recorded answers. Each entry also has `clientFindings`, what each client does with the result, the same findings `checkMcpToolResult` returns.

`causes` says what in the answer the model could do without. Causes are read from JSON: each text item that holds a JSON object or array, or the structured content when there is no text. An error answer, or one that isn't JSON, has none.

| Cause                                 | What it counts                                                                                                                                                                      | Tokens at |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| [`constant-column`]{#constant-column} | In an array of three or more objects, a field with the same value in every row. Removing it keeps the field in the first row only.                                                  | 2.2       |
| [`null`]{#null}                       | Every empty value of a field: `null`, `""`, `[]` and `{}`, with its key.                                                                                                            | 2.2       |
| [`uuid`]{#uuid}                       | Fields holding a UUID, or a list of them, when no listed tool takes an id back: no `format: "uuid"`, UUID `pattern` or property named like `id` or `orderId`. Needs the tools list. | 1.5       |
| [`color`]{#color}                     | Fields holding a CSS color: hex, `rgb()` or `hsl()`.                                                                                                                                | 2.2       |
| [`dotted-prefix`]{#dotted-prefix}     | Key prefixes such as `order.customer.` that two or more keys share, or that appear three or more times. Removing one strips it, or nests its keys under it when names would clash.  | 2.0       |
| [`decimals`]{#decimals}               | Numbers with more than four decimals, rounded to two, or to two significant digits below 1.                                                                                         | 2.2       |
| [`midnight`]{#midnight}               | Timestamps at `T00:00:00` under a key where every timestamp is at midnight, so the key could hold dates.                                                                            | 2.2       |
| [`indent`]{#indent}                   | Indentation and line breaks in pretty-printed JSON text: what each item loses when sent compact. MCP0004 on the wire.                                                               | 3.4       |

Each cause has its `chars`, `tokens`, `count` (how many places), `share` of the answer's tokens and, when every one is identifier-like, the `keys` it appears under. Each cause is measured on its own against the whole answer, so causes overlap and their shares don't add up. `removable` applies every cause in sequence, in the order above with `indent` last, and measures what that removes together. It is never the sum of the causes, and never more than the answer.

Each answer's `advice` holds the `answer/*` rules:

| Rule                              | Reported when                                                                                                                                                                                                                                     | Fix                                                                                                                                                         |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `answer/raw-http-error`           | The answer passes on an HTTP failure as the backend sent it, such as `Request failed with status code 500`, `[404] Not Found`, an HTML error page or a JSON error body, and names no next step. `status` holds the HTTP status when there is one. | Catch the failed request in the tool and say what went wrong in the tool's terms: the argument to change, the tool to call first, or whether a retry helps. |
| `answer/error-no-next-step`       | An answer with `isError: true` names no next step: no word such as "retry", "use", "valid values" or "did you mean", and no other listed tool.                                                                                                    | Say what to do next: the valid values, the argument to change, the tool to call first, or whether a retry helps.                                            |
| `answer/text-structured-mismatch` | `structuredContent` holds keys the text leaves out, so a client that shows the model only the text loses them. Paging keys, such as `nextCursor` or `hasMore`, come first, since without them the model never learns there is more.               | Put every key the model needs in the text too, paging keys first, or make the text the JSON of `structuredContent`.                                         |

An answer not marked `isError` counts as a raw HTTP error only when the failure is all its text.
A bracketed status like `[404]` is not enough on its own: it could be an ID in a successful answer.

### What a report holds

The `budget`, `advice` and `answers` sections hold counts, rule ids, JSON pointers into the tool or the answer, and key names that look like identifiers: at most 64 characters, not a UUID or a number. When any key in a group doesn't look like one, the report gives only its `count`. A report never holds a value from an answer, the arguments of a call, or the text of an error.

## Exit codes

| Code | Meaning                                                                                                                                                            |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `0`  | No `error` diagnostics, no client check warns on an answer, and the run is within any `--max-warnings`, `--max-tokens` or `--max-increase` limit.                  |
| `1`  | At least one `error` diagnostic, a client check at `warn` or `error` on an answer, more warnings than `--max-warnings` allows, or a budget over its limit.         |
| `2`  | A bad flag, a file that can't be read, or a file that isn't a `tools/list` or a session.                                                                           |
| `3`  | is-mcp-ok can't read the server: the connection fails, it answers 401, or it returns an error. A `--login` sign-in declined or not finished in time exits `3` too. |

`info` never affects the exit code, and neither do the advice or an answer's causes. The budget affects it only over `--max-tokens` or `--max-increase`. A sample call that fails or isn't made doesn't either. Without `--max-warnings`, diagnostic warnings alone don't fail a run.

An answer's client checks fail it at `warn`. None of them is an `error`: the client still gets the answer, but cuts it, saves it to a file, or drops the part the model needed. A warning there is the failure worth catching, so a run, or a test, that checks answers fails on it.

## Run in CI

There is no GitHub Action to install. Add a step to your own workflow that runs the CLI: it exits `1` when the check fails, which fails the job (see [Exit codes](https://ismcpok.dev/docs/reference/mcp#exit-codes)). The same step works in any CI with Node.js 22.12 or later.

Run the CLI in one of two ways:

- **As a dev dependency.** Install it with `pnpm add -D is-mcp-ok`, then run `pnpm exec is-mcp-ok` in the workflow. The lockfile pins the version, and Renovate or Dependabot updates it.
- **With `npx`, with nothing to install.** Pin a version, such as `npx is-mcp-ok@0.1.1`. Otherwise a new release can change the result when your code hasn't changed.

The CLI needs a `tools/list` to read. Where it reads one depends on how your server runs:

| Your server                                  | What to pass the CLI                                            |
| -------------------------------------------- | --------------------------------------------------------------- |
| One the job starts, such as a dev server     | [Its local URL](https://ismcpok.dev/docs/reference/mcp#a-server-the-job-starts)                       |
| A deployed one, such as a preview or staging | [Its URL, with a token from a secret](https://ismcpok.dev/docs/reference/mcp#a-deployed-server)       |
| A stdio server, or one the job can't reach   | [A file with its `tools/list`](https://ismcpok.dev/docs/reference/mcp#a-stdio-server-or-a-saved-list) |

Pass `--max-warnings 0` to fail on warnings too, `--baseline` with `--max-increase` to [fail when the tools list grows](https://ismcpok.dev/docs/reference/mcp#fail-when-the-tools-list-grows), and `--summary` to [show the result on GitHub](https://ismcpok.dev/docs/reference/mcp#show-the-result-on-github).

### A server the job starts

Start the server in the background, wait until it answers, then check it:

```yaml [.github/workflows/checks.yml]
- run: pnpm install --frozen-lockfile
- name: Check the MCP server
  run: |
    nohup pnpm dev --port 3000 > dev.log 2>&1 &
    for i in $(seq 1 60); do curl -sf -o /dev/null http://localhost:3000/ && break; sleep 1; done
    pnpm exec is-mcp-ok http://localhost:3000/mcp --max-warnings 0
```

### A deployed server

Pass its token from a secret. The token is sent to the server only and is never printed:

```yaml [.github/workflows/checks.yml]
- name: Check the staging MCP server
  run: npx is-mcp-ok@0.1.1 https://staging.example.com/mcp --header "Authorization: Bearer $MCP_TOKEN" --max-warnings 0
  env:
    MCP_TOKEN: ${{ secrets.MCP_TOKEN }}
```

### A stdio server, or a saved list

The CLI reads Streamable HTTP only. To check a stdio server, write its `tools/list` to a file with the MCP Inspector's CLI, which starts the server, prints the list as `{ tools }` and stops it. Then check the file:

```yaml [.github/workflows/checks.yml]
- run: pnpm install --frozen-lockfile && pnpm build
- name: Check the MCP server
  run: |
    npx -y @modelcontextprotocol/inspector --cli node dist/index.js --method tools/list > tools.json
    pnpm exec is-mcp-ok tools.json --max-warnings 0
```

A list your own tooling writes works too: the CLI reads a tools array, `{ tools }`, `{ initialize, tools }` or a JSON-RPC `tools/list` response.

### Fail when the tools list grows

Install and lock a version of `is-mcp-ok` whose `--help` lists `--save`, `--baseline`, and `--max-increase` (0.1.1 does not support them). Commit a baseline once, from a server you run locally:

```sh
pnpm exec is-mcp-ok http://localhost:3000/mcp --save mcp-tools.json
```

Then compare each pull request with it. The step fails when the [budget](https://ismcpok.dev/docs/reference/mcp#limit-the-budget) grew by more than 5%:

```yaml [.github/workflows/checks.yml]
- name: Check the MCP server
  run: pnpm exec is-mcp-ok http://localhost:3000/mcp --baseline mcp-tools.json --max-increase 5%
```

When the growth is intended, run `--save` again and commit `mcp-tools.json` in the pull request. This works in forks and needs no token.

To compare with production instead, use the same installed CLI to save its list in one step and check the pull request's server in the next:

```yaml [.github/workflows/checks.yml]
- run: pnpm exec is-mcp-ok https://example.com/mcp --save base.json
- run: pnpm exec is-mcp-ok http://localhost:3000/mcp --baseline base.json --max-increase 5%
```

### Show the result on GitHub

`--summary <file>` appends the result as Markdown to `<file>`: the verdict, a table of the findings with a link to each code, the budget and, with `--baseline`, what each tool added. It holds no more than the text output: never a header, a token or the URL's path. Each table stops at 50 rows and counts the rest, and long fields are shortened. If the CLI can't generate a report, the summary gives a short failed verdict without error details and the CLI keeps its original exit code.

To show it on the run's summary page, pass the file GitHub Actions gives each step:

```yaml [.github/workflows/checks.yml]
- name: Check the MCP server
  run: pnpm exec is-mcp-ok http://localhost:3000/mcp --baseline mcp-tools.json --max-increase 5% --summary "$GITHUB_STEP_SUMMARY"
```

To post it on the pull request, write it to a file and let a comment action post it. This uses [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment), a third-party action that edits its one comment on each run. It needs `pull-requests: write`, which a pull request from a fork doesn't get, so the summary page is the one that works everywhere:

```yaml [.github/workflows/checks.yml]
permissions:
  contents: read
  pull-requests: write
steps:
  # …start the server as above
  - name: Check the MCP server
    id: mcp-check
    run: |
      summary=$(mktemp "$RUNNER_TEMP/is-mcp-ok.XXXXXX")
      status=0
      pnpm exec is-mcp-ok http://localhost:3000/mcp --baseline mcp-tools.json --max-increase 5% --summary "$summary" || status=$?
      if [ -s "$summary" ]; then
        printf 'summary=%s\n' "$summary" >> "$GITHUB_OUTPUT"
      fi
      exit "$status"
  - if: ${{ !cancelled() && github.event_name == 'pull_request' && steps.mcp-check.outputs.summary != '' }}
    uses: marocchino/sticky-pull-request-comment@v2
    with:
      header: is-mcp-ok
      path: ${{ steps.mcp-check.outputs.summary }}
```

`!cancelled()` lets the comment step run after a failed check, but it posts only if the check wrote a summary. Pin the action to a commit SHA, as for any third-party action.

## Check tools in your own tests

The checks come from `is-mcp-ok`, so an end-to-end test can run them on what the server returns, including each `tools/call` result, which `is-mcp-ok` never calls. `checkMcpToolList` returns the diagnostics above. `checkMcpClientLimits` and `checkMcpToolResult` return the client findings, each with the client, the rule, a message, a fix and its source:

Call each page's tools before listing the next page: `listTools` replaces the SDK's cached `outputSchema` validators. Keep the full list for checks that depend on the total tool count.

```ts [tests/e2e/mcp.spec.ts]
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { checkMcpClientLimits, checkMcpToolResult, formatMcpFindings } from "is-mcp-ok";
import { expect, test } from "vitest";
import { sampleArguments } from "./mcp-arguments";

test("every client gets every tool intact", async () => {
  const client = new Client({ name: "e2e", version: "1.0.0" });
  await client.connect(new StreamableHTTPClientTransport(new URL("http://localhost:3000/mcp")));
  const tools = [];
  let cursor: string | undefined;

  do {
    const page = await client.listTools(cursor === undefined ? undefined : { cursor });
    tools.push(...page.tools);
    for (const tool of page.tools) {
      const result = await client.callTool({
        name: tool.name,
        arguments: sampleArguments[tool.name],
      });
      expect(formatMcpFindings(checkMcpToolResult(result, { tool }))).toBe("");
    }
    cursor = page.nextCursor;
  } while (cursor !== undefined);

  expect(formatMcpFindings(checkMcpClientLimits({ tools }, { serverName: "portal" }))).toBe("");
});
```

`formatMcpFindings` prints every finding at `warn` or `error` as text, the worst first, and an empty string when there is none, so a failing test shows each finding's rule, tool, message and fix instead of a JSON diff:

```text
warn codex/structured-content-replaces-text search_orders at /structuredContent
  When Codex calls MCP tools directly (…), it sends the model only `structuredContent` as JSON, …
  fix: Put everything the model needs in `structuredContent`, or make the text content the same JSON.
  source: https://github.com/openai/codex/…
```

Fail a test on `warn`, not only on `error`. No check of an answer is an `error`, because the client still gets the answer, so a test that fails only on errors checks no answer at all. Pass `{ severity: "info" }` to print info too. `formatMcpFindings` also takes what `checkMcpToolList` returns, one `checkMcpAnswer`, or a whole `mcpReport`, where it names each answer's tool and call.

Pass `clients: ["claude-code", "vscode"]` to check only the clients you support, and `codes` to `checkMcpToolList` to report only some codes. `mcpReport` returns what `is-mcp-ok --json` prints, without `source` and `endpoint`. `checkMcpAnswer({ name, arguments, result }, { tool, tools })` returns one entry of its `answers`, so a test can check each answer's causes and advice too.

## What each client is checked for

| Client                           | What is checked                                                                                                                                                                              | Source                                                                                                                                                                                                                                                                                                     |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Claude Code                      | Full name length, top-level property names, draft 2020-12 schema, root combinators, description and instruction length, missing instructions; result size, error length and estimated tokens | [Claude Code MCP docs](https://code.claude.com/docs/en/mcp), [Claude Code 2.1.332](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.1.332), [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk/blob/3b73021a0a2272c0c04c3917bcdb03398b3ec63f/src/types.ts#L1389-L1393) |
| Claude                           | Result size                                                                                                                                                                                  | [Connector building docs](https://claude.com/docs/connectors/building#design-within-the-size-and-timeout-limits)                                                                                                                                                                                           |
| Anthropic's Connectors Directory | Name length, `annotations.title`, safety hints (reported as MCP0001 to MCP0003)                                                                                                              | [Review criteria](https://claude.com/docs/connectors/building/review-criteria), [submission checklist](https://claude.com/docs/connectors/building/submission#pre-submission-checklist-for-connectors)                                                                                                     |
| ChatGPT                          | `readOnlyHint` on a tool not marked destructive, which users who allow only read-only tools must confirm (evidence on MCP0002)                                                               | [Custom MCP server docs](https://developers.openai.com/api/docs/guides/developer-mode)                                                                                                                                                                                                                     |
| Codex                            | Name characters and length, dropped constraints, schema size; `structuredContent` in results                                                                                                 | [openai/codex source](https://github.com/openai/codex/tree/ebd0765aafa255d63ebf690ebdffe0164dc14a0c/codex-rs), [Codex 0.172.0](https://github.com/openai/codex/tree/3d86e43b075adeba2193ec5c22ac92f55afd82e6/codex-rs)                                                                                     |
| Cursor                           | Name length; results with only `structuredContent`                                                                                                                                           | [Cursor forum](https://forum.cursor.com/t/posthog-mcp-tool-names-too-long/155408/6)                                                                                                                                                                                                                        |
| VS Code                          | Draft-07 schema, arrays without `items`, root combinators, descriptions, tool count, names, gpt-4\* description length and constraints; `structuredContent` in results                       | [microsoft/vscode source](https://github.com/microsoft/vscode/tree/24bc9d5278687dbdd90e8013b93e1daac453ae2b)                                                                                                                                                                                               |
| Gemini CLI                       | Name characters and length                                                                                                                                                                   | [google-gemini/gemini-cli source](https://github.com/google-gemini/gemini-cli/blob/08e9a20f749aefcbda38622ac757899c3d6216e0/packages/core/src/tools/mcp-tool.ts)                                                                                                                                           |
| Copilot Studio                   | `$ref`, numeric `exclusiveMinimum`, type arrays, `enum` (documented for the standard harness; numeric `exclusiveMinimum` worked on the Microsoft Copilot harness)                            | [Copilot Studio MCP troubleshooting](https://learn.microsoft.com/en-us/microsoft-copilot-studio/mcp-troubleshooting#known-issues-and-workarounds)                                                                                                                                                          |

Each finding in `--json` cites its client's source by URL with the date it was checked.

## Tested in clients

In `--json`, a finding's top-level `variant` names the client variant the rule applies to, even for documented findings. `observed.variant`, when present, names the variant used in the confirming test.

The table lists rules tested in real clients. A finding in `--json` has `evidence: "observed"` and an `observed` version and date when a test confirmed its rule, and `evidence: "documented"` when only the source backs it. A rule that holds in one variant of a client, such as Codex calling tools directly, counts only a test in that variant. "Not reproduced" means the client didn't do what the rule says in that test: Claude Code's token warning shows only in the interactive transcript, which wasn't tested, and the other two ran in a variant the rule doesn't cover.

| Rule                                       | Client                                    | Version, date       | Outcome        |
| ------------------------------------------ | ----------------------------------------- | ------------------- | -------------- |
| `claude-code/tool-name-length`             | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/property-name`                | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/schema-draft-2020-12`         | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/root-combinator-without-type` | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/root-combinator`              | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/description-length`           | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/instructions-length`          | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/missing-instructions`         | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/result-saved-to-file`         | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/error-result-truncated`       | Claude Code                               | 2.1.332, 2026-11-30 | Confirmed      |
| `claude-code/result-token-warning`         | Claude Code                               | 2.1.332, 2026-11-30 | Not reproduced |
| `codex/schema-size`                        | Codex                                     | 0.172.0, 2026-11-30 | Confirmed      |
| `codex/dropped-constraints`                | Codex                                     | 0.172.0, 2026-11-30 | Confirmed      |
| `codex/name-characters`                    | Codex                                     | 0.172.0, 2026-11-30 | Confirmed      |
| `codex/name-length`                        | Codex                                     | 0.172.0, 2026-11-30 | Confirmed      |
| `codex/structured-content-replaces-text`   | Codex, direct calls                       | 0.172.0, 2026-11-30 | Confirmed      |
| `codex/structured-content-replaces-text`   | Codex, code mode                          | 0.172.0, 2026-11-30 | Not reproduced |
| `gemini-cli/name-characters`               | Gemini CLI                                | 0.71.1, 2026-11-30  | Confirmed      |
| `gemini-cli/name-length`                   | Gemini CLI                                | 0.71.1, 2026-11-30  | Confirmed      |
| `copilot-studio/numeric-exclusive-minimum` | Copilot Studio, Microsoft Copilot harness | 2026-11, 2026-11-30 | Not reproduced |

## Fixtures

Every client rule has a public MCP server on ismcpok.dev that carries that one problem, so you can see what a client really does with it:

```txt
https://ismcpok.dev/api/fixtures/mcp/<client>/<rule>
```

`<client>/<rule>` is the rule id from `--json`, such as `vscode/tool-count` or `claude-code/error-result-truncated`. `https://ismcpok.dev/api/fixtures/mcp/control` serves only the clean tool, for a baseline. `https://ismcpok.dev/api/fixtures/mcp/answers` serves a demo shop for the answer checks: the read-only `search_orders` answers pretty-printed JSON with nulls, a constant column and UUIDs no tool takes back, and `cancel_order` isn't read-only.

Each fixture serves `probe_control`, a clean tool with one required integer `x`, and a probe tool with the problem, usually `probe_<rule>`. A rule about names puts the problem in the probe's name instead, and a rule about the whole server, such as tool count or instructions, puts it in the server. Calling any tool echoes `{ tool, arguments }`: the wire name and arguments that reached the server, not what the model saw. On a rule about results, calling the probe returns the problem result, which ends in `LOADSHEET_SENTINEL_END`. Results probing head-and-tail truncation also carry `LOADSHEET_SENTINEL_MIDDLE` halfway.

To test a client:

1. Add the fixture URL as a Streamable HTTP server. It needs no auth and keeps no session.
2. Ask the agent to call the probe with `x=1`, then `probe_control` with `x=1`.
3. Check the observation that matches the rule:
   - Dropped tool or failed server: look at the client's tool list for a missing probe, and at its connection status or logs for a failed server. A call that fails or waits for confirmation proves neither: ChatGPT, for example, lists `probe_missing_read_only_hint` but asks before calling it when the plugin's permissions are set to "Allow read-only tools". The default, "Allow low-risk tools", runs it without asking, so set that permission before testing that rule. Record a blocked call as blocked, and treat it as inconclusive when the tool list and connection status aren't visible.
   - A warning shown to the user: some rules, such as `claude-code/result-token-warning`, change only what the client shows, not what the model gets. Both markers arrive intact, so check the client's transcript or UI for the warning.
   - Renamed tool or rewritten schema: the echo can't show these, since a client can rename a tool for the model and still send the original name. Look at the tool name and schema the client shows: its debug output, its tool list, or ask the agent to quote the tool's name and schema exactly as it was given.
   - Cut result: check that both `LOADSHEET_SENTINEL_MIDDLE` and `LOADSHEET_SENTINEL_END` arrived when both were sent. A client that keeps the head and the tail keeps the end marker and drops the middle one.

The fixture handler writes no logs, counters or storage. ismcpok.dev's hosting keeps its standard request logs (method, URL, status), as for any other request to the site.

<!-- vitehub-docs:section-links -->
## In this section

- [Reference](https://ismcpok.dev/raw/docs/reference.md)
- [MCP servers](https://ismcpok.dev/raw/docs/reference/mcp.md) (this page)

All pages: [llms.txt](https://ismcpok.dev/llms.txt)
