MCPQL
Inspect, search and query Microsoft SQL Server and Azure SQL databases from an MCP client
SQL access to seven database engines from a JSON config or your saved DBeaver connections
By Sarthak Jain (individual) TypeScript Local · stdio Databases
43 popularity score ★ 90 ↓ 258/wk
Opens the app, which asks before it adds the server.
claude mcp add omnisql -- npx -y omnisql-mcp@latest{
"mcpServers": {
"omnisql": {
"command": "npx",
"args": [
"-y",
"omnisql-mcp@latest"
]
}
}
}{
"mcpServers": {
"omnisql": {
"command": "npx",
"args": [
"-y",
"omnisql-mcp@latest"
]
}
}
}{
"servers": {
"omnisql": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"omnisql-mcp@latest"
]
}
}
}[mcp_servers.omnisql]
command = "npx"
args = ["-y", "omnisql-mcp@latest"]gemini mcp add --scope user omnisql npx -- -y omnisql-mcp@latestOMNISQL_CONFIG_FILE |
Optional: Path to a JSON file listing database instances and their settings; turns workspace discovery off unless OMNISQL_DISCOVER_WORKSPACE=true. |
|---|---|
OMNISQL_WORKSPACE |
Optional: Path to the DB client workspace; the OS's usual location when unset. |
OMNISQL_DISCOVER_WORKSPACE |
Optional: Whether to read saved workspace connections. |
OMNISQL_PROJECT |
Optional: Read only this workspace project folder; all projects when unset. |
OMNISQL_POLICY_FILE |
Optional: Path to extra schema, table, function and database access rules. |
OMNISQL_READ_ONLY |
Optional: Set to false to show the write and transaction tools. |
OMNISQL_ALLOWED_CONNECTIONS |
Optional: Comma-separated connection IDs or names to expose; all when unset. |
OMNISQL_DISABLED_TOOLS |
Optional: Comma-separated tool names to turn off. |
OMNISQL_DUCKDB_CLI |
Optional: Path to the DuckDB executable when it is not on PATH. |
OMNISQL_TIMEOUT |
Optional: Query timeout in milliseconds. |
OMNISQL_POOL_MAX |
Optional: Maximum connections per pool, 1 to 32. |
OMNISQL_UPDATE_NOTIFIER |
Optional: Set to false to stop the daily npm version check. |
OmniSQL MCP is a local stdio server that gives an assistant SQL access to databases you describe in a JSON config file (OMNISQL_CONFIG_FILE) or have already saved in a DBeaver-compatible client. From a workspace it reads both the older XML layout and the newer JSON one and decrypts the passwords kept in credentials-config.json. Connections reached through an SSH tunnel or AWS RDS IAM sign-in are handled too.
PostgreSQL, MySQL/MariaDB, SQL Server and Oracle go through Node drivers, and ClickHouse is spoken to over HTTP. SQLite needs the sqlite3 program and DuckDB its own CLI. Postgres-compatible engines such as CockroachDB, Redshift, Supabase or Neon use the PostgreSQL driver. Any other engine now gets an error, since the old fallback to an outside client CLI is gone. The code still reads OMNISQL_CLI_PATH, but the workspace client no longer uses the value (dist/server.js, dist/workspace-client.js).
It starts read-only. The eight write and transaction tools are left out of the tool list until OMNISQL_READ_ONLY=false, so 18 of its 26 tools show by default. Big results are kept behind short-lived handles that you page through with read_result, read_result_cell and read_export. Notes from append_insight are written to insights.json under ~/.cache/omnisql-mcp/notes, keeping the last 1,000 and at most 1 MiB (dist/runtime/notes.js).
| Runtime | Node.js 22.15+Bun 1.4.3+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| Also |
|
Node.js 22.15 or later within 22.x, or Node.js 24 and later; Bun 1.4.3 also works. Connections come from a DBeaver-compatible workspace (OS default path, or OMNISQL_WORKSPACE) or a JSON file in OMNISQL_CONFIG_FILE. npx -y omnisql-mcp@latest install adds it to Claude Code, Codex or OpenCode. RDS IAM connections need an AWS CLI session for the saved profile.
Works only from connections stored in a DBeaver-style workspace; it cannot take a connection string directly. Engines outside the native four depend on an external CLI, with results the project calls variable. Query validation blocks DROP DATABASE/SCHEMA, TRUNCATE, GRANT/REVOKE and DELETE/UPDATE without WHERE. SSH tunnels, AWS RDS IAM sign-in, OMNISQL_PROJECT and the connection/database override are described in the GitHub README but are not in the npm 2.0.1 README or build, so they are not yet released.
Suits developers who keep database connections in DBeaver or a compatible client, or who are willing to write a small JSON config, and want an assistant to look at schemas, run queries or draft migrations across several engines. Because it starts read-only, a reader can try it on shared data first and turn writes on later with OMNISQL_READ_ONLY=false. Pair that with a read-only database user for production, as its docs advise. Pick something else if your engine is not one of the seven it supports, or if you need explicit transactions on Oracle.
17 only read, 5 change things, 4 can delete or overwrite. A ? marks an optional parameter.
list_connectionsincludeDetails?: booleanlist_databasesconnectionId: stringget_connection_infoconnectionId: stringtest_connectionconnectionId: stringdatabase?: stringexecute_queryconnectionId: stringquery: stringmaxRows?: integerdatabase?: stringwrite_query deletesconnectionId: stringquery: stringdatabase?: stringexport_dataconnectionId: stringquery: stringformat?: enumcompression?: enumincludeHeaders?: booleanmaxRows?: integerdatabase?: stringread_resultresultId: stringoffset?: integerlimit?: integercolumnOffset?: integercolumnLimit?: integerread_result_cellresultId: stringrow: integercolumn: integeroffset?: integerlength?: integerread_exportresultId: stringoffset?: integerlength?: integerlist_tablesconnectionId: stringschema?: stringincludeViews?: booleandatabase?: stringget_table_schemaconnectionId: stringtableName: stringincludeIndexes?: booleandatabase?: stringget_table_statsconnectionId: stringtableName: stringdatabase?: stringcreate_table changesconnectionId: stringquery: stringdatabase?: stringalter_table deletesconnectionId: stringquery: stringdatabase?: stringdrop_table deletesconnectionId: stringtableName: stringconfirm: booleandatabase?: stringbegin_transaction changesconnectionId: stringdatabase?: stringexecute_in_transaction deletestransactionId: stringquery: stringcommit_transaction changestransactionId: stringrollback_transaction changestransactionId: stringexplain_queryconnectionId: stringquery: stringanalyze?: booleanformat?: enumdatabase?: stringcompare_schemassourceConnectionId: stringtargetConnectionId: stringincludeMigrationScript?: booleanget_pool_statsconnectionId: stringdatabase?: stringget_database_statsconnectionId: stringdatabase?: stringappend_insight changesinsight: stringconnection?: stringtags?: arraylist_insightsconnection?: stringtags?: array