$ timeahead.in
mcp/database-mcp/install/claude-code

install database-mcp on Claude Code

Requires Python 3.10+ and uvx (install with `pipx install uv`) so the package can be resolved on first run. Claude Code persists MCP servers via its CLI — no config file to edit, just run the command below once. Paste the config below, then follow the reload step to register database-mcp.

run this in your terminal
cli: Run the command below in your terminal — Claude Code persists it for you.
claude mcp add 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"}] -- uvx database-mcp
then: No reload needed — the next session picks up the new server.
other clients
Claude DesktopCursorWindsurfVS Code (Copilot)
← back to database-mcp