DB MCP Server
Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.
2 stars44 downloads/wk
Reviews
Write oneNobody has reviewed DB MCP Server yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
DB MCP Server tools (7, 3 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
aggregatewrite actionExecute an aggregation pipeline on a MongoDB collection. Pipelines with $out/$merge are blocked on read-only databases.
describeDescribe the structure of a MySQL table (DESCRIBE).
executewrite actionExecute a write query on the MySQL database. Only works if the database is configured with mode='read-write'.
list_collectionsList all collections in the MongoDB database.
list_tablesList all tables in the MySQL database.
querywrite actionExecute a read-only query on the MySQL database. Only SELECT, SHOW, DESCRIBE, EXPLAIN, WITH are allowed on read-only databases.
statusShow connection info: type, host, database, mode, status.
Public scan report
scanner v0.1.10 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan19 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 187 days ago4/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Install DB MCP Server in Claude Code, Cursor or VS Code
claude mcp add db -- uvx db-mcp-server
What the publisher says
From the DB MCP Server repository's README, as published. We do not edit it. Read it on GitHub
db-mcp-server
MCP server for MySQL, PostgreSQL, MongoDB, and SQLite databases. One instance per database, no Docker required.
Installation
uvx db-mcp-serverConfiguration
Configure via environment variables. Each instance connects to a single database.
MySQL
PostgreSQL
MongoDB
SQLite
SSH Tunnel (MySQL / PostgreSQL)
Optionally connect through an SSH bastion host. Set SSH_HOST to activate.
For SQLite over SSH, the remote .db file is downloaded via SFTP before querying. In read-write mode, changes are uploaded back on shutdown.
At least one of SSHKEY or SSHPASSWORD is required when SSH_HOST is set. SSH tunneling is not supported for MongoDB.
Usage in .mcp.json
SQLite (local)
{
"mcpServers": {
"db-local": {
"command": "uvx",
"args": ["db-mcp-server"],
"env": {
"DB_TYPE": "sqlite",
"DB_PATH": "/path/to/database.db"
}
}
}
}SQLite over SSH
{
"mcpServers": {
"db-remote": {
"command": "uvx",
"args": ["db-mcp-server"],
"env": {
"DB_TYPE": "sqlite",
"DB_PATH": "/remote/path/to/database.db",
"SSH_HOST": "server.example.com",
"SSH_USER": "deploy",
"SSH_KEY": "~/.ssh/id_rsa"
}
}
}
}{
"mcpServers": {
"db-prod": {
"command": "uvx",
"args": ["db-mcp-server"],
"env": {
"DB_TYPE": "mysql",
"DB_MODE": "read-only",
"DB_HOST": "db.example.com",
"DB_PORT": "3306",
"DB_USER": "root",
"DB_PASSWORD": "secret",
"DB_DATABASE": "myapp"
}
}
}
}With SSH tunnel
{
"mcpServers": {
"db-behind-bastion": {
"command": "uvx",
"args": ["db-mcp-server"],
"env": {
"DB_TYPE": "postgresql",
"DB_HOST": "10.0.0.5",
"DB_PORT": "5432",
"DB_USER": "postgres",
"DB_PASSWORD": "secret",
"DB_DATABASE": "myapp",
"SSH_HOST": "bastion.example.com",
"SSH_USER": "deploy",
"SSH_KEY": "~/.ssh/id_rsa"
}
}
}
}For multiple databases, add multiple instances:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
DB MCP Server: common questions
- Is DB MCP Server safe?
- With care: it is graded C, so read the findings first (66/100). Read the DB MCP Server safety report
- How do I install DB MCP Server?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does DB MCP Server need an API key?
- Yes. The registry entry asks for
DB_PASSWORD,DB_URL,SSH_PASSWORD. - Is DB MCP Server maintained?
- The last commit was 203 days ago (2026-03-24). The latest release is v1.2.1.
- What can I use instead of DB MCP Server?
- Servers from other publishers that do the same job: DBHub MCP server, Quarry MCP server and NeoSQL MCP server. Compare all DB MCP Server alternatives.
Alternatives to DB MCP Server
Same job from other publishers: the closest match first, then the best rated.
- DBHubToken-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLitenot reviewedWidely usedA
- QuarrySafety-railed database access: Postgres, MySQL, SQLite, Redis. Read-only by default.not reviewedGrowingA
NeoSQL MCPSchemas, SQL, ERDs, and codegen for PostgreSQL, MySQL, Oracle, SQLite, and more via NeoSQL Desktop.not reviewedGrowingA- DbmcpDatabase MCP server for MySQL, MariaDB, PostgreSQL & SQLite with PII redaction and write-preventionnot reviewedGrowingB
- DB Connect MCPMulti-database MCP server for PostgreSQL, MySQL, and ClickHousenot reviewedGrowingB