MCP server for MySQL and MongoDB databases. One instance per database, no Docker required.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
MCP server for MySQL, PostgreSQL, MongoDB, and SQLite databases. One instance per database, no Docker required.
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.
For multiple databases, add multiple instances:
DB_MODE=read-writeDB_MODE=read-writeDB_MODE=read-writeMIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/db-mcp-server)<a href="https://allmcps.com/mcp/db-mcp-server"><img src="https://allmcps.com/api/badge/db-mcp-server?style=directory" alt="DB MCP Server on AllMCPs" /></a>