MCP Psycopg2
Expose PostgreSQL operations through psycopg2-backed MCP tools for connections, SQL execution, transactions, cursors, and data transfer.
Install MCP Psycopg2
Pick your client, then add it in one click or paste the config.
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"mcp-psycopg2": {
"command": "uvx",
"args": [
"mcp-psycopg2"
]
}
}
}
Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.
claude mcp add --transport stdio mcp-psycopg2 -- uvx mcp-psycopg2Run in your terminal. Add --scope project to share it with your team through .mcp.json.
We couldn’t confirm it starts correctly
We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.
uvx mcp-psycopg2Process exited before answering initialize.
This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .
Overview
Use cases
- Connect an agent to a PostgreSQL database
- Execute parameterized SQL and fetch results
- Manage explicit database transactions
- Transfer table data with PostgreSQL COPY
- Process PostgreSQL cursors and large objects
Key features
- PostgreSQL connections and transaction control
- SQL execution with cursor-based fetching
- COPY, named cursor, and large-object operations
- JSON, hstore, and composite type registration
- DSN, server, backend, and session information
Tools37
What MCP Psycopg2 lets your agent do. Expand a tool for its parameters.
Security & health
What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.
Recent health check succeeded.
Supply-chain signal
No high-severity advisories surfaced by our automated scan.
Scanned 9d ago via OSV.dev · mcp-psycopg2 (PyPI)
Adoption & maintenance
Factual signals from GitHub, npm, and our automated checks — not a rating.
How MCP Psycopg2 works
Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings
Reviews
No reviews yet — be the first to share how it worked for you.
Frequently Asked Questions about MCP Psycopg2
Related MCP servers
Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.
AllMCPs Directory Badge
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-psycopg2)<a href="https://allmcps.com/mcp/mcp-psycopg2"><img src="https://allmcps.com/api/badge/mcp-psycopg2?style=directory" alt="MCP Psycopg2 on AllMCPs" /></a>