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.
Prerequisites
Section titled “Prerequisites”- An AutoDB account with an API key
- A registered database connection (see Quickstart)
-
Install uv (if not already installed):
Terminal window curl -LsSf https://astral.sh/uv/install.sh | sh -
Add
.mcp.jsonto 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"}}}} -
Open the project in Claude Code — the MCP server connects automatically.
Available Tools
Section titled “Available Tools”Once connected, your AI assistant has access to these tools:
| Tool | Description |
|---|---|
list_connections | Discover available database connections |
get_schema | Inspect tables, columns, and foreign keys |
execute_sql | Run raw SQL queries (with guardrail levels) |
analyze_migration | Analyze SQL migrations for risk and blast radius |
execute_migration | Execute approved migrations with approval tokens |
poll_migration_status | Check execution progress |
get_blast_radius | Preview FK cascade impact before migrating |
Try It
Section titled “Try It”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?”
Guardrail Levels
Section titled “Guardrail Levels”When an AI agent executes SQL through AutoDB, guardrails control what’s allowed:
| Level | Allowed | Use Case |
|---|---|---|
strict (default) | SELECT only | Safe data exploration |
moderate | SELECT, INSERT, UPDATE, DELETE | Data manipulation tasks |
permissive | All SQL including DDL | Schema changes (use with caution) |