Postgresql MCP server written in Rust
README
mcp-postgres is a high-performance MCP server that brings PostgreSQL into Claude Desktop and any MCP-compatible AI tool. 135 PostgreSQL tools, lock-free connection pooling, sub-10ms latency.
MCP suite. One of four high-performance MCP servers written in Rust — mcp-postgres · mcp-filesystem · mcp-memory · mcp-web-search. All implement MCP protocol revision
2025-11-25.
# From crates.io
cargo install mcp-postgres
# Or from Homebrew (macOS)
brew tap corporatepiyush/mcp-postgres
brew install mcp-postgres
# Stdio mode (for Claude Desktop)
mcp-postgres --database-url "postgres://user:pass@localhost:5432/mydb" --stdio
# TCP server (port 3000)
mcp-postgres --database-url "postgres://user:pass@localhost:5432/mydb"
# HTTP/2 server (port 3001)
mcp-postgres --database-url "postgres://user:pass@localhost:5432/mydb" --http-port 3001
Add to claude_desktop_config.json:
{
"mcpServers": {
"postgres": {
"command": "mcp-postgres",
"args": ["--database-url", "postgres://user:pass@localhost:5432/mydb", "--stdio"]
}
}
}
| Feature | mcp-postgres | DIY / psql | |---------|-------------|------------| | 135 purpose-built tools | Schema inspection, DDL, monitoring, replication, batch ops, security audit, text search, extensions, maintenance, and more