Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
MCP servers/Databases
daedalus avatar

Mcp Psycopg2

daedalus/mcp-psycopg2

Gives you direct access to PostgreSQL through psycopg2's full API, exposed as MCP tools. You get connection pooling, transaction control with isolation levels, cursor management including server-side cursors, and COPY operations for bulk data transfer. It surfaces less common features like large object handling, hstore and composite type registration, and query parameter mogrification. Useful when you need programmatic database operations beyond basic queries, like managing transactions across multiple operations, working with PostgreSQL-specific types, or handling binary data through large objects. The tool set mirrors psycopg2's structure closely, so if you know the adapter, you'll recognize the operations.

last updated
Apr 6, 2026
View on GitHubSave

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Readme

mcp-psycopg2

MCP server exposing psycopg2 PostgreSQL database adapter functionality.

PyPI Python Ruff

mcp-name: io.github.daedalus/mcp-psycopg2

Install

pip install mcp-psycopg2

Usage

from mcp_psycopg2 import mcp

# Run the MCP server
mcp.run()

MCP Tools

The server exposes the following tools for interacting with PostgreSQL databases:

Connection Management

  • connect - Create a new database connection
  • close_connection - Close an existing connection
  • get_connection_info - Get connection details

Transaction Management

  • begin_transaction - Start a new transaction
  • commit_transaction - Commit the current transaction
  • rollback_transaction - Rollback the current transaction
  • set_isolation_level - Set transaction isolation level

Cursor Operations

  • create_cursor - Create a new cursor
  • close_cursor - Close a cursor
  • execute_query - Execute a SQL query
  • execute_many - Execute a query with multiple parameter sets
  • fetch_one - Fetch one row
  • fetch_many - Fetch multiple rows
  • fetch_all - Fetch all remaining rows

SQL Composition

  • quote_identifier - Quote an SQL identifier
  • mogrify - Return query string after parameter binding

Type Registration

  • register_json - Register JSON type adapter
  • register_hstore - Register hstore type adapter
  • register_composite - Register composite type adapter

COPY Operations

  • copy_from - Copy data from file to table
  • copy_to - Copy data from table to file
  • copy_expert - Execute custom COPY statement

Server-Side Cursors

  • create_named_cursor - Create a server-side named cursor
  • scroll_cursor - Scroll through cursor results

Large Objects

  • create_large_object - Create or open a large object
  • read_large_object - Read from a large object
  • write_large_object - Write to a large object

Information

  • get_server_version - Get PostgreSQL server version
  • get_backend_pid - Get backend process ID
  • get_dsn_parameters - Get connection parameters
  • get_notices - Get database notices
  • parse_dsn - Parse a connection string
  • make_dsn - Create a connection string

Utility

  • cancel_query - Cancel the current database operation
  • set_session - Set session parameters
  • list_connections - List all active connections
  • list_cursors - List all active cursors

Development

git clone https://github.com/daedalus/mcp-psycopg2.git
cd mcp-psycopg2
pip install -e ".[test]"

# run tests
pytest

# format
ruff format src/ tests/

# lint
ruff check src/ tests/

# type check
mypy src/

Details

Repository
github.com/daedalus/mcp-psycopg2
Category
Databases
Package
mcp-psycopg2
Transport
STDIO
Registry
MCP registry, active

More from daedalus

  • Mcp Pwntools
  • Mcp Pyright
  • Mcp Python Bitcoinlib
  • Mcp Qiskit
  • Mcp Recon Ng
  • Mcp Redis Server
  • Mcp Rfc Editor
  • Mcp Rpcbind
  • Mcp Rpn
  • Mcp Rs232
  • Mcp Smbmap
  • Mcp Stl
  • Mcp Sympy
  • Mcp Telegram Bot
  • Mcp Z3 Prover
  • Mcp Ecdsa
  • Mcp Zmq
  • Mcp Server Find1
  • Mcp Server Mssql
  • Mcp Sigrok1
  • Mcp Parigp1
  • Mcp Pymetasploit31
  • Mcp Reverse Engineering1
  • Mcp Reverse Engineering1

Related Databases MCP servers

View all
1brianfofficial avatarRetentionCheckbrianfofficial/retentioncheck-v2Pull churn from Stripe, Postgres, MySQL, or pasted feedback. AI-ranked drivers + fixes.0stars
2evozim avatarServerless-DB-Oracleio.github.evozim/serverless-db-oraclePostgreSQL database administrator with serverless query routing.0stars
3mukundakatta avatarSqlfmt Mcpmukundakatta/mcp-stackDeterministic SQL formatting across 19 dialects (postgres, mysql, snowflake, bigquery, etc.).0stars
4spencerpauly avatarQueryBeario.github.spencerpauly/querybearSafe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.0stars
5wmeireles avatarMigraFlow - Database Migration AIwmeireles/api_migraflowAI-powered database migration. Analyze schemas, generate SQL, calculate risks.0stars
6jarvis-27 avatarPlainQuery | MCP DB Agentjarvis-27/mcp-db-agentQuery PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.0stars