Requires Python 3.10+ and uvx (install with `pipx install uv`) so the package can be resolved on first run. Cursor reloads its MCP servers automatically the moment the file is saved — no restart needed. Paste the config below, then follow the reload step to register database-mcp.
~/.cursor/mcp.json.cursor/mcp.json (commit alongside your repo){
"mcpServers": {
"database-mcp": {
"command": "uvx",
"args": [
"database-mcp"
],
"env": {
"DB_CONFIGS": "[{\"id\":\"pg_main\",\"db_type\":\"pg\",\"configuration\":{\"host\":\"localhost\",\"port\":5432,\"user\":\"user\",\"password\":\"pw\",\"dbname\":\"postgres\"},\"description\":\"PostgreSQL Database\"},{\"id\":\"mysql_data\",\"db_type\":\"mysql\",\"configuration\":{\"host\":\"localhost\",\"port\":3306,\"user\":\"root\",\"password\":\"pass\",\"database\":\"mysql\"},\"description\":\"MySQL Database\"}]"
}
}
}
}