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

# canonic mcp

> Control the local MCP daemon.

`canonic mcp` starts, stops, and reports on the local MCP daemon that exposes canonic's capabilities to agent clients. See [Connecting your agent](/mcp-integration/connecting-your-agent) for the client-side setup.

## `mcp start`

Start the local MCP daemon.

```bash theme={null}
canonic mcp start
canonic mcp start --http --port 7474
```

| Flag              | Description                                                               |
| ----------------- | ------------------------------------------------------------------------- |
| `--project`, `-p` | Path to the canonic project root (overrides the cwd walk).                |
| `--http`          | Start as a background HTTP daemon instead of the default stdio transport. |
| `--port`          | Port for the HTTP daemon (default `7474`).                                |
| `--host`          | Host for the HTTP daemon (default `127.0.0.1`).                           |
| `--suggestions`   | Enable follow-up suggestions in query responses.                          |

Without `--http`, the daemon runs in the foreground over stdio; the MCP client manages its process lifetime. With `--http`, it forks a background uvicorn daemon bound to the given host/port.

On first start in a project with no active metric contracts, canonic auto-generates inferred metric contracts from the loaded semantic sources before serving.

## `mcp stop`

Stop the background MCP daemon.

```bash theme={null}
canonic mcp stop
```

## `mcp status`

Report whether the MCP daemon is running.

```bash theme={null}
canonic mcp status
```

Shows the PID, transport, address (for HTTP), version, and start time. Warns if the running daemon's version differs from the current CLI version; in which case, restart it with `canonic mcp stop && canonic mcp start`.
