MCP server for PostgreSQL database operations - query, explore schemas, and analyze tables
MCP server for PostgreSQL database operations - query, explore schemas, and analyze tables. That is what the postgresql mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.
MCP server for PostgreSQL database operations. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.
The server publishes 1 tool. What each one is for:
TypeScript — The TypeScript tool exposed by this serverConfiguration is passed through the environment: POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
The server ships on npm as npx, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.
Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Postgresql's toolset — TypeScript — is a fair guide to whether it matches your workflow.
This entry was verified against Postgresql's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| TypeScript | The TypeScript tool exposed by this server. |
{
"mcpServers": {
"postgresql-1": {
"command": "npx",
"args": ["-y", "npx"],
"env": {
"POSTGRES_HOST": "your-value",
"POSTGRES_PORT": "your-value",
"POSTGRES_USER": "your-value",
"POSTGRES_PASSWORD": "your-value",
"POSTGRES_DB": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| POSTGRES_HOST | Endpoint or connection string the server talks to. | Optional |
| POSTGRES_PORT | Configuration value read at startup. | Optional |
| POSTGRES_USER | Configuration value read at startup. | Optional |
| POSTGRES_PASSWORD | Configuration value read at startup. | Optional |
| POSTGRES_DB | Configuration value read at startup. | Optional |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.