Skip to content
MCP server
Registry

mcp-psycopg2 MCP Server

MCP server exposing psycopg2 PostgreSQL database adapter functionality

mcp-psycopg2 scores 51 (Fair), licensed MIT and written in Python. It installs as a local process. It declares 35 tools. Filed under Databases. GitHub shows 0 stars. Package registries report about 13 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by daedalusMITPython0 stars
Trust score
51Fair
Trust score 51 of 100, Fair

Fair trust

51 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 51 comes from

22 + 5 + 0 + 10 + 4 + 10 = 51. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance5 / 20

How recently the repository saw a commit or release.

Maintenance: 5 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "daedalus-mcp-psycopg2": {      "command": "uvx",      "args": [        "mcp-psycopg2"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools35Tool docs quality grade D

All capabilities

About

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/

Frequently asked questions

What is mcp-psycopg2 MCP Server?

MCP server exposing psycopg2 PostgreSQL database adapter functionality

How do I install mcp-psycopg2 MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. mcp-psycopg2 MCP Server runs locally from the PyPI package mcp-psycopg2 with the command uvx mcp-psycopg2.

Is mcp-psycopg2 MCP Server free and open source?

Yes. mcp-psycopg2 MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does mcp-psycopg2 MCP Server support remote (HTTP) connections?

No remote endpoint is listed for mcp-psycopg2 MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does mcp-psycopg2 MCP Server provide?

mcp-psycopg2 MCP Server provides 35 tools, including begin_transaction, cancel_query, close_connection, and close_cursor. See the full tool list for descriptions and parameters.

How is mcp-psycopg2 MCP Server's trust score calculated?

mcp-psycopg2 MCP Server scores 51 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server