PostgreSQL MCP Server · neverinfamous — Claude Code MCP server
Connects PostgreSQL to an AI agent through MCP, with tools for queries, schema inspection, migrations, and database operations.
claude mcp add neverinfamous-postgresql-mcp-server -- docker run -i --rm docker.io/writenotenow/postgres-mcp-enhanced:v1.2.0What PostgreSQL MCP Server does
PostgreSQL MCP Server connects a PostgreSQL database to an AI agent through the Model Context Protocol. It includes 63 tools, 10 resources, and 10 prompts for data operations, schema inspection, migration tracking, and diagnostics. Code Mode runs complex sequences inside an isolated V8 environment, while tool filtering can narrow the server to selected groups.
The server supports connection pooling, HTTP/SSE transport, OAuth 2.1, and PostgreSQL extensions such as pgvector, PostGIS, pg_cron, and pgcrypto. The setup below requires Docker and PostgreSQL 12-18. Without Docker, the claude mcp add command cannot start this server.
What it helps with
- inspect a PostgreSQL database schema
- run database queries through an AI agent
- track migration history
- restrict access by tool groups
- work with PostgreSQL extensions
Example prompts for the agent
- Inspect the PostgreSQL schema and find tables that lack foreign keys.
- Run a query that returns the latest rows from
orders. - Assess the impact of a migration that changes the type of
user_id.
How to install PostgreSQL MCP Server
Platform CLI
claude mcp add neverinfamous-postgresql-mcp-server -- docker run -i --rm docker.io/writenotenow/postgres-mcp-enhanced:v1.2.0Platform CLI
codex mcp add neverinfamous-postgresql-mcp-server -- docker run -i --rm docker.io/writenotenow/postgres-mcp-enhanced:v1.2.0Config file
{
"mcpServers": {
"neverinfamous-postgresql-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/writenotenow/postgres-mcp-enhanced:v1.2.0"
]
}
}
}Config file
{
"servers": {
"neverinfamous-postgresql-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/writenotenow/postgres-mcp-enhanced:v1.2.0"
]
}
}
}Platform CLI
gemini mcp add neverinfamous-postgresql-mcp-server docker run -i --rm docker.io/writenotenow/postgres-mcp-enhanced:v1.2.0Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about PostgreSQL MCP Server
How do I install PostgreSQL MCP Server in Claude Code?
Run claude mcp add neverinfamous-postgresql-mcp-server -- docker run -i --rm docker.io/writenotenow/postgres-mcp-enhanced:v1.2.0.
What does PostgreSQL MCP Server do?
It connects PostgreSQL to an AI agent through MCP and provides tools for queries, schema inspection, migrations, and other database operations.
Which platforms does the server support?
It supports Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, and Gemini CLI.
Similar MCP servers
All MCP servers for Data and databases →PostgreSQL MCP Server by other authors comes first.