Install PostgreSQL in Claude Code
npm
claude mcp add neverinfamous-postgresql -- npx -y @neverinfamous/postgres-mcp{
"mcpServers": {
"neverinfamous-postgresql": {
"command": "npx",
"args": [
"-y",
"@neverinfamous/postgres-mcp"
]
}
}
}Docker
claude mcp add neverinfamous-postgresql -- docker run -i --rm docker.io/writenotenow/postgres-mcp:v1.0.2{
"mcpServers": {
"neverinfamous-postgresql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/writenotenow/postgres-mcp:v1.0.2"
]
}
}
}Frequently asked questions
What does the PostgreSQL MCP server do?
PostgreSQL MCP server with 203 tools, connection pooling, HTTP/SSE, OAuth 2.1, and tool filtering
Is the PostgreSQL MCP server free?
Yes, most likely. Open source and no paid account or API key is mentioned in the listing. 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 neverinfamous-postgresql -- npx -y @neverinfamous/postgres-mcp
More databases MCP servers
View allPostgreSQL CVE & Release Intelligence
meob/PG_CVE-MCP
PostgreSQL security for AI agents: CVEs, yanked releases, exploits, and upgrade paths
PostgreSQL
itunified-io/mcp-postgres
PostgreSQL MCP Server — 27 tools for queries, schema, CRUD, DBA, HA & server management
PostgreSQL Performance (read-only)
gouranshul/pg-perf-mcp
Read-only PostgreSQL performance diagnostics: slow queries, EXPLAIN, index advice, locks, functions
Postgres DBA
a-lafon/postgres-dba-mcp
Bounded, read-only PostgreSQL access for AI assistants: nine DBA tools, compact CSV output
pREST
prest/prest-mcp-adapter
Stdio MCP adapter bridging AI clients to pREST’s HTTP /_mcp endpoint for PostgreSQL APIs.
Postgres
sparta2025/postgres-mcp
PostgreSQL MCP server with 15 tools (SQL, EXPLAIN, health, indexes) plus a Gradio UI with LLM chat.