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.
Fair trust
51 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade B
70/100 for listing completeness. Lost points: short README, 27 of 35 tools barely described, short summary.
How quality is graded
Where the 51 comes from
22 + 5 + 0 + 10 + 4 + 10 = 51. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 5 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 0 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.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.
{ "mcpServers": { "daedalus-mcp-psycopg2": { "command": "uvx", "args": [ "mcp-psycopg2" ] } }}
Environment variables
This server does not declare environment variables.
Tools35Tool docs quality grade D
All capabilitiesStart a new transaction
cancel_querytoolCancel the current database operation
close_connectiontoolClose an existing connection
close_cursortoolClose a cursor
Commit the current transaction
copy_experttoolExecute custom COPY statement
copy_fromtoolCopy data from file to table
copy_totoolCopy data from table to file
create_cursortoolCreate a new cursor
Create or open a large object
Create a server-side named cursor
execute_manytoolExecute a query with multiple parameter sets
About
mcp-psycopg2
MCP server exposing psycopg2 PostgreSQL database adapter functionality.
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 connectionclose_connection- Close an existing connectionget_connection_info- Get connection details
Transaction Management
begin_transaction- Start a new transactioncommit_transaction- Commit the current transactionrollback_transaction- Rollback the current transactionset_isolation_level- Set transaction isolation level
Cursor Operations
create_cursor- Create a new cursorclose_cursor- Close a cursorexecute_query- Execute a SQL queryexecute_many- Execute a query with multiple parameter setsfetch_one- Fetch one rowfetch_many- Fetch multiple rowsfetch_all- Fetch all remaining rows
SQL Composition
quote_identifier- Quote an SQL identifiermogrify- Return query string after parameter binding
Type Registration
register_json- Register JSON type adapterregister_hstore- Register hstore type adapterregister_composite- Register composite type adapter
COPY Operations
copy_from- Copy data from file to tablecopy_to- Copy data from table to filecopy_expert- Execute custom COPY statement
Server-Side Cursors
create_named_cursor- Create a server-side named cursorscroll_cursor- Scroll through cursor results
Large Objects
create_large_object- Create or open a large objectread_large_object- Read from a large objectwrite_large_object- Write to a large object
Information
get_server_version- Get PostgreSQL server versionget_backend_pid- Get backend process IDget_dsn_parameters- Get connection parametersget_notices- Get database noticesparse_dsn- Parse a connection stringmake_dsn- Create a connection string
Utility
cancel_query- Cancel the current database operationset_session- Set session parameterslist_connections- List all active connectionslist_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
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.