@canner-ca/mcp
v0.1.0
Published
Model Context Protocol server for Canner — let an AI agent deploy, inspect, and manage your Canadian-hosted projects
Maintainers
Readme
@canner-ca/mcp
A Model Context Protocol server for Canner. It lets an MCP-aware AI agent — Claude Desktop, Cursor, and others — deploy, inspect, and manage your Canner projects as native tools.
Zero dependencies. The server speaks the MCP stdio transport (newline-delimited JSON-RPC 2.0) directly, with no third-party packages. That's on purpose: Canner is built around a clean supply chain (sandboxed builds, --ignore-scripts), so the tool you run inside your agent ships nothing extra to audit.
Requires Node.js 20 or later.
Setup
You need a Canner API token (cnr_…) from https://canner.ca/dashboard/account.
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"canner": {
"command": "npx",
"args": ["-y", "@canner-ca/mcp"],
"env": { "CANNER_TOKEN": "cnr_your_token_here" }
}
}
}Cursor
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"canner": {
"command": "npx",
"args": ["-y", "@canner-ca/mcp"],
"env": { "CANNER_TOKEN": "cnr_your_token_here" }
}
}
}Restart the client and the Canner tools appear. If you've already run canner login with @canner-ca/cli, you can omit CANNER_TOKEN — the server falls back to the credentials stored at ~/.canner/credentials.
Tools
| Tool | What it does |
|---|---|
| canner_whoami | Confirm which account the server is authenticated as. |
| canner_list_projects | List the projects this account can access. |
| canner_get_project | Get one project's status, URL, and source. |
| canner_list_deployments | List a project's deployments (newest first). |
| canner_get_deployment | Get one deployment in full, including its build log — use this to diagnose a failed build. |
| canner_deploy | Trigger a rebuild of a GitHub-connected project from HEAD. |
| canner_list_env_vars | List a project's environment variables. |
| canner_set_env_var | Add an environment variable (with optional scope + sensitivity). |
| canner_list_domains | List a project's custom domains and their status. |
| canner_add_domain | Attach a custom domain (starts pending). |
| canner_verify_domain | Re-check DNS and provision TLS for a domain. |
Each tool wraps an endpoint of the documented Canner REST API — the versioned /v1 surface. See the API reference (interactive explorer at https://api.canner.ca/docs, OpenAPI spec at https://api.canner.ca/openapi.json).
What's intentionally not here
Destructive operations — deleting a project, revoking a token, dropping a database or domain — are not exposed as tools, so an agent can't take them by mistake. Do those from the dashboard or the @canner-ca/cli.
Environment
| Variable | Purpose |
|---|---|
| CANNER_TOKEN | Your cnr_ API token. If unset, the server reads ~/.canner/credentials (written by canner login). |
| CANNER_API_BASE | Override the API endpoint. Default https://api.canner.ca. |
How it works
The server reads JSON-RPC requests on stdin and writes responses on stdout, one JSON object per line. It implements initialize, tools/list, tools/call, and ping. Every tools/call resolves credentials, issues one authenticated HTTPS request to the Canner API, and returns the JSON result as text content. Errors (auth, validation, not-found) come back as isError tool results with the API's message and request_id, so the agent can react instead of crashing.
License
MIT.
