
Mcp Psycopg2
io.github.daedalusPublished by GitHub account daedalusv0.1.0Updated Oct 25, 2026
MCP server exposing psycopg2 PostgreSQL database adapter functionality
Overview
A local MCP server that exposes psycopg2 PostgreSQL adapter functionality, letting an assistant connect to and query PostgreSQL databases.
- What you can do
- Open, close, inspect and list database connections, and parse or build connection strings and DSN parameters via psycopg2-style tools. Manage transactions: begin, commit, rollback, set isolation level and session parameters. Create and close cursors, execute single or parameterized batch SQL, and fetch one, many or all rows. Quote identifiers, bind parameters, and register JSON, hstore and composite type adapters. Run COPY operations, server-side named cursors, large-object read/write, and cancel queries.
- When to use it
- Useful when an assistant needs direct, low-level access to a PostgreSQL database from the desktop: running ad-hoc SQL, inspecting schema or data, managing transactions, or moving data with COPY and large objects.
- Requirements
- Runs as a local process on the user's machine, installed from the PyPI package mcp-psycopg2 (Python). A reachable PostgreSQL server and valid connection details are needed; the manifest declares no environment variables, headers or authentication, so connection parameters are supplied through the tools.
Installation
In SourceWeft
- Open Mcp Psycopg2 in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
mcp-psycopg2
MCP server exposing psycopg2 PostgreSQL database adapter functionality.
mcp-name: io.github.daedalus/mcp-psycopg2
Install
Usage
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
Source: README.md at commit 768b769
Tools
0Version history
1- v0.1.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts