> ## 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.

# Connecting your agent

> Expose canonic's capabilities to an agent client over MCP.

canonic exposes its capabilities to agent clients through a **local, on-demand MCP server**: no always-on hosted service. Verified with **Claude Code, Cursor, and Codex**.

## 1. Start the daemon

The daemon binds locally and reads your committed context (semantics, knowledge, contracts):

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

See [`canonic mcp`](/cli-reference/mcp) for the full flag reference, including `--http` for a background daemon on a fixed host/port.

## 2. Register canonic in your client's MCP config

A standard MCP server entry, for example:

```json theme={null}
{
  "mcpServers": {
    "canonic": {
      "command": "canonic",
      "args": ["mcp", "start"]
    }
  }
}
```

See your client's own docs for the exact config file location; Claude Code, Cursor, and Codex each load standard MCP configuration.

If you started the daemon with `--http` (see [`canonic mcp`](/cli-reference/mcp)), point your client at the HTTP endpoint instead of spawning a process:

```json theme={null}
{
  "mcpServers": {
    "canonic": {
      "url": "http://127.0.0.1:7474/mcp"
    }
  }
}
```

Adjust the host/port to match the `--host`/`--port` flags used to start the daemon.

## 3. Your agent now has these tools

See [Tools reference](/mcp-integration/tools-reference) for the full list and payload shapes.

Every answer-producing tool returns the **metadata band** alongside the result; resolved definition, guardrails fired, freshness, final/provisional; so the agent can caveat honestly. On ambiguity or a blocked guardrail, the tool returns the candidates or the rationale instead of a guess, and the agent is expected to relay that rather than fabricate an answer.
