Skip to content

Extension Overview

Temp edited this page Jan 29, 2026 · 1 revision

Extension Overview

postgres-mcp supports 8 PostgreSQL extensions, providing 86 specialized tools for advanced database operations.


Supported Extensions

Extension Tools Purpose Documentation
pgvector 16 AI/ML vector similarity search Vector & AI Extensions
pgcrypto 10 Encryption, hashing, UUIDs Vector & AI Extensions
PostGIS 16 Geospatial operations Spatial & Hierarchy Extensions
ltree 9 Hierarchical tree data Spatial & Hierarchy Extensions
pg_cron 9 Job scheduling Scheduling & Partitioning Extensions
pg_partman 11 Automated partition management Scheduling & Partitioning Extensions
pg_stat_kcache 8 OS-level CPU/memory/IO stats Scheduling & Partitioning Extensions
citext 7 Case-insensitive text Scheduling & Partitioning Extensions

Extension Detection

postgres-mcp automatically detects installed extensions. Tools for missing extensions will:

  1. Return informative errors - Clear message about missing extension
  2. Suggest installation - Guidance on how to install the extension
  3. Not crash - Graceful degradation without breaking the server

Quick Reference by Use Case

AI/ML Workloads

Use the ai-vector preset or ext-ai extension bundle:

--tool-filter ai-vector    # 48 tools: Core + pgvector + transactions
--tool-filter ext-ai       # 25 tools: pgvector + pgcrypto only

Geospatial Applications

Use the geo preset or ext-geo extension bundle:

--tool-filter geo          # 42 tools: Core + PostGIS + transactions
--tool-filter ext-geo      # 24 tools: PostGIS + ltree only

Scheduled Jobs & Partitioning

Use the ext-schedule extension bundle:

--tool-filter ext-schedule # 19 tools: pg_cron + pg_partman

Performance Monitoring

Use the ext-perf extension bundle:

--tool-filter ext-perf     # 28 tools: pg_stat_kcache + performance

Installing Extensions

Most 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_libraries configuration and a server restart.


Related Resources

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.


Extension Documentation

Clone this wiki locally