MCP Server
MCP
DB MCP Server
Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.
Install
uvx db-mcp-server
Configuration Example
{
"remotes": [],
"packages": [
{
"registryType": "pypi",
"identifier": "db-mcp-server",
"version": "1.2.1",
"transport": {
"type": "stdio"
},
"environmentVariables": [
{
"description": "Database type",
"isRequired": true,
"choices": [
"mysql",
"postgresql",
"mongodb",
"sqlite"
],
"name": "DB_TYPE"
},
{
"description": "Database name",
"isRequired": true,
"name": "DB_DATABASE"
},
{
"description": "Access mode",
"default": "read-only",
"choices": [
"read-only",
"read-write"
],
"name": "DB_MODE"
},
{
"description": "Database host (MySQL/PostgreSQL)",
"default": "localhost",
"name": "DB_HOST"
},
{
"description": "Database port (MySQL: 3306, PostgreSQL: 5432)",
"format": "number",
"name": "DB_PORT"
},
{
"description": "Database user (MySQL default: root, PostgreSQL default: postgres)",
"name": "DB_USER"
},
{
"description": "Database password (MySQL/PostgreSQL, optional)",
"isSecret": true,
"name": "DB_PASSWORD"
},
{
"description": "MongoDB connection URL (required for MongoDB, e.g. mongodb://...)",
"isSecret": true,
"name": "DB_URL"
},
{
"description": "SSH bastion host for tunneling (MySQL/PostgreSQL only)",
"name": "SSH_HOST"
},
{
"description": "SSH port",
"format": "number",
"default": "22",
"name": "SSH_PORT"
},
{
"description": "SSH username (default: current OS user)",
"name": "SSH_USER"
},
{
"description": "Path to SSH private key (e.g. ~/.ssh/id_rsa)",
"format": "filepath",
"name": "SSH_KEY"
},
{
"description": "SSH password (if no key provided)",
"isSecret": true,
"name": "SSH_PASSWORD"
}
]
}
]
}
mcp
model-context-protocol
pypi
By
Comments
Sign in to leave a comment