# Coding agents

With the [preview CLI](https://ismcpok.dev/docs/guide/installation#try-the-preview-cli), a coding agent gets a compact report: 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. npm `0.1.1` doesn't have this format.

```sh
pnpm exec is-mcp-ok http://localhost:3000/mcp
```

is-mcp-ok picks this `agent` format when Claude Code, Codex or another known agent runs it. `--max-chars <n>` moves the limit, and `AI_AGENT=0` or `--format text` gives the agent the full text instead. The rerun command it prints never holds a token: each URL reads `<url>` and each header value `<value>`.

## The loop

1. Run `npx is-mcp-ok <url or file>`.
2. Fix each `error` and `warn` finding as its `fix` says, one at a time.
3. Run it again until it exits `0`. Add `--max-warnings 0` to hold warnings to the same bar.

Some fixes only the server's author can decide, such as whether a tool only reads. MCP0002's fix says so: ask before setting `readOnlyHint` or `destructiveHint`.

## Record a session

Your agent is already connected to the server, so it can record what its answers cost 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). The agent:

- writes `mcp-session.json` from what its client received, never invented,
- calls only tools marked `readOnlyHint: true`, and one lookup with an id that doesn't exist, to see an error answer,
- runs `npx is-mcp-ok mcp-session.json --json` and walks you through the [answers](https://ismcpok.dev/docs/guide/answers),
- offers fixes one at a time and applies only those you accept.

The session holds real answers. Keep it out of commits.

## Markdown docs

Every page on this site has a raw Markdown copy, and `/llms.txt` lists them all.

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

- [Introduction](https://ismcpok.dev/raw/docs/guide.md)
- [Installation](https://ismcpok.dev/raw/docs/guide/installation.md)
- [Check a server](https://ismcpok.dev/raw/docs/guide/servers.md)
- [Check answers](https://ismcpok.dev/raw/docs/guide/answers.md)
- [Token budget](https://ismcpok.dev/raw/docs/guide/budget.md)
- [Run in CI](https://ismcpok.dev/raw/docs/guide/ci.md)
- [Check tools in your tests](https://ismcpok.dev/raw/docs/guide/testing.md)
- [Coding agents](https://ismcpok.dev/raw/docs/guide/agents.md) (this page)

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