# MCP Canary > Synthetic monitoring for MCP servers. A coding agent installs one native binary (`canary`) and sets up checks with shell commands only: no browser, no signup, no login, no runtime. A check connects to an MCP endpoint (Streamable HTTP or legacy HTTP+SSE), lists the tools, optionally calls one read-only tool, and evaluates assertions on the result. Scheduled checks open incidents and send email alerts and signed webhooks. `canary monitor test` is a CI gate with stable exit codes. ## Install - macOS / Linux: `which canary || curl -fsSL https://mcpcanary.com/install.sh | sh` - Windows PowerShell: `irm https://mcpcanary.com/install.ps1 | iex` - If the installer says the directory is not on PATH, run `export PATH="$HOME/.local/bin:$PATH"` or call `~/.local/bin/canary`. ## Set up a monitor 1. `canary inspect --json` lists tools with `side_effects`: `read_only`, `possibly_mutating`, `explicitly_mutating`, `unknown`. It never calls a tool. `agent_readiness` grades the server (A-F) and lists findings (`rule`, `severity`, `tool`, `message`, `fix`, `example`); if you own the server code, apply the fixes. 2. Pick a `read_only` tool and arguments with a deterministic answer: a known record that exists only in production. Assert two or more of its fields, so a reply from staging or an empty table fails. Never pass `--allow-side-effects` unless the human asked for it. With no safe tool, leave out `--tool`: the check then only connects and lists tools. 3. Preview: `canary monitor set --url --tool --args '' --assert '' --interval 5m --dry-run`. It saves nothing and never calls the tool. Show the human the output (tool, side effects, arguments, assertions, schedule, what applying does) and apply after they agree. Exit 2 = warnings: fix them first. 4. Apply: the same line without `--dry-run`, with `--json`. - Creates or updates by name (idempotent). The first call creates an anonymous workspace, saves the token locally, and starts the 7-day trial. - Name: 2-63 chars, lowercase letters, digits, dashes. - Target secrets only from env vars: `--bearer-env VAR`, `--header-env Name=VAR`. - First check `TARGET_AUTH_FAILED` and the server uses OAuth: `canary auth login --json` returns `authorize_url`. Give it to the human (never open it yourself), then poll `canary auth status --json` until `login_pending` is false and `status` is `active`. A server without self-registration (GitHub) needs the human's OAuth app: `--client-id ID --client-secret-env VAR`. `TARGET_AUTH_EXPIRED` later = ask the human to sign in again. 5. Keep the configuration in the repository: add the same `canary monitor set ...` line and `canary monitor test --json` to the deploy workflow after the deploy step. Give CI the token as `MCP_CANARY_TOKEN`. 6. Verify: `canary monitor test --json`, exit 0 = passed. 7. Alerts: ask the human for an email address, then `canary email add
--json`. Tell the human to click the confirm link in that email; alerts start only after the click. Never add an address the human did not give you. ## WebMCP websites (Shopify stores and other web pages) WebMCP tools live in a web page, not on an MCP server: the page registers them with `document.modelContext.registerTool()`. Every Shopify Liquid store has them (`search_catalog`, `get_product`, `get_cart`, `add_to_cart`, ...). Use `--website ` instead of `--url`; everything else is the same. - `canary inspect --website --json` opens the page in a browser and lists its tools (`transport: "webmcp"`, no protocol). It never calls a tool. - `canary monitor set --website --tool search_catalog --args '{"catalog":{"query":""}}' --assert '$.products[0].available == true' --dry-run` - Read-only tools (`readOnlyHint: true`) run without `--allow-side-effects`. Tools that move the page (`get_product`, `browse_store`, `show_variant`) are not read-only. Each check uses a new, empty browser session, so a cart tool never touches a real shopper's cart. - No `--bearer-env`, `--header-env`, or `canary auth login` with `--website`: the browser would send secrets to every script of the page. - Failure codes: `WEBMCP_NO_TOOLS` (the page registered no tools), `TARGET_BLOCKED_BY_WAF` (401, 403, or 429), `TARGET_UNAVAILABLE`, `TARGET_TIMEOUT`. - Checkout tools appear only after `proceed_to_checkout` with a full cart; a monitor cannot test them. ## Assertions (`--assert`, repeatable) - `'$.a.b == "x"'` (right side is JSON: strings need quotes), `'$.n != 0'`, `'$.items exists'`, `'$.name contains "acme"'`, `'$.id matches "^cus_"'`, `'duration < 3000ms'` - `$` = `structuredContent`, else the first text block parsed as JSON. Paths: `.name`, `['name']`, `[0]`. ## Exit codes 0 success / passed · 2 saved, first check failed (with `--dry-run`: warnings) · 3 target unhealthy · 10 auth failed · 11 permission denied · 20 invalid input · 21 not found · 30 MCP Canary unavailable, retry · 31 target unreachable or timeout · 40 payment required ## JSON With `--json`, stdout is only the API's JSON. Errors: `{ "ok": false, "code", "message", "retryable", "details", "offers" }`. A failed check is `"status": "failed"` with `failure.code` and `failure.details`, not an error. ## Payment Trial: 7 days, 3 monitors, checks every 5 minutes, no card. Paid plans: Solo $24/month (10 monitors, checks every minute); Pro $49/month (50 monitors, checks every 30 seconds). On exit 40 the error has `offers[].checkout_url`. Do not pay. Give the link to the human and continue when they say it is paid. `canary entitlement --json` shows the current plan. ## Commands ``` canary inspect URL | canary inspect --website PAGE_URL canary monitor set|list|get|delete|test|checks canary incident list|get canary webhook set|list|get|delete|deliveries canary email add|list|remove canary pricing | entitlement | billing upgrade --plan solo|pro | billing portal | subscription cancel canary workspace show (workspace id, API URL, token source; never the token) canary workspace delete --yes (deletes all data; only when the human asks) canary --help ``` ## Links - Docs: https://mcpcanary.com/docs/ - Browser MCP server tester (is it up): https://mcpcanary.com/check/?url=URL - Browser MCP server validator (grade and fixes, same as `canary inspect`): https://mcpcanary.com/validator/?url=URL - WebMCP on Shopify (overview): https://mcpcanary.com/webmcp/ - Browser WebMCP checker (Shopify stores, any web page): https://mcpcanary.com/webmcp/check/?website=URL - Browser WebMCP validator (grade and fixes, same as `canary inspect --website`): https://mcpcanary.com/webmcp/validator/?website=URL - Blog (reports on MCP reliability): [State of MCP Reliability — Q4 2026](https://mcpcanary.com/blog/state-of-mcp-reliability-q4-2026.md) - OpenAPI: https://api.mcpcanary.com/openapi.json - Releases: https://github.com/xakpc-dev-labs/canary/releases - CLI source (MIT): https://github.com/xakpc-dev-labs/canary