Skip to main content
Glama
chncaesar

pg-semantic-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LLM_MODELNoLLM model namegpt-4o-mini
LLM_API_KEYNoRequired for search_schema
DATABASE_URLYesPostgreSQL connection string
LLM_BASE_URLNoOpenAI-compatible endpointhttps://api.openai.com/v1
CACHE_SCHEMASNoComma-separated schema names to cacheall
SEMANTIC_FILENoPath to your semantic layer markdown
SAMPLE_DATA_LIMITNoDefault row count for sample_data5
CACHE_REFRESH_MINUTESNoBackground cache refresh interval30

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

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_tablesA

List all tables in the database with their comments.

describe_tableB

Return column metadata for a table.

sample_dataB

Return sample rows from a table.

search_schemaA

Semantically search tables and columns by keyword using LLM.

Combines the in-memory schema cache and the semantic layer markdown (if configured) into a prompt, then calls the configured LLM to find relevant tables and columns.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: list_tables for enumeration, describe_table for schema details, sample_data for row previews, and search_schema for semantic discovery. There is no ambiguity or overlap between them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case (list_tables, describe_table, sample_data, search_schema). The naming is predictable and follows standard database exploration terminology.

Tool Count5/5

With 4 tools, the server is well-scoped for its purpose of schema exploration and semantic search. Each tool adds unique value without unnecessary bloat, fitting comfortably in the ideal 3-15 tool range.

Completeness4/5

The core schema exploration lifecycle (list, describe, sample, search) is covered completely. Minor gaps exist such as no direct schema listing or database-level information, but these are not essential for the server's apparent purpose.

Maintenance

ActivitySlowing
ResponsivenessNo issues