apisql-dev/apisql-mcp
View on GitHub ↗一个 MCP Server 连接你的所有数据库,数据库 MCP Server 的瑞士军刀。One MCP Server for all your databases. The Swiss Army Knife of Database MCP Servers.
40 ★7 forksJavaScriptUpdated 1mo ago
What you need to know
One MCP server connecting to many databases (MySQL, PostgreSQL, SQL Server, Oracle, SQLite, StarRocks, Doris, TiDB, DuckDB, OceanBase, Trino/Presto, Dameng and any JDBC-compatible database). Dynamic data source switching at runtime via the apiSQL gateway with internet access to intranet databases, full SQL (DDL/DML, stored procedures, UDFs), stdio and Streamable HTTP transports.
Install
npm install -g apisql-mcp npx -y apisql-mcp
Usage
- •Set APISQL_MCP_API_URL (must end with /$sudb), APISQL_MCP_API_KEY (Bearer token), APISQL_MCP_DS (default data source)
- •Call execute_sql with ds to switch data source at runtime
- •HTTP mode: npx apisql-mcp --transport streamable-http --port 9090 --host 0.0.0.0
Key features
- ✓One server for 10+ database types plus any JDBC-compatible DB
- ✓Dynamic data source switching without restart
- ✓apiSQL gateway gives internet access to intranet databases (no port mapping)
- ✓Full SQL: SELECT/WITH/JOIN, INSERT, UPDATE, DELETE, CREATE/ALTER/DROP, stored procedures and UDFs
- ✓API key authorization, logging and auditing via the apiSQL platform
- ✓stdio and Streamable HTTP transports
Best for
Querying many heterogeneous databases through a single MCP server, especially from intranet via the apiSQL gateway
Caveats
- ⚠Requires an apiSQL account at open.apisql.cn and the apiSQL gateway to connect your own databases
- ⚠Provides full database access including structural changes; use least-privilege DB users and read-only access in production
- ⚠APISQL_MCP_API_URL must end with /$sudb
Clients: Claude Desktop · Claude Code · Cursor · VS Code/Copilot · Cline · Windsurf
Documentation ↗Reviewed 2026-08-11
Topics
- Stars
- 40★
- Forks
- 7
- Language
- JavaScript
- License
- MIT
- Created
- 2026-02-17
- Last push
- 2026-07-07