How do I connect to a database?
Use the `connect` tool with a PostgreSQL connection string. It returns a secure connection ID used for subsequent operations.
@stuzero
Basic information
No overview available yet
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"pg-mcp-server": {
"command": "uv",
"args": [
"sync"
]
}
}
}Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
PG-MCP is a server implementation of the Model Context Protocol (MCP) for PostgreSQL databases. It provides a comprehensive API for AI agents to discover, connect to, query, and understand PostgreSQL databases through MCP’s resource-oriented architecture. The server includes multi-database support, rich catalog information, built-in extension context (e.g., PostGIS, pgvector), and query explanation tools.
Install via Docker (docker-compose up -d) or manually (uv sync, then python -m server.app). Use the provided test scripts (test.py and example-clients/claude_cli.py) to verify functionality. For AI agents, use the server’s tools (connect, disconnect, pg_query, pg_explain) and explore schema resources via pgmcp://{conn_id}/ URIs.
pg_query) with connection IDpg_explain tool to analyze query execution plans in JSONUse the `connect` tool with a PostgreSQL connection string. It returns a secure connection ID used for subsequent operations.
Yes, read-only mode is enforced via transaction settings by default.
Built-in context is provided for PostGIS and pgvector. Additional extensions can be added via YAML configuration files.
Credentials are sent once during initial connection and are never exposed in resource URLs—only opaque connection IDs are used.
It requires Python 3.13+ and uses SSE (Server-Sent Events) transport for production use.
A Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma

Access millions of official legal and regulatory source documents from 155+ jurisdictions via MCP. Lawstronaut supports AI agents with structured legal research, legal data, laws, regulations, cases, guidance, official s

nuzur is a model-first database platform for MySQL and PostgreSQL. The MCP server lets any AI assistant or agent (Claude, Cursor, Gemini, or anything else that speaks MCP) design your schema, query your data, generate mi
An official Qdrant Model Context Protocol (MCP) server implementation
Comments