
Mcp Postgres Analytics
@archimedes-market
关于 Mcp Postgres Analytics
Curated by Archimedes Market with a verified Trust Report (security, quality, license, complexity).
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"postgres-analytics": {
"command": "mcp-postgres-analytics",
"args": [
"serve"
],
"env": {
"MCP_POSTGRES_DSN": "postgresql://reader@host:5432/db"
}
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Mcp Postgres Analytics?
Mcp Postgres Analytics is a read-only PostgreSQL analytics agent exposed as an MCP server. It connects to a production database safely—never performing any writes, DDL, or DML—and provides tools for query planning, performance diagnostics, and database statistics.
How to use Mcp Postgres Analytics?
Install via pip install git+https://github.com/archimedes-market/mcp-postgres-analytics, set the environment variable MCP_POSTGRES_DSN to a postgresql:// connection string, then run mcp-postgres-analytics serve.
Key features of Mcp Postgres Analytics
- Reads-only: no DDL, DML, or writes ever
- Startup refuses roles with write privileges (CREATE, INSERT, etc.)
query_planruns onlyEXPLAIN (ANALYZE, BUFFERS, VERBOSE)—never the query itself- Provides tools for slow queries, index usage, table bloat, vacuum status, connections, lock waits, and size summaries
- Connects as a role with minimal
pg_read_all_statsandCONNECTprivileges
Use cases of Mcp Postgres Analytics
- Monitor slow queries via
pg_stat_statements - Analyze query execution plans without running the actual query
- Detect index bloat and missing-index hints
- Identify lock contention and blocking transaction chains
- Track vacuum/autovacuum progress and wraparound risk
FAQ from Mcp Postgres Analytics
Is Mcp Postgres Analytics really read-only?
Yes. The server validates at startup that the role in MCP_POSTGRES_DSN has no CREATE, INSERT, UPDATE, DELETE, TRUNCATE, ALTER, or DROP privileges. If it does, the server exits with a clear error. Additionally, the query_plan tool never executes the submitted query—it runs only EXPLAIN (...).
What database permissions are required?
The role needs only pg_read_all_stats and CONNECT privileges. No write permissions are allowed.
Which tools are available?
Seven tools: query_plan, slow_queries, index_usage, table_bloat, vacuum_status, connection_stats, lock_waits, and size_summary. Each provides production-safe diagnostic information.
How do I install Mcp Postgres Analytics?
Run pip install git+https://github.com/archimedes-market/mcp-postgres-analytics. Then set the MCP_POSTGRES_DSN environment variable to your PostgreSQL connection string and start the server with mcp-postgres-analytics serve.
Does Mcp Postgres Analytics modify the database?
No. It is designed to be a read-only agent. All tools only query system statistics and views; no data is written to the database.
数据与分析 分类下的更多 MCP 服务器
arxiv-latex MCP Server
takashiishidaMCP server that uses arxiv-to-prompt to fetch and process arXiv LaTeX sources for precise interpretation of mathematical expressions in scientific papers.
HubSpot MCP Server
baryhuangA Model Context Protocol (MCP) server that enables AI assistants to interact with HubSpot CRM data, providing built-in vector storage and caching mechanisms help overcome HubSpot API limitations while improving response times.
MCP Server for Data Exploration
reading-plus-aiHealthcare MCP Server
CicatriizA Model Context Protocol (MCP) server providing AI assistants with access to healthcare data and medical information tools, including FDA drug info, PubMed, medRxiv, NCBI Bookshelf, clinical trials, ICD-10, DICOM metadata, and a medical calculator.
🎓 Semantic Scholar MCP Server
JackKuo666🔍 This project implements a Model Context Protocol (MCP) server for interacting with the Semantic Scholar API. It provides tools for searching papers, retrieving paper and author details, and fetching citations and references.
评论