
Db Gateway
io.github.sijunkim由 GitHub 账号 sijunkim 发布v1.0.4更新于 Oct 25, 2026
145+ tools across 8 databases: MySQL, PostgreSQL, Redshift, MongoDB, Redis, Kafka, and more
概览
本地运行的 MCP 服务器,用一套配置为 AI 助手提供 145+ 个工具,可检查八种数据库与流式引擎的结构并执行查询。
- 可以做什么
- 读取表结构与表间关系,并对 MySQL、PostgreSQL、Redshift 等关系型引擎执行查询。操作 MongoDB、Redis、DynamoDB 等 NoSQL 引擎中的文档、键与缓存。在 Elasticsearch 中搜索和管理索引。查看并操作 Kafka 的主题与消息。通过 alias 指定同一引擎的多个实例,未指定时使用默认实例。
- 适用场景
- 适合希望助手自行探索数据库结构、而不是由你粘贴 DDL 的场景;也适合技术栈横跨多个引擎(例如应用用 MySQL、分析用 Redshift、缓存用 Redis、事件用 Kafka),希望只用一个服务器和一份配置的情况。
- 运行要求
- 通过 npx 在本地运行,需要 Node.js 18 或更高版本。必须设置 DBS 列出要启用的引擎。每个启用的引擎需要对应的连接字符串变量(MYSQL、POSTGRESQL、REDSHIFT、MONGODB、REDIS、ELASTICSEARCH、KAFKA),且都必须带 alias;DynamoDB 改用 DYNAMODB_REGION、DYNAMODB_ACCESS_KEY_ID 和 DYNAMODB_SECRET_ACCESS_KEY。需要能访问目标数据库的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Db Gateway,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
DB Gateway MCP Server
[npm] [MCP Registry] [8 databases] [license]
English | 한국어
An MCP server that gives AI agents direct access to your databases — 145+ tools across 8 engines.
The point is that the agent reads your schema itself instead of you pasting DDL into a prompt:
Why db-gateway?
Most database MCP servers cover one engine, or a handful of relational ones. If your stack is MySQL for the app, Redshift for analytics, Redis for cache, and Kafka for events, that means four servers with four different config styles.
This is one server, one config block:
DBS decides which of them are enabled — only those tools get registered, so a MySQL-only setup stays a MySQL-only tool list.
See It Work
Every screenshot below is one real session against a development MySQL database holding 249 rows — unedited output, not mock data. The agent calls a single tool, mysql_execute_query, and never sees a host, port, or password: those stay in the client config, and the agent only ever names the alias.
[Step 1 — READ: query the most recently added item]
[Step 2 — CREATE: insert a new item, and MySQL returns its insertId]
[Step 3 — UPDATE: move it to the freezer, matching exactly one row by primary key]
[Step 4 — DELETE: remove that row by primary key]
[Step 5 — VERIFY: the table is back to its original 249 rows]
Point the same server at production with READ_ONLY=true and steps 2 through 4 simply do not exist — the write tools are never registered, so the agent cannot see them to call them.
Quick Start
Requires Node.js 18+. Register it with your MCP client — no install step:
DBS decides which engines are enabled — only those tools get registered.
Connection strings
One string per engine. Semicolons separate multiple instances.
aliasis required. It is how tools address a specific instance — omit it and that engine fails to connect.
Several instances of the same engine — separate their connection strings with a semicolon. The agent picks one by passing an alias argument to any tool; default=true marks the one used when no alias is given:
DynamoDB is the exception — it takes DYNAMODB_REGION, DYNAMODB_ACCESS_KEY_ID, and DYNAMODB_SECRET_ACCESS_KEY instead. See .env.example for every option.
Read-Only Mode
READ_ONLY=true hides write tools from the tool list entirely and restricts *_execute_query to SELECT-style statements.
Register production as a second MCP server with this flag on. The agent then cannot modify production data — the write tools do not exist as far as it can see.
Documentation
- Tool Reference — all 145+ tools, by engine
- Connection Management — pooling, health checks, and why
connectionLimitmultiplies per session - Deployment — SSE mode, Nginx, PM2, sharing one gateway across a team
License
MIT
来源:README.md,提交 895c500
工具
0版本历史
1- v1.0.4最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分