Docs · Reference

MCP server.

@canner-ca/mcp is a Model Context Protocol server that exposes Canner as native tools for an AI agent — Claude Desktop, Cursor, and others. Zero dependencies; it speaks the MCP stdio transport directly. Marketing overview on the MCP page.

Setup

You need a Canner API token (cnr_…) from Identity → API keys. Add the server to your MCP client’s config — claude_desktop_config.json for Claude Desktop, .cursor/mcp.json for Cursor — then restart the client and the Canner tools appear.

{
  "mcpServers": {
    "canner": {
      "command": "npx",
      "args": ["-y", "@canner-ca/mcp"],
      "env": { "CANNER_TOKEN": "cnr_your_token_here" }
    }
  }
}

Already ran canner login with the CLI? Drop the CANNER_TOKEN line — the server falls back to the credentials stored at ~/.canner/credentials.

Tools

Each tool wraps one endpoint of the versioned /v1 REST API:

canner_whoamiConfirm which account the agent is signed in as, and which organization it acts for.
canner_list_projectsList the projects in this organization.
canner_get_projectGet one project's status, URL, and source.
canner_list_deploymentsList a project's deployments, newest first.
canner_get_deploymentRead one deployment in full — including its build log.
canner_deployRebuild a GitHub-connected project from HEAD.
canner_list_env_varsList a project's environment variables.
canner_set_env_varAdd an environment variable.
canner_list_domainsList a project's custom domains.
canner_add_domainAttach a custom domain.
canner_verify_domainRe-check DNS and provision TLS for a domain.
canner_create_projectCreate a new empty project to deploy into.
canner_save_appDeploy an app straight from your agent by sending its source files.
canner_list_databasesList a project's databases, with size and Postgres version.
canner_get_databaseConnection details for one database. Credentials are hidden unless explicitly requested.
canner_create_databaseAdd another database to a project (Starter: one per project; paid plans can add more).
canner_export_databaseStart a database export; poll canner_get_database_operation for the result.
canner_copy_databaseCopy a database into another EMPTY database you own.
canner_list_database_operations / canner_get_database_operationList recent database operations, or check one's status.
canner_list_backupsList a database's backups and its backup policy (read-only — taking, restoring and deleting backups is done in the dashboard or CLI).
canner_get_instanceA project's dedicated Postgres instance and its point-in-time-recovery window (read-only — creating, restoring and moving is done in the dashboard or CLI).
canner_database_security_checkA read-only security and performance check of a database (policies, functions, views, indexes, primary keys). Reads the catalog, never your data.
canner_audit_database_rolesWhat each role of a dedicated-instance database can do, with findings for a least-privilege setup (read-only).
canner_get_instance_upgradeWhether the dedicated instance can be upgraded to a newer Postgres version and what would stop it (read-only — upgrading is done in the dashboard or CLI).
canner_get_instance_configThe dedicated instance's tuning: preset, timeouts, maintenance window and any restart waiting for it (read-only).
canner_set_instance_configChange the preset, timeouts and maintenance window. Takes effect at once, no restart.
canner_restart_instanceRestart the dedicated instance now (a few seconds of dropped connections). Requires confirm: true, only with the owner's go-ahead.
canner_list_extensionsExtensions available on a database of the dedicated instance and what is installed (read-only).
canner_install_extensionInstall an extension (pgvector, PostGIS, pg_trgm, pg_cron…). pg_cron restarts the instance and needs confirm: true.
canner_remove_extensionRemove an extension; refused while objects still use it.
canner_get_replicationLogical replication of a database: on/off, WAL cap, publications, slots and their health (read-only).
canner_set_replicationTurn logical replication on or off (restarts the instance, confirm: true) or change the WAL cap per slot.
canner_get_instance_memoryThe memory budget split between the app and its dedicated Postgres, and whether a change is waiting (read-only).
canner_apply_instance_memoryApply the memory split (restarts the instance, confirm: true).
canner_set_instance_monitoringTurn query insights and the log viewer on or off (restarts the instance, confirm: true).

Safe by default

Destructive operations — deleting a project, revoking a token, dropping a database or domain — are deliberately notexposed, so an agent can’t take them by mistake. Do those from the dashboard or the CLI.

Related