T
tyrchen/postgres-mcp
postgres mcp implementation
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Install & config
- Copy the command above
- Paste it as one entry under
mcpServersinclaude_desktop_config.json— local servers take command + args (example: clients) - Restart your client
Install command from the repository
cargo install postgres-mcp
Parsed from the README we fetched on 2026-11-04; we have not executed it.
This is the install method the repository states, not an MCP client config, so no JSON is generated.
Key names differ by client: Clients & CLI
- Source
- collected from the abordage/awesome-mcp list · type: MCP server
- Harvest history
- first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
- Score
- score 1,003 · 10 sources · mcp
- Install
cargo install postgres-mcp
FAQ (answers come from our records)
How do I install it?
The repository provides this install command:
cargo install postgres-mcp. It comes from the repository itself; we cannot guarantee it runs as-is in your client.Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.
# Postgres MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Postgres MCP is a Model Context Protocol (MCP) implementation for PostgreSQL databases. It provides a standardized interface for AI agents to interact with PostgreSQL databases through a set of well-defined commands.
## Features
Connection Management
Register and unregister database connections
Support for multiple concurrent database connections
Connection pooling for efficient resource management
Database Operations
Execute SELECT queries
Insert new records
Update existing records
Delete records
Create and drop tables
Create and drop indexes
Describe table structures
List tables in a schema
SQL Validation
Built-in SQL parser for validating statements
Support for PostgreSQL-specific syntax
Safety checks to ensure only allowed operations are performed
## Installation
bash
cargo install postgres-mcp
## Usage
### Configuration
Add the following to your MCP configuration file:
json
"mcpServers": {
"postgres": {
"command": "postgres-mcp",
"args": ["stdio"]
or run it in SSE mode:
First, start the postgres-mcp server in SSE mode:
bash
postgres-mcp sse
Then, configure the MCP config file to use the SSE mode:
json
"mcpServers": {
"postgres": {
"url": "http://localhost:3000/sse"
Once you started the postgres-mcp server, you should see the status of the MCP config is green, like this (cursor):
And then you could interact with it via the agent, like this (cursor):
### Commands
#### Register a Database Connection
bash
pgmcp register "postgres://postgres:postgres@localhost:5432/postgres"
# Returns a connection ID (UUID)
#### Unregister a Connection
bash
pgmcp unregister
#### Execute a SELECT Query
bash
pgmcp query "SELECT FROM users"
#### Insert Data
bash
pgmcp insert "INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com')"
#### Update Data
bash
pgmcp update "UPDATE users SET name = 'Jane Doe' WHERE id = 1"
#### Delete Data
bash
pgmcp delete "users" "1"
#### Create a Table
bash
pgmcp create "CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(255), email VARCHAR(255))"
#### Drop a Table
bash
pgmcp drop "users"
#### Create an Index
bash
pgmcp createindex "CREATE INDEX idxusersname ON users (name)"
#### Drop an Index
bash
pgmcp dropindex "idxusersname"
#### Describe a Table
bash
pgmcp describe "users"
## Dependencies
Rust 1.70 or later
PostgreSQL 12 or later
Required Rust crates:
## Features
Connection Management
Register and unregister database connections
Support for multiple concurrent database connections
Connection pooling for efficient resource management
Database Operations
Execute SELECT queries
Insert new records
Update existing records
Delete records
Create and drop tables
Create and drop indexes
Describe table structures
List tables in a schema
SQL Validation
Built-in SQL parser for validating statements
Support for PostgreSQL-specific syntax
Safety checks to ensure only allowed operations are performed
## Installation
bash
cargo install postgres-mcp
## Usage
### Configuration
Add the following to your MCP configuration file:
json
"mcpServers": {
"postgres": {
"command": "postgres-mcp",
"args": ["stdio"]
or run it in SSE mode:
First, start the postgres-mcp server in SSE mode:
bash
postgres-mcp sse
Then, configure the MCP config file to use the SSE mode:
json
"mcpServers": {
"postgres": {
"url": "http://localhost:3000/sse"
Once you started the postgres-mcp server, you should see the status of the MCP config is green, like this (cursor):
And then you could interact with it via the agent, like this (cursor):
### Commands
#### Register a Database Connection
bash
pgmcp register "postgres://postgres:postgres@localhost:5432/postgres"
# Returns a connection ID (UUID)
#### Unregister a Connection
bash
pgmcp unregister
#### Execute a SELECT Query
bash
pgmcp query "SELECT FROM users"
#### Insert Data
bash
pgmcp insert "INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com')"
#### Update Data
bash
pgmcp update "UPDATE users SET name = 'Jane Doe' WHERE id = 1"
#### Delete Data
bash
pgmcp delete "users" "1"
#### Create a Table
bash
pgmcp create "CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(255), email VARCHAR(255))"
#### Drop a Table
bash
pgmcp drop "users"
#### Create an Index
bash
pgmcp createindex "CREATE INDEX idxusersname ON users (name)"
#### Drop an Index
bash
pgmcp dropindex "idxusersname"
#### Describe a Table
bash
pgmcp describe "users"
## Dependencies
Rust 1.70 or later
PostgreSQL 12 or later
Required Rust crates:
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/tyrchen-postgres-mcp/)
- Source
- awesome · https://github.com/tyrchen/postgres-mcp
- Browse by field
- MCP servers
- Listed by
- 10 independent sources
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.