Skip to main content
canonic mcp starts, stops, and reports on the local MCP daemon that exposes canonic’s capabilities to agent clients. See Connecting your agent for the client-side setup.

mcp start

Start the local MCP daemon.
With --transport stdio (the default), the daemon runs in the foreground over stdio, and the MCP client manages its process lifetime. There’s no auth layer, since a local subprocess is inherently process-trusted. If a tenancy policy is active, a stdio session has no per-request auth to derive a principal from, so --tenant <id> must be passed explicitly. With --transport http, it forks a background uvicorn daemon bound to the given host/port using Streamable HTTP. Because the daemon becomes network-reachable, it requires at least one auth mechanism: a bearer token, OAuth 2.1, or both. Configure mcp.auth.tokens and/or mcp.auth.oauth in canonic.yaml:
or pass --token-ref env:SOME_VAR for a quick one-off token. Starting --transport http with neither configured is a hard error. Token clients authenticate with Authorization: Bearer <token>. OAuth clients complete the IdP’s login flow (proxy mode) or present an IdP-issued JWT directly (jwt mode). Either way the resolved client_id (a token’s configured name, or the OAuth subject/email) is recorded on every query/run_sql answer event for per-user attribution. See the config schema reference for the full oauth field list, and Connecting your agent for the deployment walkthrough. On first start in a project with no active metric contracts, canonic auto-generates inferred metric contracts from the loaded semantic sources before serving.

Health endpoints

The http daemon serves two unauthenticated probe endpoints next to /mcp, for orchestrators such as Kubernetes. Both endpoints skip the auth layer on purpose, so a probe needs no token. They expose only the status and the canonic version. /readyz is deliberately shallow: it makes no connector or warehouse call, so probes never generate warehouse traffic. The stdio transport has no HTTP surface and no probes. Example Kubernetes probes for a daemon listening on port 7474:
In a container, start the daemon with canonic mcp start --transport http --host 0.0.0.0 --foreground. Without --foreground the command detaches and returns, so the container would exit right after starting. --host 0.0.0.0 lets the probes reach the pod IP. The official image ships a Docker HEALTHCHECK that calls /livez on port 7474.

mcp stop

Stop the background MCP daemon.

mcp status

Report whether the MCP daemon is running.
Shows the PID, transport, address and auth state (for HTTP, which mechanism(s) are active, e.g. token, oauth-proxy), the canonic version, the FastMCP version the daemon runs, and the start time. Warns if the running daemon’s version differs from the current CLI version. In that case, restart it with canonic mcp stop && canonic mcp start.