DB MCP Server
A community-driven MCP server that enables AI agents to interact with MySQL, PostgreSQL, MongoDB, and SQLite databases. It supports one instance per database connection, allows configuration via environment variables, and includes optional SSH tunneling for secure remote access without requiring Docker.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
Checks and signals
Each line is separate evidence, not a trust score.
- Popularity 2 GitHub stars
What you can do with it
- Connect to MySQL databases for read-only or read-write operations
- Query PostgreSQL databases using environment variable configuration
- Access MongoDB instances via connection URLs
- Use SQLite with local files or remote files via SSH tunneling
Source and maintenance
- Last repository push
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
db-mcp-server 1.2.1
{
"version": "1.2.1",
"transport": "stdio",
"identifier": "db-mcp-server",
"registryType": "pypi",
"environmentVariables": [
{
"name": "DB_TYPE",
"choices": [
"mysql",
"postgresql",
"mongodb",
"sqlite"
],
"isRequired": true,
"description": "Database type"
},
{
"name": "DB_DATABASE",
"isRequired": true,
"description": "Database name"
},
{
"name": "DB_MODE",
"choices": [
"read-only",
"read-write"
],
"default": "read-only",
"description": "Access mode"
},
{
"name": "DB_HOST",
"default": "localhost",
"description": "Database host (MySQL/PostgreSQL)"
},
{
"name": "DB_PORT",
"format": "number",
"description": "Database port (MySQL: 3306, PostgreSQL: 5432)"
},
{
"name": "DB_USER",
"description": "Database user (MySQL default: root, PostgreSQL default: postgres)"
},
{
"name": "DB_PASSWORD",
"description": "Database password (MySQL/PostgreSQL, optional)"
},
{
"name": "DB_URL",
"description": "MongoDB connection URL (required for MongoDB, e.g. mongodb://...)"
},
{
"name": "SSH_HOST",
"description": "SSH bastion host for tunneling (MySQL/PostgreSQL only)"
},
{
"name": "SSH_PORT",
"format": "number",
"default": "22",
"description": "SSH port"
},
{
"name": "SSH_USER",
"description": "SSH username (default: current OS user)"
},
{
"name": "SSH_KEY",
"format": "filepath",
"description": "Path to SSH private key (e.g. ~/.ssh/id_rsa)"
},
{
"name": "SSH_PASSWORD",
"description": "SSH password (if no key provided)"
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Maintenance history
Public check and source-refresh events. Editorial and ownership records remain private.
- · repository · passed · metadata changed · updated
- · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"db-mcp-server": {
"command": "uvx",
"args": [
"db-mcp-server==1.2.1"
],
"env": {
"DB_TYPE": "<YOUR_DB_TYPE>",
"DB_DATABASE": "<YOUR_DB_DATABASE>",
"DB_MODE": "<YOUR_DB_MODE>",
"DB_HOST": "<YOUR_DB_HOST>",
"DB_PORT": "<YOUR_DB_PORT>",
"DB_USER": "<YOUR_DB_USER>",
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DB_URL": "<YOUR_DB_URL>",
"SSH_HOST": "<YOUR_SSH_HOST>",
"SSH_PORT": "<YOUR_SSH_PORT>",
"SSH_USER": "<YOUR_SSH_USER>",
"SSH_KEY": "<YOUR_SSH_KEY>",
"SSH_PASSWORD": "<YOUR_SSH_PASSWORD>"
}
}
}
}Cline
{
"mcpServers": {
"db-mcp-server": {
"command": "uvx",
"args": [
"db-mcp-server==1.2.1"
],
"env": {
"DB_TYPE": "<YOUR_DB_TYPE>",
"DB_DATABASE": "<YOUR_DB_DATABASE>",
"DB_MODE": "<YOUR_DB_MODE>",
"DB_HOST": "<YOUR_DB_HOST>",
"DB_PORT": "<YOUR_DB_PORT>",
"DB_USER": "<YOUR_DB_USER>",
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DB_URL": "<YOUR_DB_URL>",
"SSH_HOST": "<YOUR_SSH_HOST>",
"SSH_PORT": "<YOUR_SSH_PORT>",
"SSH_USER": "<YOUR_SSH_USER>",
"SSH_KEY": "<YOUR_SSH_KEY>",
"SSH_PASSWORD": "<YOUR_SSH_PASSWORD>"
}
}
}
}VS Code
{
"servers": {
"db-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"db-mcp-server==1.2.1"
],
"env": {
"DB_TYPE": "<YOUR_DB_TYPE>",
"DB_DATABASE": "<YOUR_DB_DATABASE>",
"DB_MODE": "<YOUR_DB_MODE>",
"DB_HOST": "<YOUR_DB_HOST>",
"DB_PORT": "<YOUR_DB_PORT>",
"DB_USER": "<YOUR_DB_USER>",
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DB_URL": "<YOUR_DB_URL>",
"SSH_HOST": "<YOUR_SSH_HOST>",
"SSH_PORT": "<YOUR_SSH_PORT>",
"SSH_USER": "<YOUR_SSH_USER>",
"SSH_KEY": "<YOUR_SSH_KEY>",
"SSH_PASSWORD": "<YOUR_SSH_PASSWORD>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"db-mcp-server": {
"command": "uvx",
"args": [
"db-mcp-server==1.2.1"
],
"env": {
"DB_TYPE": "<YOUR_DB_TYPE>",
"DB_DATABASE": "<YOUR_DB_DATABASE>",
"DB_MODE": "<YOUR_DB_MODE>",
"DB_HOST": "<YOUR_DB_HOST>",
"DB_PORT": "<YOUR_DB_PORT>",
"DB_USER": "<YOUR_DB_USER>",
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DB_URL": "<YOUR_DB_URL>",
"SSH_HOST": "<YOUR_SSH_HOST>",
"SSH_PORT": "<YOUR_SSH_PORT>",
"SSH_USER": "<YOUR_SSH_USER>",
"SSH_KEY": "<YOUR_SSH_KEY>",
"SSH_PASSWORD": "<YOUR_SSH_PASSWORD>"
}
}
}
}Let your agent find its tools
Find servers like DB MCP Server from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.