Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HF_TOKENNoHuggingFace token for private repos in model discovery
OLLAMA_URLNoOllama API endpointhttp://localhost:11434
EMBEDDER_MODENoEmbedding mode: 'local' uses Xenova transformer, 'api' forces OpenAI APIlocal
LM_STUDIO_URLNoLM Studio API endpointhttp://localhost:1234
OPENAI_API_KEYNoFallback API embedder key for semantic code search
VOYAGE_API_KEYNoAlternative API embedder key for semantic code search
LATENCY_ROUTINGNoEnables latency-based routing (set to 'true')
MCP_SERVERS_DIRNoDirectory for dynamic MCP server plugins./mcp-servers
LLM_GATEWAY_PORTNoHTTP server port3456
FALLBACK_STRATEGYNoEnables free-model fallback routing (e.g., 'free-models')
LOCAL_LLM_ENABLEDNoEnable local LLM routing (set to 'true')false
FREE_MODEL_CATALOGNoLoads the free-model catalog at startup (set to 'true')
LLM_GATEWAY_DB_PATHNoSQLite vault path~/.llm-gateway/vault.db
MCP_DYNAMIC_SERVERSNoEnable dynamic MCP server plugins (set to 'true')
AUTO_DISCOVER_MODELSNoEnable HF auto-discovery of local models at startupfalse
TRANSFORMERS_OFFLINENoSet to '1' to use only cached HuggingFace model, skip download
MODEL_ROUTING_ENABLEDNoEnable model routing (set to 'true')
LLM_GATEWAY_AUTH_TOKENNoBearer token for HTTP routes, must be at least 32 characters
LLM_GATEWAY_MASTER_KEYNo64-char hex key, otherwise auto-generated and saved to ~/.llm-gateway/master.key
MAX_COMPARISON_COST_USDNoCaps comparison-service spending
ENABLE_OUTPUT_COMPRESSIONNoEnable RTK-style output compressiontrue
LLM_GATEWAY_AUTH_REQUIREDNoForce auth on or off explicitly
OPTIMIZE_MESSAGES_ENABLEDNoEnable three-part prompt optimizationtrue
LLM_GATEWAY_SECURITY_PROFILENoSecurity profile for MCP tool exposure: local-dev, restricted, or openlocal-dev

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
llm_generateA

Generate text using an LLM. Routes to the best available provider with automatic fallback. Supports three-part prompts (system/context/instruction) for improved quality.

vault_storeB

Store an API key in the encrypted credential vault. Upserts by (provider, keyName, project).

vault_listA

List all stored credentials with masked values. Optionally filter by project.

vault_deleteB

Delete a stored credential by its ID.

llm_modelsB

List all available models across registered providers.

vault_store_fileA

Store an auth file (e.g. auth.json) in the encrypted vault. Upserts by (provider, fileName, project).

vault_list_filesB

List all stored auth files (metadata only). Optionally filter by project.

vault_delete_fileB

Delete a stored auth file by its ID.

list_groupsA

List all provider groups for load balancing.

create_groupB

Create a new provider group for load balancing.

delete_groupB

Delete a provider group by its ID.

configure_circuit_breakerB

Configure circuit breaker settings. Updates thresholds and backoff for all breakers.

circuit_breaker_statsA

Get circuit breaker stats for all providers. Shows state, failures, successes, cooldown.

usage_summaryB

Get cost/usage summary. Returns total requests, tokens, cost, with optional breakdown by provider, model, project, hour, or day.

usage_queryC

Query individual usage records with filters. Returns raw usage log entries.

code_searchB

Search code semantically. Finds functions, classes, and blocks matching a query using keyword + fuzzy matching. Optionally follows imports for related code.

index_codebaseA

Index a codebase directory for semantic code search. Scans files, extracts functions/classes/blocks, and builds an in-memory search index.

shared_stateA

CRDT-based shared state for multi-agent collaboration. Supports conflict-free read/write/merge with G-Counter (token tracking), LWW-Register (agent status), and OR-Set (shared findings).

approval_listB

List pending approval requests.

approval_approveB

Approve a pending request by ID.

approval_denyA

Deny a pending request by ID.

local_llm_generateA

Generate text using a local LLM (Ollama/LM Studio) for offloadable tasks. Falls back to cloud provider if local LLM is unavailable.

discover_modelsA

Discover local LLM models and enrich them with HuggingFace metadata. Returns enriched model list with capabilities and recommended tasks.

conversation_paginateA

Divide a long conversation into navigable pages. Use this when conversation exceeds safe context limits.

conversation_get_pageC

Get a specific page from a paginated conversation

conversation_contextA

Get a page with surrounding context pages. Use this for reading with context.

conversation_navigateC

Navigate to next, previous, first, or last page

conversation_infoA

Get info about a paginated conversation: total pages, total tokens, etc.

conversation_find_relevantC

Find pages relevant to a query using keyword matching

conversation_check_compactionB

Check if conversation needs compaction for given model context limit

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/JNZader/mcp-llm-bridge'

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