Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoHTTP port.8000
BIND_HOSTNoHTTP bind address (not HOST).0.0.0.0
DATABASESNoAlternative to DATABASE_URL: either 'alias|url,alias|url' or JSON '{"alias":"url"}'.
TRANSPORTNoTransport protocol: stdio (MCP default) or HTTP.stdio
DEFAULT_DBNoDefault database alias when multiple databases are configured.
ACCESS_MODENoAccess mode: unrestricted (read/write) or restricted (read-only with 30s statement timeout, no COMMIT/ROLLBACK).unrestricted
DB_PROD_URLNoExample multi-database variable. Any DB_<NAME>_URL can be used.
DATABASE_URLNoSingle database connection URI. Sets alias 'default'.
DB_STAGING_URLNoExample multi-database variable. Any DB_<NAME>_URL can be used.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List configured database connections. Call first when unsure which db to use.

list_schemasA

List schemas (user schemas only by default)

list_objectsB

List tables, views, sequences, or extensions in a schema

get_object_detailsC

Columns and indexes for a table/view

execute_sqlC

Execute SQL (max 50 rows returned)

explain_queryC

EXPLAIN a SQL query, optionally with hypothetical indexes

get_top_queriesC

Slow or resource-heavy queries from pg_stat_statements

analyze_workload_indexesB

Recommend indexes based on pg_stat_statements workload

analyze_query_indexesB

Recommend indexes for up to 10 specific queries

analyze_db_healthB

Health checks: index,connection,vacuum,sequence,replication,buffer,constraint,all

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Leon-Achteresch/postgres-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server