Install PostgreSQL in Claude Code
claude mcp add postgresql -- npx -y mcp-postgres-server{
"mcpServers": {
"postgresql": {
"command": "npx",
"args": [
"-y",
"mcp-postgres-server"
]
}
}
}Frequently asked questions
What does the PostgreSQL MCP server do?
Access PostgreSQL databases, including those behind an SSH bastion.
Is the PostgreSQL MCP server free?
The server is free, but you will likely need an account. The server itself is free, but it connects to a service that needs an account or API key, which may have paid tiers. Check the provider for current pricing.
Does PostgreSQL run locally or remotely?
Local. Runs on your machine (stdio). You install it with npx, uvx, Docker or from source.
How do I add PostgreSQL to Claude Code?
Run: claude mcp add postgresql -- npx -y mcp-postgres-server
More databases MCP servers
View allMnemosyne
28naem-del/mnemosyne
Evidence-tracked local memory MCP server: one SQLite file; corrections retire dependent memories.
Alibabacloud Tablestore
aliyun/alibabacloud-tablestore-mcp-server
Alibaba Cloud Tablestore: add documents and search them semantically by vectors and scalars, suited to serverless RAG.
Bigquery
ergut/mcp-bigquery-server
Access and query Google BigQuery databases.
Weaviate
weaviate/mcp-server-weaviate
Use Weaviate collections as a knowledge base and as a chat memory store.
Redash
seob717/redash-mcp
Redash integration: natural-language SQL with safety guards and PII detection, table selection, saved queries, dashboards, widgets and alerts.
IBGE Brasil
SidneyBissoli/ibge-br-mcp
Brazilian IBGE data: demographics, geography and economics, including localities, SIDRA tables, census data, population projections and geographic meshes.