How to install database-mcp-postgres in Claude Code
To install database-mcp-postgres in Claude Code, run "claude mcp add database-mcp-postgres -e POSTGRES_HOST=YOUR_POSTGRES_HOST -e POSTGRES_USER=YOUR_POSTGRES_USER -e POSTGRES_DATABASE=YOUR_POSTGRES_DATABASE -- npx -y @database-mcp/postgres" in your terminal, then check it with "claude mcp list". It takes about a minute.
Built from the published package · server updated 4 days ago
- 1
Run the install command
Open a terminal in your project and run:
claude mcp add database-mcp-postgres -e POSTGRES_HOST=YOUR_POSTGRES_HOST -e POSTGRES_USER=YOUR_POSTGRES_USER -e POSTGRES_DATABASE=YOUR_POSTGRES_DATABASE -- npx -y @database-mcp/postgres - 2
Choose where it applies (optional)
Add --scope user to use it in every project, or --scope project to share it with your team through a .mcp.json file.
claude mcp add --scope user database-mcp-postgres -e POSTGRES_HOST=YOUR_POSTGRES_HOST -e POSTGRES_USER=YOUR_POSTGRES_USER -e POSTGRES_DATABASE=YOUR_POSTGRES_DATABASE -- npx -y @database-mcp/postgres - 3
Check that it is connected
List your servers, or type /mcp inside a Claude Code session to see its status and tools.
claude mcp list
MCP servers run with your permissions. If database-mcp-postgres needs an API key, add it under env in the config. Check its README.
Install database-mcp-postgres in another app
Similar servers
MCP server for interacting with the Supabase platform
Built-in MCP server for ArcadeDB multi-model database (graph, document, vector, time-series)
MCP Toolbox for Databases enables your agent to connect to your database.
Questions
Does database-mcp-postgres work in Claude Code?
Yes. Claude Code supports mcp servers (local and remote), skills and plugins, and database-mcp-postgres installs with the steps above.
database-mcp-postgres does not show up in Claude Code. What now?
Restart Claude Code fully, check the JSON is valid, and make sure Node.js (for npx) is installed. See common MCP errors and fixes.
Is database-mcp-postgres safe?
It scores 51 of 100. Review the code before you install it, and only give it the access it needs. Grades and details.
