Skip to content

MCP Quickstart

AutoDB exposes its database tools via the Model Context Protocol (MCP), so AI assistants like Claude Code, Claude Desktop, and Cursor can analyze migrations, execute SQL, and inspect schemas directly.

  • An AutoDB account with an API key
  • A registered database connection (see Quickstart)
  1. Install uv (if not already installed):

    Terminal window
    curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Add .mcp.json to your project root:

    {
    "mcpServers": {
    "autodb": {
    "command": "uvx",
    "args": ["autodb-mcp"],
    "env": {
    "AUTODB_API_KEY": "your_api_key_here",
    "AUTODB_BASE_URL": "http://api.autodb.app"
    }
    }
    }
    }
  3. Open the project in Claude Code — the MCP server connects automatically.

Once connected, your AI assistant has access to these tools:

ToolDescription
list_connectionsDiscover available database connections
get_schemaInspect tables, columns, and foreign keys
execute_sqlRun raw SQL queries (with guardrail levels)
analyze_migrationAnalyze SQL migrations for risk and blast radius
execute_migrationExecute approved migrations with approval tokens
poll_migration_statusCheck execution progress
get_blast_radiusPreview FK cascade impact before migrating

After setup, try asking your AI assistant:

“List my database connections”

“Show me the schema for my production database”

“Analyze this migration: ALTER TABLE orders ADD COLUMN priority VARCHAR(20)”

“What tables would be affected if I dropped the customers table?”

When an AI agent executes SQL through AutoDB, guardrails control what’s allowed:

LevelAllowedUse Case
strict (default)SELECT onlySafe data exploration
moderateSELECT, INSERT, UPDATE, DELETEData manipulation tasks
permissiveAll SQL including DDLSchema changes (use with caution)