sqlmate-mcp
Zero-config SQL database MCP server with a browser GUI that connects Claude to MySQL, MariaDB, SQLite, and MSSQL databases.
README
sqlmate-mcp
Zero-config SQL database MCP server with a browser GUI for Claude Code.
Connect Claude to your MySQL, MariaDB, SQLite, or MSSQL databases. sqlmate-mcp reads your existing .env or a .sqlmaterc config, exposes your databases as MCP tools, and opens a live browser GUI so you can browse, edit, and run SQL alongside your AI assistant.
Features
- Zero config — reads
DB_*vars orDATABASE_URLstraight from your project's.env - Multi-connection — manage MySQL, MariaDB, SQLite, and MSSQL from a single server
- 5 MCP tools — list connections, list tables, describe schema, run read queries, run writes
- Write safety — risky operations (DELETE/UPDATE without WHERE, DROP, TRUNCATE) require explicit confirmation
- Browser GUI — paginated data grid, inline cell editing, row delete, schema view, SQL editor
- Live agent feed — watch every MCP tool call stream in real time in the browser
- No native builds — SQLite uses Node.js's built-in
node:sqlite(nonode-gyp)
Requirements
- Node.js ≥ 22.5
Setup
1. Install
npm install -g sqlmate-mcp
2. Register with your editor
Claude Code
claude mcp add --transport stdio sqlmate-mcp sqlmate-mcp
Zed
Open your Zed settings.json (<kbd>Cmd/Ctrl</kbd> + <kbd>,</kbd>) and add a context_servers entry:
{
"context_servers": {
"sqlmate-mcp": {
"command": "sqlmate-mcp",
"args": [],
"env": {}
}
}
}
If you need to point at a specific project's database, pass SQLMATE_PROJECT_ROOT in the env block:
{
"context_servers": {
"sqlmate-mcp": {
"command": "sqlmate-mcp",
"args": [],
"env": {
"SQLMATE_PROJECT_ROOT": "/absolute/path/to/your/project"
}
}
}
}
Once added, the sqlmate-mcp tools will appear in the Zed Agent Panel.
3. Configure your connections
sqlmate-mcp reads connections from the root of whichever project you open in Claude Code (the directory you run claude from). No global config needed — each project uses its own .env or .sqlmaterc. See Connection Setup below.
Manual Installation (from source)
git clone https://github.com/adamrpostjr/sqlmate-mcp.git
cd sqlmate-mcp
npm install
npm run build
Then register using the full path:
claude mcp add --transport stdio sqlmate-mcp node /absolute/path/to/src/index.js
Connection Setup
sqlmate-mcp reads connections from your project root at startup (defaults to cwd, override with SQLMATE_PROJECT_ROOT).
Option 1 — .env file
Laravel-style variables:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=myapp
DB_USERNAME=root
DB_PASSWORD=secret
Or a connection URL:
DATABASE_URL=mysql://root:secret@127.0.0.1:3306/myapp
DATABASE_URL=sqlite:///relative/path/app.db
DATABASE_URL=sqlserver://sa:pass@localhost:1433/master
Supported DB_CONNECTION / URL schemes: mysql, mariadb, sqlite, sqlserver / mssql
Option 2 — .sqlmaterc file
Place a JSON array of connection objects in your project root:
[
{
"name": "Local MySQL",
"type": "mysql",
"host": "127.0.0.1",
"port": 3306,
"username": "root",
"password": "",
"database": "myapp"
},
{
"name": "App SQLite",
"type": "sqlite",
"path": "./database/app.db"
},
{
"name": "MSSQL Dev",
"type": "mssql",
"host": "localhost",
"port": 1433,
"username": "sa",
"password": "YourPassword123",
"database": "master",
"options": { "trustServerCertificate": true }
}
]
A copy-paste starting point is in docs/sqlmaterc-example.json.
MCP Tools
| Tool | Description |
|---|---|
list_connections |
List all detected connections (id, name, type, source) |
list_tables(connectionId) |
List table names for a connection |
describe_table(connectionId, table) |
Column names, types, nullability, and primary key info |
run_query(connectionId, sql) |
Run a read-only query (SELECT, EXPLAIN, SHOW, PRAGMA) |
run_write(connectionId, sql) |
Run an INSERT, UPDATE, DELETE, or DDL statement |
run_write performs risk assessment before executing. Operations that affect all rows (no WHERE clause), DROP, TRUNCATE, or ALTER...DROP COLUMN will pause and ask Claude to confirm with confirm: true before proceeding.
Browser GUI
Opens automatically at http://localhost:4737 on startup.
- Browse any table with a paginated data grid
- Click a cell to edit it inline
- Delete rows with the trash icon
- Toggle between data view and column schema view
- Run arbitrary SQL in the built-in SQL editor
- Reconnect a database without restarting the server
- Watch a live feed of every MCP tool call Claude makes
Environment Variables
| Variable | Default | Description |
|---|---|---|
SQLMATE_PROJECT_ROOT |
cwd |
Directory to search for .env and .sqlmaterc |
SQLMATE_PORT |
4737 |
Port for the browser GUI |
SQLMATE_NO_OPEN |
— | Set to 1 to skip auto-opening the browser |
Development
# Start the backend (serves the built GUI at :4737)
node src/index.js
# Frontend hot-reload dev server (proxies /api to :4737)
cd frontend && npm run dev
The frontend is Svelte 5 + Vite + Tailwind. Production build output goes to /public, which Express serves statically.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。