AI2SQL MCP MCP server
A hosted MCP server by AI2SQL that allows AI assistants to write, fix, explain, optimize, and run read-only SQL queries against connected PostgreSQL, MySQL, and SQL Server databases using OAuth 2.1 authentication.
Endpoint and access
OAuth sign-in: the first time you connect, your client opens the vendor's own authorization prompt in a browser.
OAuth sign-inEndpoint checked 2026-10-05
MCP endpoint (Streamable HTTP)
https://builder.ai2sql.io/api/chatgpt-mcpWhat you can do with it
- Generate SQL from plain English descriptions
- Fix and optimize failing SQL queries
- Explain query execution plans
- Run read-only SELECT queries on connected databases
Connect from your client
Each snippet registers the same endpoint; pick the client you use.
Claude Code
Claude Code configuration
claude mcp add --transport http ai2sql-mcp https://builder.ai2sql.io/api/chatgpt-mcpCodex
Codex configuration
codex mcp add ai2sql-mcp --url https://builder.ai2sql.io/api/chatgpt-mcpCursor
Cursor configuration
{
"mcpServers": {
"ai2sql-mcp": {
"url": "https://builder.ai2sql.io/api/chatgpt-mcp"
}
}
}Cline
Cline configuration
{
"mcpServers": {
"ai2sql-mcp": {
"type": "streamableHttp",
"url": "https://builder.ai2sql.io/api/chatgpt-mcp",
"disabled": false
}
}
}VS Code
VS Code configuration
{
"servers": {
"ai2sql-mcp": {
"type": "http",
"url": "https://builder.ai2sql.io/api/chatgpt-mcp"
}
}
}Gemini CLI
Gemini CLI configuration
gemini mcp add --transport http ai2sql-mcp https://builder.ai2sql.io/api/chatgpt-mcpClaude Desktop
Claude Desktop configuration
{
"mcpServers": {
"ai2sql-mcp": {
"url": "https://builder.ai2sql.io/api/chatgpt-mcp"
}
}
}Windsurf
Windsurf configuration
{
"mcpServers": {
"ai2sql-mcp": {
"serverUrl": "https://builder.ai2sql.io/api/chatgpt-mcp"
}
}
}Other developer tools servers
Do you run AI2SQL MCP?
Prove ownership with a DNS record, a well-known file, or your Official MCP Registry entry, and your edits publish immediately. Proofs are re-checked weekly; admins can still hide or remove a listing.