# marmot mcp (/docs/commands/mcp)

<!-- Generated by scripts/gen.mjs from `marmot mcp --help` and scripts/commands.mjs. Do not edit by hand. -->

Speak the Model Context Protocol on stdin and stdout, exposing build, run, test, fix and explain as tools that return marmot's JSON diagnostics. Register it with an agent, for example: claude mcp add marmot -- marmot mcp

```text title="Usage"
marmot mcp [flags]
```

## Examples [#examples]

```sh
marmot mcp
```

`marmot mcp` is a Model Context Protocol server on stdin and stdout. Its tools `build`, `run`,
`test`, `fix` and `explain` take a directory and return the [JSON output](/docs/diagnostics/json)
that marmot writes in agent mode.

To register it with Claude Code:

```sh
claude mcp add marmot -- marmot mcp
```

Agents that run marmot as a plain command get JSON too: when a coding agent's environment
variable is set, JSON is the default output. See [Diagnostics](/docs/diagnostics).

## Flags [#flags]

Flags take one dash or two: `-release` and `--release` are the same.

| Flag | Meaning |
| --- | --- |
| `-timeout string` | time limit of one tool call (default "5m0s") |

## Full help [#full-help]

```text title="marmot mcp --help"
Speak the Model Context Protocol on stdin and stdout, exposing build, run, test, fix and explain as tools that return marmot's JSON diagnostics. Register it with an agent, for example: claude mcp add marmot -- marmot mcp

Usage:
  marmot mcp [flags]

Examples:
marmot mcp

Flags:
  -h, --help             help for mcp
      --timeout string   time limit of one tool call (default "5m0s")
```