$ timeahead.in
mcp/database-mcp/install/vscode

install database-mcp on VS Code

Requires Python 3.10+ and uvx (install with `pipx install uv`) so the package can be resolved on first run. VS Code (Copilot) uses a `servers` root key with an explicit `type` field — different from the `mcpServers` shape used by Claude Desktop and Cursor. Paste the config below, then follow the reload step to register database-mcp.

paste into
workspace: .vscode/mcp.json (project root — committed with the repo)
user: ~/.vscode/mcp.json
{
  "servers": {
    "database-mcp": {
      "type": "stdio",
      "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\"}]"
      }
    }
  }
}
then: VS Code picks up the change. Run 'MCP: List Servers' from the command palette to verify.
other clients
Claude DesktopCursorWindsurfClaude Code
← back to database-mcp