DBCode
io.dbcodev1.0.1更新于 Oct 3, 2026
Query and explore 100+ databases through your DBCode connections.
概览
让 AI 助手通过用户在受支持编辑器中已有的 DBCode 连接来查询和浏览数据库。
- 功能
- DBCode MCP 服务器把 DBCode 扩展中已保存的数据库连接开放给 AI 助手,用于查询和浏览。它支持 100 多种数据库,包括 PostgreSQL、MySQL、SQL Server、Oracle、SQLite、MongoDB、ClickHouse 和 Snowflake。该 npm 包会找到本机最新安装的 DBCode 并启动其 MCP 服务器;当带有 DBCode 的编辑器打开时,助手通过它工作,没有编辑器打开时则直接读取已保存的连接。当在多个编辑器中使用 DBCode 时,可用 --app 选项选择要暴露哪个编辑器的连接。
- 适用场景
- 适合已经在 VS Code、Cursor、Windsurf、Antigravity 或 Kiro 中通过 DBCode 使用数据库,并希望 AI 助手直接查询和浏览这些连接而无需重新输入凭据的场景。它面向数据探索和临时查询,而不是独立的数据库访问方式。
- 运行要求
- 需要本地桌面环境:在 VS Code、Cursor、Windsurf、Antigravity 或 Kiro 中安装 DBCode 扩展,并需要 Node.js 22.14 或更高版本,以通过 stdio 运行 npm 包 @dbcode/mcp。未声明任何环境变量、请求头或身份验证;数据库凭据来自已有的 DBCode 连接。
安装
在 SourceWeft 中
- 打开 控制台中的 DBCode,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
DBCode MCP server
Let your AI agent query your databases through DBCode, using the connections you already have in DBCode.
DBCode works with 100+ databases, including PostgreSQL, MySQL, SQL Server, Oracle, SQLite, MongoDB, ClickHouse and Snowflake.
Requirements
- The DBCode extension, installed in VS Code, Cursor, Windsurf, Antigravity or Kiro. Install DBCode.
- Node.js 22.14 or newer.
Setup
Claude Code
Codex
GitHub Copilot CLI
Add this to ~/.copilot/mcp-config.json:
Gemini CLI, Claude Desktop, Cursor, Windsurf and other clients
Add this to the client's MCP configuration (for Gemini CLI, ~/.gemini/settings.json; for Claude Desktop, claude_desktop_config.json):
Cursor, VS Code, Windsurf, Antigravity and Kiro can also connect DBCode to their built-in agent without this package. See DBCode's MCP docs.
How it works
The package finds the newest DBCode installed on your machine and starts its MCP server. When an editor with DBCode is open, the agent works through it. With no editor open, the server reads your saved DBCode connections directly.
If you use DBCode in more than one editor, choose which editor's connections the agent sees with --app:
Values (not case-sensitive): Code, Code - Insiders, Cursor, Windsurf, VSCodium, Antigravity IDE, Antigravity, Kiro.
来源:mcp/README.md,提交 3605eaf
工具
0版本历史
1- v1.0.1最新Oct 3, 2026

