API Keys

Manage your API keys for the AI2SQL MCP server

Your API Keys

Loading API keys...

Connect your AI agent to your database

Add this to your Claude / Cursor settings.json (MCP config) to let your agent query your database over MCP — read-only by default.

{
  "mcpServers": {
    "ai2sql": {
      "url": "https://builder.ai2sql.io/api/mcp",
      "headers": {
        "x-ai2sql-key": "your-api-key-here",
        "x-ai2sql-connection": "conn_your_database"
      }
    }
  }
}

Your agent can read and answer questions — it can't DROP, DELETE, or modify anything. Use one of your API keys above; the connection id comes from your Databases page.