Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CLAUDE_CLI_PATHNoPath to CLI binary.claude
ANTHROPIC_API_KEYNoAnthropic API key. Required when using API key authentication (set CLAUDE_BRIDGE_USE_API_KEY=1).
CLAUDE_QUERY_MODELNoDefault model for query tool.sonnet
CLAUDE_QUERY_EFFORTNoDefault effort for query tool.
CLAUDE_SEARCH_MODELNoDefault model for search tool.sonnet
CLAUDE_DEFAULT_MODELNoShared default model for all tools. If not set, each tool uses its own default.
CLAUDE_SEARCH_EFFORTNoDefault effort for search tool.medium
CLAUDE_FALLBACK_MODELNoFallback model on quota exhaustion. Set to 'none' to disable.haiku
CLAUDE_MAX_BUDGET_USDNoGlobal cost cap in USD per call.
CLAUDE_MAX_CONCURRENTNoMax concurrent subprocess spawns.3
CLAUDE_STRUCTURED_MODELNoDefault model for structured tool.sonnet
CLAUDE_BRIDGE_USE_API_KEYNoSet to '1' to forward ANTHROPIC_API_KEY to the subprocess. Default uses subscription auth.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
queryA

Execute a prompt via Claude Code CLI with optional file context and session resume. Claude is an AI coding agent that can generate, analyze, refactor, and explain code.

Capabilities: code generation and refactoring, code analysis and explanation, file understanding (text and images), multi-turn conversations via sessionId.

Cost: Default model is Sonnet (~$0.01-0.10/call). Use effort="low" for simple tasks, effort="high" + model="opus" for complex analysis. Set maxBudgetUsd to cap per-call cost (recommended for effort="max" or model="opus").

Tips:

  • Set workingDirectory to the target repo for project-aware responses.

  • Break complex tasks into focused prompts rather than one large request.

  • Resume multi-turn conversations with sessionId from a previous response's metadata.

  • Include relevant files via the files parameter for targeted context (text files inlined in prompt, images trigger allowed-tools mode).

  • Use noSessionPersistence=true for stateless one-shot calls.

structuredA

Generate JSON conforming to a provided JSON Schema. Uses Claude CLI's native --json-schema flag for validated output (not client-side validation).

Use for: data extraction from text/files, classification, entity parsing, or any task needing machine-parseable output.

Cost: Similar to query (~$0.01-0.10/call). Schema complexity doesn't significantly affect cost.

Tips:

  • Pass the JSON Schema as a JSON string in the schema parameter.

  • Schema max size: 20KB. Keep schemas focused for reliable output.

  • For extraction tasks, include source text via the files parameter or inline in the prompt.

searchA

Web search via Claude Code CLI using WebSearch and WebFetch tools. Searches the web and synthesizes a comprehensive answer with source URLs.

Use for: current information, documentation lookups, API references, comparing libraries, and research questions.

Cost: Typically ~$0.02-0.05/search with Sonnet.

Tips:

  • Ask specific, focused questions for best results.

  • Results include source URLs for verification.

  • Use maxResponseLength to control response verbosity.

  • Increase timeout for complex research queries that may require multiple web fetches.

listSessionsA

List active Claude CLI sessions tracked by this server. Returns session metadata (IDs, models, timing, turn counts, cumulative cost) for orchestration. Use to check available sessions before resuming with sessionId. No cost (local lookup only).

pingA

Health check: verifies Claude CLI is installed and authenticated, reports versions, capabilities, and configuration. No cost (local check only).

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/hampsterx/claude-mcp-bridge'

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