DB MCP Server
by stucchiio.github.stucchi/dbv1.2.1
Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.
context tax
queued
security
queued
cold start
queued
freshness
Stale7mo ago
Install DB MCP server
Install in Claude Code
claude mcp add db-stucchi -e DB_TYPE='<db-type>' -e DB_DATABASE='<db-database>' -e DB_PASSWORD='<db-password>' -e DB_URL='<db-url>' -e SSH_PASSWORD='<ssh-password>' -- uvx db-mcp-serverInstall in Cursor
{
"mcpServers": {
"db-stucchi": {
"command": "uvx",
"args": [
"db-mcp-server"
],
"env": {
"DB_TYPE": "<db-type>",
"DB_DATABASE": "<db-database>",
"DB_PASSWORD": "<db-password>",
"DB_URL": "<db-url>",
"SSH_PASSWORD": "<ssh-password>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"db-stucchi": {
"command": "uvx",
"args": [
"db-mcp-server"
],
"env": {
"DB_TYPE": "<db-type>",
"DB_DATABASE": "<db-database>",
"DB_PASSWORD": "<db-password>",
"DB_URL": "<db-url>",
"SSH_PASSWORD": "<ssh-password>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"db-stucchi": {
"type": "stdio",
"command": "uvx",
"args": [
"db-mcp-server"
],
"env": {
"DB_TYPE": "<db-type>",
"DB_DATABASE": "<db-database>",
"DB_PASSWORD": "<db-password>",
"DB_URL": "<db-url>",
"SSH_PASSWORD": "<ssh-password>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"db-stucchi": {
"command": "uvx",
"args": [
"db-mcp-server"
],
"env": {
"DB_TYPE": "<db-type>",
"DB_DATABASE": "<db-database>",
"DB_PASSWORD": "<db-password>",
"DB_URL": "<db-url>",
"SSH_PASSWORD": "<ssh-password>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| DB_TYPE | yes | — | Database type |
| DB_DATABASE | yes | — | Database name |
| DB_MODE | — | — | Access mode |
| DB_HOST | — | — | Database host (MySQL/PostgreSQL) |
| DB_PORT | — | — | Database port (MySQL: 3306, PostgreSQL: 5432) |
| DB_USER | — | — | Database user (MySQL default: root, PostgreSQL default: postgres) |
| DB_PASSWORD | — | yes | Database password (MySQL/PostgreSQL, optional) |
| DB_URL | — | yes | MongoDB connection URL (required for MongoDB, e.g. mongodb://...) |
| SSH_HOST | — | — | SSH bastion host for tunneling (MySQL/PostgreSQL only) |
| SSH_PORT | — | — | SSH port |
| SSH_USER | — | — | SSH username (default: current OS user) |
| SSH_KEY | — | — | Path to SSH private key (e.g. ~/.ssh/id_rsa) |
| SSH_PASSWORD | — | yes | SSH password (if no key provided) |
Freshness
Stale — last maintenance signal 7mo ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-03-24 · 7mo ago · GitHub
Latest release
no data · GitHub
Package published
no data · npm/PyPI
Registry entry updated
2026-03-24 · 7mo ago · official registry · v1.2.1
FAQ
›How do I install the DB MCP server in Claude Code?
Run: claude mcp add db-stucchi -e DB_TYPE='<db-type>' -e DB_DATABASE='<db-database>' -e DB_PASSWORD='<db-password>' -e DB_URL='<db-url>' -e SSH_PASSWORD='<ssh-password>' -- uvx db-mcp-server. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does DB require an API key?
Yes. It expects DB_TYPE, DB_DATABASE, DB_PASSWORD, DB_URL, SSH_PASSWORD, of which 3 are secrets.
›Can I use DB as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is DB in the official MCP registry?
Yes, as io.github.stucchi/db.
Alternatives to DB
Other database MCP servers.