SO

srthkdev/omnisql-mcp

数据库管理

本页由 AI 翻译,技术细节请以原文为准。 查看原文

90 stars 37 forks 质量 87 趋势 29MIT

srthkdev/omnisql-mcp 是从 https://github.com/srthkdev/omnisql-mcp. 导入的 MCP 服务器候选

概览

srthkdev/omnisql-mcp 是从 https://github.com/srthkdev/omnisql-mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

让Claude Code、Codex和OpenCode访问你已经使用的数据库。 重用保存的DBeaver连接,使用本地驱动查询,并保留访问控制权。

快速设置 · 特色· 演示 · 文档 · 发行

从真实的Codex CLI窗口与合成SQLite实例截取。观看录制 ·GIF预览。

你能做什么

能力 它如何帮助
重用保存的连接 读取DBeaver兼容工作区的数据库和SSH设置,包括自定义项目。
跨引擎查询 PostgreSQL、MySQL/MariaDB、SQLite、SQL Server、Oracle、DuckDB 和 ClickHouse。
选择另一个数据库 在调用时发现数据库并选择一个,使用相同的保存服务器凭证。
了解你的数据 浏览表格,检查列,解释查询,导出CSV/JSON,并比较模式。
控制访问 选择只读模式,限制连接,或禁用工具。
设置您的客户端 Claude Code、Codex 和 OpenCode 的一道引导命令。

数据库支持

支持的执行路径:

  • PostgreSQL(通过pg)
  • MySQL / MariaDB(通过mysql2)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Give Claude Code, Codex, and OpenCode access to the databases you already use. Reuse saved DBeaver connections, query with native drivers, and keep control over access.

quick setup · features · demo · docs · releases

Captured from the real Codex CLI window against synthetic SQLite instances. Watch the recording · GIF preview.

What you can do

Capability How it helps
Reuse saved connections Read database and SSH settings from DBeaver-compatible workspaces, including custom projects.
Query across engines PostgreSQL, MySQL/MariaDB, SQLite, SQL Server, Oracle, DuckDB, and ClickHouse.
Choose another database Discover databases and select one at call time, using the same saved server credentials.
Understand your data Browse tables, inspect columns, explain queries, export CSV/JSON, and compare schemas.
Control access Choose read-only mode, restrict connections, or disable tools.
Set up your client One guided command for Claude Code, Codex, and OpenCode.

Database Support

Supported execution paths:

  • PostgreSQL (via pg)
  • MySQL / MariaDB (via mysql2)
  • SQL Server / MSSQL (via mssql)
  • SQLite (via sqlite3 CLI)
  • ClickHouse (HTTP/HTTPS with keep-alive and zstd/gzip; no external client)
  • DuckDB (via DuckDB CLI 1.5.6+; existing local files, locked safe mode, exact numeric output)
  • Oracle (via oracledb)

Postgres-compatible (routed through pg driver automatically):

  • CockroachDB, TimescaleDB, Amazon Redshift, YugabyteDB, AlloyDB, Supabase, Neon, Citus

Other databases: Unsupported drivers return an explicit error. External GUI/CLI query fallback has been removed so access and output policies remain enforceable.

在 GitHub 查看完整 README

安装

npx -y omnisql-mcp@latest
新手?先看 mcpskill.org 教程 →

配置

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