PostgreSQL Model Context Protocol (PG-MCP) Server
@tanster1234
关于 PostgreSQL Model Context Protocol (PG-MCP) Server
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp_server_postgres": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is PostgreSQL Model Context Protocol (PG-MCP) Server?
It is an MCP server for PostgreSQL databases that provides a comprehensive API for AI agents to discover, connect to, query, and understand PostgreSQL databases through MCP's resource-oriented architecture. It is built for AI agents and developers who need to integrate natural language interfaces with PostgreSQL.
How to use PostgreSQL Model Context Protocol (PG-MCP) Server?
Install via Docker or manual setup with Python 3.13+. Run python -m server.app after installing dependencies with uv sync --frozen. Clients connect to the SSE endpoint (default http://localhost:8000/sse) and invoke tools like connect, pg_query, and pg_explain using a secure connection ID.
Key features of PostgreSQL Model Context Protocol (PG-MCP) Server
- Multi-database support with simultaneous connections.
- Rich catalog information from table/column descriptions.
- Query execution plan analysis via
pg_explaintool. - Built-in extension context for PostGIS and pgvector.
- Read-only mode enforced via transaction settings.
- Connection pooling and secure opaque connection IDs.
Use cases of PostgreSQL Model Context Protocol (PG-MCP) Server
- AI agents exploring database schema and sample data.
- Natural language to SQL conversion using Claude CLI.
- Automated database introspection for documentation or analysis.
- Query performance analysis with execution plan tool.
FAQ from PostgreSQL Model Context Protocol (PG-MCP) Server
What are the runtime requirements?
Python 3.13+ and a PostgreSQL database. The server can be run via Docker or manually.
How do I connect a database?
Use the connect tool with a PostgreSQL connection string to obtain an opaque connection ID for subsequent queries.
Is the server read-only?
Yes, the server runs in read-only mode enforced via transaction settings.
What PostgreSQL extensions are supported?
Built-in context for PostGIS and pgvector is provided, and additional extensions can be added via YAML files.
How is security handled?
Connection details are never exposed in resource URLs; only opaque connection IDs are used. Credentials are sent only once during the initial connection.
数据库 分类下的更多 MCP 服务器
MongoDB MCP Server
mongodb-jsA Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
mcp-server-duckdb
ktanaka101A Model Context Protocol (MCP) server implementation for DuckDB, providing database interaction capabilities
Database Gateway
centralmindUniversal MCP-Server for your Databases optimized for LLMs and AI-Agents.
评论