For agents

MCP server

One server, local over stdio or remote over HTTP, so the assistant you already talk to can run your database work instead of describing it.

01

What it is

A Model Context Protocol server published as @capydb/mcp. It runs locally over stdio, or remotely at https://mcp.capydb.dev/mcp over Streamable HTTP, and calls the same control-plane API the dashboard and the CLI call - with the same organization scoping, the same permissions, and the same audit trail.

It ships a hand-written client rather than depending on the SDK at runtime, so the install is small and the startup is instant.

02

Remote server

Claude on the web, desktop, and mobile - and any client that supports remote MCP servers - connects to https://mcp.capydb.dev/mcp. Nothing to install and no key to paste: the first time a tool needs your account, the client sends you through CapyDB sign-in in the browser, where you pick the workspace it may use. Throwaway ephemeral databases work before you sign in.

The connection is an agent API key, listed under Settings → API keys and revocable there at any time. It expires after 90 days, and the client then asks you to connect again. In Claude Code, add the same URL with the command below.

claude mcp add --transport http capydb https://mcp.capydb.dev/mcp

03

Install locally

Add it to any MCP client's server configuration. The server handles authentication itself: on first use without a key it returns a device-login URL for you to approve in a browser.

{
  "mcpServers": {
    "capydb": {
      "command": "npx",
      "args": ["-y", "@capydb/mcp"],
      "env": { "CAPYDB_API_KEY": "capy_live_..." }
    }
  }
}

04

Clients

  • -Claude on the web, desktop, and mobile through the remote server; Claude Code remote or local
  • -Cursor, Windsurf, and other editors with MCP support
  • -Any client implementing the Model Context Protocol over stdio or Streamable HTTP - the server serves both the current and the legacy wire revision
  • -Your own agent, through any MCP SDK

05

What the tools cover

  • -Projects: list, create, and inspect; throwaway ephemeral databases you can claim or destroy
  • -Connections: fetch direct and pooled connection strings, and K/V store credentials
  • -SQL: read-only queries and, as a separate tool, statements that change data, with results returned as structured JSON
  • -Schema: inspect tables, columns, indexes, and extensions
  • -Previews: create, list, reset, and delete preview databases
  • -Backups: take and list backups, export dumps, create restore points, restore into a preview
  • -Imports: start and follow an import from another provider
  • -Operations: usage, logs, observability, alerts, jobs, and index advice

06

Safety

Read-only tools declare themselves read-only, and destructive tools declare themselves destructive, so a client can gate them. An UPDATE or DELETE with no WHERE, or a TRUNCATE, is refused by the control plane before it runs, and the refusal tells the agent how to fix the call; the MCP server never opts out of that check. For anything riskier, the tool description tells the agent to create a restore point first.

Restoring over a production database is intentionally not exposed as a tool. An agent can restore into a preview and you can promote it yourself; it cannot overwrite your production data on its own initiative.

07

Diagnostics

Everything the server says about itself goes to standard error, because standard output is the protocol channel. If a client shows an empty tool list, the answer is almost always in the client's MCP log rather than in the server.