> ## Documentation Index
> Fetch the complete documentation index at: https://docs.specpilot.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Turn it on or off

> The MCP endpoint is on whenever the App runs. Turn it off, limit it to reading, or keep its token across restarts.

## On by default

`specpilot serve` serves the MCP endpoint. The terminal prints three lines for it:

```text theme={null}
MCP endpoint: http://127.0.0.1:4321/mcp
Claude Code (.mcp.json): {"mcpServers":{"specpilot-local":{...}}}
Other IDEs: Connect Your AI IDE on the page gives each one's file.
```

## Turn it off

```bash theme={null}
specpilot serve --no-mcp
```

Home then has no Connect Your AI IDE card, and the Setup view says the server was started with `--no-mcp`. Restart with `specpilot serve` to turn it back on. `--mcp` is still accepted and changes nothing.

## Read only

```bash theme={null}
specpilot serve --read-only
```

Your agent gets four tools: `specpilot_list_projects`, `specpilot_read_spec`, `specpilot_list_tasks` and `specpilot_validate_specs`. It can't write tasks, regenerate commands or set up a folder. The terminal line says `(read tools only)`.

## Keep the token

`serve` makes a new token every time it starts, so your IDE config stops working after a restart. To keep the same token, set `SPECPILOT_MCP_TOKEN` in the environment of both `serve` and your IDE:

```bash theme={null}
export SPECPILOT_MCP_TOKEN="$(openssl rand -hex 32)"
specpilot serve
```

The token must be at least 32 characters, with no spaces. If it isn't, `serve` stops with an error. With the variable set, the config reads the variable instead of holding the token.

> [!WARNING]
>
> Treat the token like a password. Keep config files that hold it out of git.

## Another port

`--port <number>` moves the endpoint too. Copy the config again after you change it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.