← Back to directory
O

OmniSQL MCP

Community
Give AI coding clients access to your existing databases through native drivers.
Category
Database #11 of 86
Stars
★ 94 Popular
Transport
stdio (local process)
Runtime
Node.js 22.15+ within 22.x, · Bun 1.4.3+
Credentials
No credential needed
License
MIT
Last commit
Tools
26
61FMRS · C

This is a stdio MCP server for local database workflows, with connection, query, export, and schema tools across several database engines. It defaults to read-only and offers access controls, while its security boundary still depends on database grants, client access to local files, and deployment configuration.

Strongest · Documentation 15/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
13/20
Maintenance
10/20
Documentation
15/20
Setup experience
13/20
Why each score
Reliability 10/20
The README describes multi-database drivers, paging, timeouts, pooling, and error handling, and says CI checks the packaged server on multiple runtimes. However, no CI workflow or test files are available for static verification, and the manifest is not cached. Startup, the MCP handshake, agreement between declared tools and implementation, and key-path test coverage therefore remain unverified. The happy path appears plausible, but reviewable evidence is missing; 10 points.
Security and permissions 13/20
The documentation describes read-only defaults, connection whitelisting, tool disabling, local credential storage or environment-variable references, SSH host-key checks, and database-permission defense in depth. It also says SQL checks are not a full sandbox, exposes write tools, and uses latest in an install example. Without source or a manifest, implementation of these controls, data flows, and confirmation for dangerous operations cannot be verified, so points are deducted. The supplied material shows no red-line evidence; 13 points.
Maintenance 10/20
The repository metadata says it is not archived and has an MIT license. The README describes update notices, a release process, and CI, but provides no verifiable release history, commit activity, dependency update record, issue-response evidence, or security-response channel. Maintenance evidence is incomplete, so sustained maintenance cannot be assumed; 10 points.
Documentation 15/20
The README provides several client setup examples, configuration variables, a tool list, database support scope, access-control guidance, and some limitations. It does not provide complete parameter definitions for each tool, verifiable troubleshooting detail, source evidence for runtime claims, or cost information. The documentation is substantial but still has verification and operational-detail gaps; 15 points.
Setup experience 13/20
The README offers an npx guided installer, native client commands, desktop-client JSON configuration, and a standalone macOS/Linux installation path, along with runtime requirements and some platform caveats. Installation and a working database connection have not been executed or verified; the Windows path is more manual, and the manifest cannot confirm dependencies or entry-point configuration. Under static calibration, 13 points.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesUses the networkConnects to a database

Best for

  • Developers who need to access their own databases from a local AI coding client.
  • Teams that want to reuse DBeaver-compatible connections and control access with read-only mode or connection allowlists.

Not for

  • Users who need an unlisted database engine or external GUI/CLI query fallback.
  • Workflows requiring explicit multi-call Oracle transactions.
  • Environments that cannot allow the AI client process to access local connection configuration or the configured database permissions.

Required permissions

  • The server needs access to its configuration file or discovered DBeaver-compatible workspace, plus credentials and network access required to reach the configured databases.
  • Writes and schema changes require the relevant write capability to be enabled and authorization from the database account; a database-level read-only account is recommended for production.
  • SSH tunnels require a trusted known_hosts entry by default; RDS IAM connections require the AWS CLI and a valid session.

Risks and side effects

  • Read-only SQL checks are safeguards, not a full SQL sandbox; use database-level read-only permissions as an additional boundary.
  • An AI client with unrestricted file access can still read local configuration files.
  • Enabling writes, schema changes, or drop tools expands the possible impact; database grants and operator policy still apply.
  • Disabling strict SSH host-key checks allows unknown hosts; the server does not fall back to a direct database connection if a tunnel fails.

Setup

Before you start

Runtime:Node.js 22.15+ within 22.x, · Bun 1.4.3+

Other optional settings (23)
OMNISQL_DISCOVER_WORKSPACE optional Set whether to discover saved workspace connections; the default depends on whether a config file is set.
OMNISQL_CONFIG_FILE optional Set the path to the JSON configuration for database instances and their settings.
OMNISQL_POLICY_FILE optional Set the path to additional access rules.
OMNISQL_WORKSPACE optional Set the path to the local database client workspace directory.
OMNISQL_PROJECT optional Set the database client project or workspace folder to search.
OMNISQL_TIMEOUT optional Set the query timeout in milliseconds.
OMNISQL_DEBUG optional Enable debug logging.
OMNISQL_UPDATE_NOTIFIER optional Set whether to check npm for updates and display notices.
OMNISQL_READ_ONLY optional Set read-only mode; enabled by default.
OMNISQL_ALLOWED_CONNECTIONS optional Set a comma-separated list of allowed connection IDs or names.
OMNISQL_DISABLED_TOOLS optional Set a comma-separated list of tool names to disable.
OMNISQL_POOL_MIN optional Set the minimum number of connections per pool.
OMNISQL_POOL_MAX optional Set the maximum number of connections per pool.
OMNISQL_POOL_IDLE_TIMEOUT optional Set the idle connection timeout in milliseconds.
OMNISQL_POOL_ACQUIRE_TIMEOUT optional Set the connection acquisition timeout in milliseconds.
OMNISQL_AWS_CLI_PATH optional Set the AWS CLI path for RDS IAM authentication.
OMNISQL_IAM_TOKEN_TIMEOUT optional Set the timeout for minting an RDS IAM authentication token in milliseconds.
OMNISQL_SSH_KNOWN_HOSTS optional Set the known_hosts file used to verify SSH tunnel hosts.
OMNISQL_SSH_STRICT_HOST_KEY optional Set whether to refuse SSH tunnel hosts without a known_hosts entry; enabled by default.
OMNISQL_DUCKDB_CLI optional Set the DuckDB executable path if it is outside the MCP client's PATH.
OMNISQL_INSTALL_DIR optional Set the installation directory used by the standalone installer.
OMNISQL_BIN_DIR optional Set the directory where the standalone installer places its launcher.
SSH_AUTH_SOCK optional Set the agent socket path in the MCP server environment when using SSH agent authentication.

