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
基本情報
概要はまだありません
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"pg-mcp-server": {
"command": "uv",
"args": [
"sync"
]
}
}
}ツール一覧はまだありません
この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
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 powerful multi-database server implementing the Model Context Protocol (MCP) to provide AI assistants with structured access to databases.
The Xata MCP server lets AI assistants and agents interact with your Xata organizations, projects, and Postgres database branches.

Local database MCP server: your agent sees a migration's impact before it runs, for PostgreSQL, MySQL, SQL Server and SQLite, with no database credentials.
Universal MCP-Server for your Databases optimized for LLMs and AI-Agents.
MCP server for interacting with Neon Management API and databases
コメント