Last updated 2 September 2026.
How do I connect Claude to my PostgreSQL, MySQL or SQL Server database?
Add the AI2SQL MCP server as a custom connector in Claude (Customize → Connectors → Add), paste https://builder.ai2sql.io/api/chatgpt-mcp, and sign in with your AI2SQL account. Claude can then list your connected databases, read their schema and run read-only queries. Works in claude.ai, Claude Desktop and Claude Code.
Can ChatGPT query my SQL database?
Yes, with developer mode on ChatGPT Plus, Pro, Team, Enterprise or Edu. Create a plugin pointing at the AI2SQL MCP server URL with OAuth authentication, connect, and ChatGPT can describe your schema and run read-only SQL on PostgreSQL, MySQL or SQL Server connections you set up in the AI2SQL dashboard.
Is there an MCP server for text-to-SQL?
AI2SQL is one: its MCP server exposes generate_sql, fix_sql, optimize_sql, explain_sql and convert_sql alongside list_connections, describe_schema and run_query. The assistant picks the tool from what you ask; you never call a tool by name.
Can the AI change or delete my data?
No. Every tool is read-only. run_query accepts a single SELECT or WITH statement; INSERT, UPDATE, DELETE, DDL and multi-statement batches are rejected on the AI2SQL server before anything reaches your database.
Do I need an API key?
Not for Claude, Cursor, VS Code or ChatGPT. Those sign in with your AI2SQL account over OAuth 2.1. Nothing is pasted anywhere except the server URL. API keys remain available for scripts and custom agents through the separate server at builder.ai2sql.io/api/mcp.
Does it work with Cursor and VS Code?
Yes. Cursor and VS Code (GitHub Copilot agent mode) both support remote MCP servers with OAuth. The install buttons on this page add the server in one click; the client then asks you to sign in to AI2SQL.
Which databases can it actually query?
Live schema browsing and run_query work for PostgreSQL, MySQL, MariaDB and Microsoft SQL Server connections. Snowflake, MongoDB, Oracle and others still get SQL written for them, but live querying for those is not available yet.
How is this different from pasting my schema into ChatGPT?
Pasting a schema gives the model a snapshot it cannot verify or run. Through MCP the assistant reads the current schema itself, executes the query read-only and answers with real rows, and the schema never has to be copied into a chat.
What does the free plan get?
Sign in, list your connections, browse schemas and make 5 SQL requests a day, shared with the AI2SQL web app. Running queries against a connected database is part of the paid plans (Start $9, Pro $19, Team $39 per month).
Where do I connect a database?
In the AI2SQL dashboard at builder.ai2sql.io. Your AI assistant only sees connections you have already set up there. Databases on your own machine go through the AI2SQL Connector desktop app.
Which plans of Claude or ChatGPT support custom MCP servers?
Custom connectors need Claude Pro, Max, Team or Enterprise. ChatGPT needs developer mode, available on Plus, Pro, Team, Enterprise and Edu. Claude Code, Cursor and VS Code have no plan requirement for MCP servers.