Server data from the Official MCP Registry
Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.
Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.
Valid MCP server (1 strong, 4 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (9/9 approved).
12 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: DB_TYPE
Environment variable: DB_DATABASE
Environment variable: DB_MODE
Environment variable: DB_HOST
Environment variable: DB_PORT
Environment variable: DB_USER
Environment variable: DB_PASSWORD
Environment variable: DB_URL
Environment variable: SSH_HOST
Environment variable: SSH_PORT
Environment variable: SSH_USER
Environment variable: SSH_KEY
Environment variable: SSH_PASSWORD
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-stucchi-db": {
"args": [
"db-mcp-server"
],
"command": "uvx"
}
}
}From the project's GitHub README.
MCP server for MySQL, PostgreSQL, MongoDB, and SQLite databases. One instance per database, no Docker required.
uvx db-mcp-server
Configure via environment variables. Each instance connects to a single database.
| Variable | Required | Default | Description |
|---|---|---|---|
DB_TYPE | Yes | — | mysql |
DB_DATABASE | Yes | — | Database name |
DB_PASSWORD | Yes | — | Password |
DB_HOST | No | localhost | Host |
DB_PORT | No | 3306 | Port |
DB_USER | No | root | User |
DB_MODE | No | read-only | read-only or read-write |
| Variable | Required | Default | Description |
|---|---|---|---|
DB_TYPE | Yes | — | postgresql |
DB_DATABASE | Yes | — | Database name |
DB_PASSWORD | Yes | — | Password |
DB_HOST | No | localhost | Host |
DB_PORT | No | 5432 | Port |
DB_USER | No | postgres | User |
DB_MODE | No | read-only | read-only or read-write |
| Variable | Required | Default | Description |
|---|---|---|---|
DB_TYPE | Yes | — | mongodb |
DB_DATABASE | Yes | — | Database name |
DB_URL | Yes | — | Connection URL (mongodb://...) |
DB_MODE | No | read-only | read-only or read-write |
| Variable | Required | Default | Description |
|---|---|---|---|
DB_TYPE | Yes | — | sqlite |
DB_PATH | Yes | — | Path to .db file (local or remote with SSH) |
DB_DATABASE | No | filename | Display name |
DB_MODE | No | read-only | read-only or read-write |
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.
| Variable | Required | Default | Description |
|---|---|---|---|
SSH_HOST | No | — | SSH bastion host (activates tunneling) |
SSH_PORT | No | 22 | SSH port |
SSH_USER | No | Current OS user | SSH username |
SSH_KEY | No | — | Path to private key (~/.ssh/id_rsa) |
SSH_PASSWORD | No | — | SSH password (if no key) |
At least one of SSH_KEY or SSH_PASSWORD is required when SSH_HOST is set. SSH tunneling is not supported for MongoDB.
{
"mcpServers": {
"db-local": {
"command": "uvx",
"args": ["db-mcp-server"],
"env": {
"DB_TYPE": "sqlite",
"DB_PATH": "/path/to/database.db"
}
}
}
}
{
"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"
}
}
}
}
{
"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:
{
"mcpServers": {
"db-prod": {
"command": "uvx",
"args": ["db-mcp-server"],
"env": { "DB_TYPE": "mysql", "DB_DATABASE": "prod", "..." : "..." }
},
"db-analytics": {
"command": "uvx",
"args": ["db-mcp-server"],
"env": { "DB_TYPE": "postgresql", "DB_DATABASE": "analytics", "..." : "..." }
},
"db-staging": {
"command": "uvx",
"args": ["db-mcp-server"],
"env": { "DB_TYPE": "mongodb", "DB_DATABASE": "staging", "..." : "..." }
}
}
}
DB_MODE=read-writeDB_MODE=read-writeDB_MODE=read-writeMIT
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.