BigeSQL
OfficialIntegrates with GitHub Copilot to allow natural language database queries and management through MCP protocol.
Provides tools for querying, managing tables, and executing SQL statements on MariaDB databases.
Provides tools for querying, managing tables, and executing SQL statements on MySQL databases.
Provides tools for querying, managing tables, and executing SQL statements on PostgreSQL databases.
Provides tools for querying, managing tables, and executing SQL statements on SQLite databases.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BigeSQLshow me the first 5 rows from the users table in my-mysql"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BigeSQL — 开源多数据库管理工具 & MCP Server
一站式数据库管理工具 + AI MCP Server,支持 MySQL/MariaDB、PostgreSQL、SQLite、达梦 DM8。
既是 VS Code 插件(图形化界面),也是 MCP Server(AI 助手可通过协议直接访问数据库),支持 stdio 和 HTTP 双模式。
✨ 功能特性
特性 | 说明 |
🗄️ 多数据库支持 | MySQL / MariaDB / PostgreSQL / SQLite / 达梦 DM8 |
🎨 图形界面 | VS Code 侧边栏管理连接,Webview SQL 编辑器 |
🤖 MCP 协议 | 支持 stdio + HTTP 双模式 |
🔌 连接管理 | 添加/编辑/删除/测试数据库连接 |
📋 表浏览器 | 树形展示表、视图、列结构 |
⌨️ SQL 编辑器 | 语法高亮、执行查询、结果表格展示 |
🚦 服务管理 | 扩展内一键启动/停止 MCP Server,状态栏指示 |
🔒 安全 | 密码不硬编码,支持 |
Related MCP server: SQLite MCP Server
支持的数据库
数据库 | 驱动 | 方式 |
MySQL / MariaDB |
| TCP 直连 |
PostgreSQL |
| TCP 直连 |
SQLite |
| 本地文件 |
达梦 DM8 |
| TCP 直连,无需 ODBC |
🚀 快速开始
安装
cd bige-sql
npm install
npm run compile配置数据库连接
编辑 connections.json 添加您的数据库连接:
{
"connections": {
"my-mysql": {
"type": "mysql",
"host": "192.168.1.100",
"port": 3306,
"user": "root",
"password": "your_password",
"database": "mydb"
},
"my-postgres": {
"type": "postgresql",
"host": "127.0.0.1",
"port": 5432,
"user": "postgres",
"password": "",
"database": "mydb"
},
"my-sqlite": {
"type": "sqlite",
"path": "/data/mydb.db"
},
"my-dameng": {
"type": "dameng",
"host": "192.168.1.23",
"port": 5236,
"user": "SYSDBA",
"password": "SYSDBA"
}
}
}⚠️ 注意:
connections.json已加入.gitignore,避免误提交凭据到 Git。
🎯 使用方式一:VS Code 插件(图形界面)
安装插件
在 VS Code 中按 F5 启动调试,或从 .vsix 安装。
使用界面
侧边栏 — 点击活动栏的 🗄️ BigeSQL 图标
添加连接 — 点击侧边栏顶部的 + 按钮,填写表单
浏览表 — 展开连接节点,查看表和列结构
执行查询 — 右键连接或表,选择 打开 SQL 查询编辑器
MCP Server — 点击底部状态栏 BigeSQL MCP 启动,运行中可点击停止
快捷键 — 在 SQL 编辑器中按
Cmd+Enter/Ctrl+Enter执行
命令列表
命令 | 说明 |
| 打开添加连接表单 |
| 打开 SQL 编辑器 |
| 从文件重新加载连接 |
| 测试连接是否正常 |
| 修改连接配置 |
| 删除数据库连接 |
| 启动 MCP 服务 |
| 停止 MCP 服务 |
🤖 使用方式二:MCP Server(AI 助手)
让 AI 助手(GitHub Copilot、Claude 等)通过 MCP 协议直接访问您的数据库。
方式 A:VS Code 扩展管理(推荐)
安装扩展后,通过以下任一方式启动:
状态栏 — 点击底部 BigeSQL MCP 图标
命令面板 — 执行
BigeSQL: Start MCP Server
启动后自动运行 HTTP 模式,状态栏显示 BigeSQL MCP • 运行中,点击可停止。
方式 B:配置 VS Code MCP(stdio)
在项目 .vscode/mcp.json 中添加:
{
"servers": {
"bige-sql": {
"type": "command",
"command": "node",
"args": ["/path/to/bige-sql/out/src/server.js"],
"description": "BigeSQL 多数据库 MCP Server"
}
}
}重启 VS Code 后,Copilot 即可自动识别并使用数据库工具。
方式 C:独立 HTTP 服务
# stdio + HTTP 双模式(默认端口 5237)
node out/src/server.js --http
# 仅 HTTP 模式
node out/src/server.js --http-only
# 自定义端口
node out/src/server.js --http --port 8080HTTP 端点:http://127.0.0.1:5237/mcp
支持标准 MCP Streamable HTTP 传输,可与任意兼容的 MCP 客户端(其他 IDE、自定义 Agent 等)配合使用。
MCP 工具列表
工具 | 参数 | 说明 |
| — | 列出所有已配置的连接 |
|
| 测试数据库连接 |
|
| 列出所有表和视图 |
|
| 查看表结构 |
|
| 执行 SELECT 查询 |
|
| 执行 INSERT/UPDATE/DELETE |
|
| 列出所有数据库 |
所有工具的
connection参数默认使用第一个配置的连接。
🏗️ 项目架构
bige-sql/
├── package.json # 依赖 & VS Code 扩展清单
├── tsconfig.json # TypeScript 编译配置(strict 模式)
├── connections.example.json # 连接配置示例
├── LICENSE # MIT 许可证
├── src/
│ ├── extension.ts # VS Code 插件入口
│ ├── server.ts # MCP Server(stdio + HTTP 双模式)
│ ├── dbTypes.ts # 数据库类型常量与工具函数
│ ├── connectionManager.ts # 连接配置读写管理
│ ├── databaseService.ts # 数据库查询引擎
│ ├── connectionTreeProvider.ts # 侧边栏树视图
│ └── queryEditorProvider.ts # SQL 编辑器 Webview
├── media/
│ ├── database.svg # 活动栏图标
│ ├── addConnection.js # 添加连接 Webview
│ └── icon.png # 扩展图标
└── out/ # 编译输出(自动生成,已 gitignore)🛠️ 开发
# 安装依赖
npm install
# 编译 TypeScript
npm run compile
# 监听模式
npm run watch
# 在 VS Code 中按 F5 启动调试
# 打包扩展
npx @vscode/vsce package调试插件
在 VS Code 中打开本项目
按
F5或运行 Run Extension 调试配置新窗口会加载扩展
点击活动栏的 BigeSQL 图标开始使用
调试 MCP Server
# 单独运行 MCP Server(stdio)
node out/src/server.js
# HTTP 模式
node out/src/server.js --http使用 VS Code 的 Run MCP Server 调试配置可直接附加调试器。
📄 License
MIT
示例
在 VS Code Copilot Chat 中直接提问:
@bige-sql 查询 idcloud-mysql 中的 ac_user 表前10条记录
@bige-sql 列出 my-postgres 中所有表路线图
MongoDB 支持
连接池健康检查与自动重连
Web UI 连接管理器
查询历史与书签
数据导出 (CSV/JSON/Excel)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bigedev/bige-sql'
If you have feedback or need assistance with the MCP directory API, please join our Discord server