Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MODENoServer mode: 'mcp' for MCP protocol or 'api' for HTTP servermcp
DB_SSLNoEnable SSL for PostgreSQL connectionfalse
DB_HOSTNoPostgreSQL database hostlocalhost
DB_NAMENoPostgreSQL database nameai_mcp_gateway
DB_PORTNoPostgreSQL database port5432
DB_USERNoPostgreSQL database userpostgres
API_HOSTNoHTTP API server host0.0.0.0
API_PORTNoHTTP API server port3000
LOG_FILENoPath to log filelogs/ai-mcp-gateway.log
REDIS_DBNoRedis database number0
LOG_LEVELNoLogging levelinfo
REDIS_HOSTNoRedis server hostnamelocalhost
REDIS_PORTNoRedis server port6379
DB_PASSWORDNoPostgreSQL database password
DATABASE_URLNoPostgreSQL connection URL
DEFAULT_LAYERNoDefault routing layerL0
OPENAI_API_KEYNoAPI key for OpenAI service
REDIS_PASSWORDNoRedis server password (optional)
API_CORS_ORIGINNoCORS origin for HTTP API*
MCP_SERVER_NAMENoMCP server nameai-mcp-gateway
ANTHROPIC_API_KEYNoAPI key for Anthropic service
OSS_MODEL_ENABLEDNoEnable or disable OSS/Local modelsfalse
ENABLE_CROSS_CHECKNoEnable cross-checking between modelstrue
MCP_SERVER_VERSIONNoMCP server version0.1.0
OPENROUTER_API_KEYNoAPI key for OpenRouter service
OSS_MODEL_ENDPOINTNoEndpoint URL for OSS/Local modelshttp://localhost:11434
COST_ALERT_THRESHOLDNoCost alert threshold in dollars1.00
ENABLE_AUTO_ESCALATENoEnable automatic escalation to higher layerstrue
ENABLE_COST_TRACKINGNoEnable cost trackingtrue
MAX_ESCALATION_LAYERNoMaximum layer for auto-escalationL2

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

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/babasida246/ai-mcp-gateway'

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