MCP App Store
by KeenEthics
AI2SQL icon

AI2SQL MCP Server for Claude and ChatGPT

By AI2SQL

Overview

Ask Claude questions about your own database in plain English. AI2SQL gives Claude your real table and column names, writes the SQL and runs it as a read-only query, so the answer comes from your data. Try it first on demo_shop, a sample store every account can query: "Use AI2SQL to show the top 5 customers by revenue this year in demo_shop" What it does: - Get started: see the databases in your account, what your plan includes, and example questions to ask. - Connect a database: get a link to connect PostgreSQL, MySQL or SQL Server in AI2SQL, including Supabase, Neon, AWS RDS and Azure. Credentials are entered in AI2SQL, never in Claude. - List your databases and read their tables and columns, so queries use real names. - Run a single read-only SELECT or WITH query and return up to 1,000 rows. Writes and DDL are rejected. - Generate SQL from a plain-English request for PostgreSQL, MySQL, SQL Server, SQLite, Oracle, Snowflake, BigQuery and MariaDB. - Fix, optimize, explain and convert SQL you already have. Database on your own machine or network? Save its schema in AI2SQL and Claude writes SQL that matches it. How it works: you sign in with your AI2SQL account over OAuth, and every tool follows your AI2SQL plan. A free account can generate a limited number of queries each day, browse its databases and query demo_shop. Querying your own databases, saving a local schema, and fixing, optimizing, explaining and converting SQL are part of the paid plans, each of which starts with a 7-day free trial. No tool can change or delete data in your database.

How to connect

  1. Claude: Open the AI2SQL listing in the Claude connectors directory and choose Connect. Claude listing AI2SQL exposes 10 tools here.
  2. ChatGPT: Open the AI2SQL listing in the ChatGPT app directory and choose Connect. ChatGPT listing AI2SQL exposes 10 tools here.

Tools

convert_sql

ChatGPT
Convert a SQL statement from one database dialect to another (e.g. MySQL to PostgreSQL, T-SQL to Oracle). Each call is saved to the signed-in user's AI2SQL query history and counts toward their plan allowance. This only adds a history entry: nothing is deleted or overwritten, and the SQL is not run against any database.

describe_schema

ChatGPT
List tables and columns of one connected database so SQL can be written against real names. Works for PostgreSQL, MySQL and SQL Server connections; other types return unsupported_dialect. Read-only: it reads table and column names and changes nothing in the database. Also works on demo_shop (id "demo-shop").

explain_sql

ChatGPT
Explain what a SQL statement does, step by step, in plain English. Use when the user needs to understand a query they were handed. Each call is saved to the signed-in user's AI2SQL query history and counts toward their plan allowance. This only adds a history entry: nothing is deleted or overwritten, and the SQL is not run against any database.

fix_sql

ChatGPT
Repair a failing SQL statement. Pass the SQL and, if available, the error message. Use when the user has a query that errors or returns the wrong shape. Each call is saved to the signed-in user's AI2SQL query history and counts toward their plan allowance. This only adds a history entry: nothing is deleted or overwritten, and the SQL is not run against any database.

generate_sql

ChatGPT
Turn a plain-English request into a correct, dialect-aware SQL query. Use when the user describes the data they want and no SQL exists yet. Each call is saved to the signed-in user's AI2SQL query history and counts toward their plan allowance. This only adds a history entry: nothing is deleted or overwritten, and the SQL is not run against any database.

get_agent_activity

ChatGPT
Show the most recent queries that AI agents (ChatGPT, Claude, Cursor, API keys) ran on the user's AI2SQL databases: when, which agent, which database, the SQL, and whether it was blocked, plus 7-day totals. Use when the user asks what ran on their database or wants to review agent queries. Read-only: it reads the user's AI2SQL activity log and changes nothing.

get_database_setup_steps

ChatGPT
Show the link and the steps for adding a PostgreSQL, MySQL or SQL Server database to AI2SQL, so its schema and read-only queries become available here, plus the databases already added. Read-only: it reads the user's AI2SQL account and changes nothing; the database is added on the AI2SQL website, not in this chat.

list_connections

ChatGPT
List the databases the user has in AI2SQL (id, name, type). Includes schema-only sample databases (ids like sample-123) that support describe_schema but not run_query. Call this before describe_schema or run_query. Read-only: it reads the user's AI2SQL account and changes nothing. The shared demo_shop sample (id "demo-shop": a store with fake customers, orders, order_items and products) can be read and queried on every plan, including free.

optimize_sql

ChatGPT
Rewrite a slow query to return the same rows faster and explain the bottleneck. Use when the user says a query is slow. Each call is saved to the signed-in user's AI2SQL query history and counts toward their plan allowance. This only adds a history entry: nothing is deleted or overwritten, and the SQL is not run against any database.

run_query

ChatGPT
Run a single SELECT/WITH query against a connected PostgreSQL, MySQL or SQL Server database and return up to 1000 rows. Writes and DDL are rejected. Part of the paid plans. Read-only: nothing in the database is changed. demo_shop (id "demo-shop") runs on every plan; the user's own databases need a paid plan.

connect_database

Claude

convert_sql

Claude

describe_schema

Claude

explain_sql

Claude

fix_sql

Claude

generate_sql

Claude

get_started

Claude

list_connections

Claude

optimize_sql

Claude

run_query

Claude

Similar Apps

Listed on MCP App Store

Listed on MCP App Store

Add this badge to your site or README. It links to this page.

HTML

<a href="https://mcp-app-store.keenethics-labs.com/app/ai2sql"><img src="https://mcp-app-store.keenethics-labs.com/badges/listed-on-mcp-app-store.svg" alt="Listed on MCP App Store" width="220" height="44"></a>

Markdown

[![Listed on MCP App Store](https://mcp-app-store.keenethics-labs.com/badges/listed-on-mcp-app-store.svg)](https://mcp-app-store.keenethics-labs.com/app/ai2sql)