Prepare a database connection or DBeaver-compatible workspace and meet the runtime requirement: Bun 1.4.3+, Node.js 22.15+ within 22.x, or Node.js 24+. Run npx -y omnisql-mcp@latest install and follow the prompts to select Claude Code, Codex, or OpenCode; native client MCP registration commands are also documented. The example client configuration uses stdio and sets OMNISQL_CONFIG_FILE to a local JSON connection file. Restart the client session to load the server.

.mcp.json
{"mcpServers":{"omnisql":{"command":"npx","args":["-y","omnisql-mcp@latest"],"env":{"OMNISQL_CONFIG_FILE":"/absolute/path/connections.json"}}}}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "omnisql": {
      "command": "npx",
      "args": [
        "-y",
        "omnisql-mcp@latest"
      ],
      "env": {
        "OMNISQL_CONFIG_FILE": "/absolute/path/connections.json"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.omnisql]
command = "npx"
args = ["-y", "omnisql-mcp@latest"]

[mcp_servers.omnisql.env]
OMNISQL_CONFIG_FILE = "/absolute/path/connections.json"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add omnisql -e OMNISQL_CONFIG_FILE=/absolute/path/connections.json -- npx -y omnisql-mcp@latest

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After installation and startup, confirm `list_connections` appears in the client’s tool list. Call it to view connections, then use `test_connection` to check database connectivity.

Troubleshooting

  1. Check the runtime version and verify the client command, connection-file path, and stdio registration.
  2. Restart the MCP client session after configuration changes; check connection allowlists, disabled tools, and read-only settings.
  3. Check database network reachability and account grants; DuckDB requires CLI 1.5.6+ and may need OMNISQL_DUCKDB_CLI set.
  4. For SSH failures, check SSH_AUTH_SOCK in the MCP process environment, known_hosts entries, and host keys; for RDS IAM, check the AWS CLI path and profile session.

Things to try

Once connected, you can ask your AI assistant things like:

  • List the available database connections and databases.
  • Show the tables and their schemas in a database.
  • Explain a query plan and export the results as CSV.
  • Compare the schemas of two connections.

Tools 26

list_connections read-only
List available database connections.
list_databases read-only
Discover databases accessible on a server.
get_connection_info read-only
Get connection details.
test_connection read-only
Test database connectivity.
execute_query read-only
Run read-only queries; documented accepted statements include SELECT, EXPLAIN, SHOW, DESCRIBE, and PRAGMA.
write_query writes
Run INSERT, UPDATE, or DELETE queries.
export_data read-only
Export data as CSV or JSON, optionally compressed.
read_result read-only
Read rows and columns from a stored result page by page.
Show 18 more tools
read_result_cell read-only
Read a long cell in chunks.
read_export read-only
Read a stored export in bounded chunks.
list_tables read-only
List tables and views.
get_table_schema read-only
Inspect columns, indexes, and constraints.
get_table_stats read-only
View catalog row estimates and data and index storage.
create_table writes
Create tables.
alter_table writes
Modify table structure.
drop_table destructive
Drop tables; confirmation is required.
begin_transaction writes
Start a transaction.
execute_in_transaction writes
Execute a query within a transaction.
commit_transaction writes
Commit a transaction.
rollback_transaction writes
Roll back a transaction.
explain_query read-only
Analyze a query execution plan.
compare_schemas read-only
Compare schemas between two connections.
get_pool_stats read-only
View connection pool statistics.
get_database_stats read-only
View database statistics.
append_insight writes
Store analysis notes.
list_insights read-only
Retrieve stored analysis notes.

Use cases

Query and inspect databases from saved connections in an AI coding client.
Browse table structures, analyze query plans, and compare schemas across connections.
Export query results as CSV or JSON and page through large results.

Supported clients

Claude Code
Codex
OpenCode
Claude Desktop
Cursor

Listed from the project's documentation, not tested by this site.

Overview

OmniSQL MCP is an MCP server for managing database connections and querying, exporting, and inspecting database structures. It can reuse saved connections from DBeaver-compatible workspaces or use JSON configuration for multiple instances. Supported engines include PostgreSQL, MySQL/MariaDB, SQL Server, SQLite, Oracle, DuckDB, and ClickHouse; some PostgreSQL-compatible databases route through the pg driver. Read-only mode is enabled by default, with controls such as connection allowlists, tool disabling, and table access policies.

Similar servers

Source revision 7a86cc954a84 Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/omnisql-mcp.svg)](https://followmcp.com/en/servers/omnisql-mcp)