PGScope MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PGSCOPE_DSN | Yes | Required. Read-only PostgreSQL connection string (e.g., postgresql://user:pass@host:port/dbname). | |
| PGSCOPE_ALLOW_ANALYZE | No | Whether to allow clients to request actual execution plans (true/false). | false |
| PGSCOPE_ALLOWED_SCHEMAS | No | Comma-separated, case-sensitive list of allowed business schemas. | public |
| PGSCOPE_LOCK_TIMEOUT_MS | No | Lock timeout in milliseconds (range 1-10000). | 1000 |
| PGSCOPE_STATEMENT_TIMEOUT_MS | No | Statement timeout in milliseconds (range 1-60000). | 5000 |
| PGSCOPE_CONNECT_TIMEOUT_SECONDS | No | Connection timeout in seconds (range 1-30). | 5 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tablesB | 分页列出允许 schema 中可 SELECT 的普通业务表及统计信息。 |
| describe_tableA | 查看业务表字段、类型、主外键、索引;不读取样本数据。 |
| queryB | 执行受限的单条只读 SELECT;最多 1000 行 / 1 MiB,结果可能截断。 |
| explainC | 获取 JSON 执行计划。analyze=false 只估算,true 会执行且需服务端许可。 |
| diagnoseA | 结合 SQL、真实表索引和执行计划诊断;建议包含证据,不自动修改数据库。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool serves a distinct purpose: listing tables, describing schema, querying data, explaining execution plans, and diagnosing issues. There is no overlap or ambiguity between them.
All tools use lowercase snake_case, and most follow a verb_noun pattern (list_tables, describe_table). The remaining tools (query, explain, diagnose) are single verbs, which is slightly less consistent but still clear and predictable.
With 5 tools, the server is well-scoped for its purpose of read-only PostgreSQL inspection and diagnosis. Each tool contributes to a complete workflow without redundancy.
The surface covers the full lifecycle of read-only inspection: discovering tables, understanding schema, querying data, analyzing execution plans, and diagnosing performance issues. No obvious gaps for the stated domain.