-
Notifications
You must be signed in to change notification settings - Fork 1
Extension Overview
postgres-mcp supports 8 PostgreSQL extensions, providing 79 specialized tools for advanced database operations.
Note: Extension tool counts include
create_extensionhelpers but exclude Code Mode; the Tool Groups table adds +1 per group for Code Mode.
| Extension | Tools | Purpose | Documentation |
|---|---|---|---|
| pgvector | 16 | AI/ML vector similarity search | Vector & AI Extensions |
| pgcrypto | 9 | Encryption, hashing, UUIDs | Vector & AI Extensions |
| PostGIS | 15 | Geospatial operations | Spatial & Hierarchy Extensions |
| ltree | 8 | Hierarchical tree data | Spatial & Hierarchy Extensions |
| pg_cron | 8 | Job scheduling | Scheduling & Partitioning Extensions |
| pg_partman | 10 | Automated partition management | Scheduling & Partitioning Extensions |
| pg_stat_kcache | 7 | OS-level CPU/memory/IO stats | Scheduling & Partitioning Extensions |
| citext | 6 | Case-insensitive text | Scheduling & Partitioning Extensions |
postgres-mcp automatically detects installed extensions. Tools for missing extensions will:
-
Return structured errors —
{success: false, error: "...", suggestion: "..."}with clear context - Suggest installation — Actionable guidance on how to install the extension
- Never throw exceptions — Graceful degradation; agents always receive a parseable response
Use the ai-vector preset or ext-ai extension bundle:
--tool-filter ai-vector # 50 tools: Core + pgvector + transactions
--tool-filter ext-ai # 26 tools: pgvector + pgcrypto onlyUse the geo preset or ext-geo extension bundle:
--tool-filter geo # 43 tools: Core + PostGIS + transactions
--tool-filter ext-geo # 24 tools: PostGIS + ltree onlyUse the ext-schedule extension bundle:
--tool-filter ext-schedule # 19 tools: pg_cron + pg_partmanUse the ext-perf extension bundle:
--tool-filter ext-perf # 32 tools: pg_stat_kcache + performanceMost extensions require superuser privileges:
-- AI/ML
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- Geospatial
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS ltree;
-- Scheduling
CREATE EXTENSION IF NOT EXISTS pg_cron;
CREATE EXTENSION IF NOT EXISTS pg_partman;
-- Performance
CREATE EXTENSION IF NOT EXISTS pg_stat_kcache;
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
-- Text
CREATE EXTENSION IF NOT EXISTS citext;Note: Some extensions (pg_cron, pg_stat_kcache) require
shared_preload_librariesconfiguration and a server restart.
Each extension has an associated MCP Resource for real-time status:
| Resource URI | Description |
|---|---|
postgres://vector |
pgvector columns, indexes, recommendations |
postgres://postgis |
PostGIS spatial columns, index status |
postgres://cron |
pg_cron job status, execution history |
postgres://partman |
pg_partman partition configuration, health |
postgres://kcache |
pg_stat_kcache CPU/IO metrics summary |
postgres://crypto |
pgcrypto availability, security recommendations |
See Resources-and-Prompts for the complete resource list.
- Vector-and-AI-Extensions - pgvector + pgcrypto
- Spatial-and-Hierarchy-Extensions - PostGIS + ltree
- Scheduling-and-Partitioning-Extensions - pg_cron, pg_partman, pg_stat_kcache, citext