Skip to main content
Glama
hampsterx

gemini-mcp-bridge

by hampsterx

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GEMINI_CLI_PATHNoPath to CLI binarygemini
GEMINI_DEFAULT_MODELNoDefault model for all tools (CLI default if empty)
GEMINI_FALLBACK_MODELNoFallback on quota/rate-limit errors (set 'none' to disable)gemini-2.5-flash
GEMINI_MAX_CONCURRENTNoMax concurrent subprocess spawns3
GEMINI_SPAWN_JITTER_MAX_MSNoRandom extra delay before spawn to avoid deterministic timing200
GEMINI_MIN_INVOCATION_GAP_MSNoMinimum gap between Gemini CLI start times5000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
queryA

Agentic query: Gemini runs inside your workingDirectory with read_file, grep, list_directory, and glob tools. Pass file paths as hints (not content) — Gemini reads them itself and can explore surrounding code for context.

Capabilities:

  • Code analysis with full repo exploration (Gemini follows imports, reads tests, checks related files)

  • Image understanding: screenshots, diagrams, architecture charts (png/jpg/gif/webp/bmp)

  • General knowledge questions and technical research

  • Text transformation, summarization, and generation

  • Change mode: structured edit blocks parsed into a machine-applicable edits array (see 'changeMode' below)

File handling: Pass file paths in the 'files' array as hints. Text files are referenced via @{path} — Gemini reads them with its own tools. Image files use --yolo mode for native pixel access. Gemini may also read files beyond the ones you hint at.

Note: Gitignored files cannot be read in text-query mode (plan mode restriction). Image queries (--yolo) can read gitignored files.

Change mode: set 'changeMode: true' to ask Gemini to emit structured **FILE: <path>:<start>-<end>** / ===OLD=== / ===NEW=== blocks instead of prose. The response text stays in response; parsed edits are returned on _meta.edits and never chunked. The tool runs in default agentic mode (NOT plan mode, which refuses to emit edit blocks) with a pre/post-spawn git snapshot that detects any file writes Gemini might attempt. If writes are detected the tool returns _meta.appliedWrites: true and omits edits for safety. Text-only (image files rejected). Requires a git working directory.

Model tips: Use gemini-2.5-flash for speed, gemini-2.5-pro for depth and complex reasoning. If omitted, the CLI auto-selects via its routing model.

Each invocation spawns a fresh CLI process (~15-20s startup overhead). Plan timeouts accordingly.

searchA

Google Search grounded research. Gemini searches the web using google_web_search and synthesizes a comprehensive answer with source URLs and citations.

Use for: current events, documentation lookups, API references, comparing technologies, verifying facts, finding recent releases or changelogs.

The query can be a natural language question or a search-style keyword string. Gemini may issue multiple searches to build a complete answer. Results include source URLs for verification.

Output is a synthesized summary (500-1500 words by default), not raw search results. Use maxResponseLength to adjust.

structuredA

Agentic structured output: generate a JSON response conforming to a provided JSON Schema. Gemini runs inside workingDirectory with read_file and grep tools, so it can read files for context. Use for data extraction, classification, or any task needing machine-parseable output. The response is validated against the schema; isError is true if validation fails.

fetch-chunkA

Retrieve a cached chunk from a previously chunked response. Large query and search responses may return only the first chunk plus a cacheKey. Use this tool with that cacheKey and a 1-based chunkIndex to fetch the remaining segments before the 10-minute in-memory cache expires.

pingA

Health check. Verifies gemini CLI is installed and authenticated, reports CLI version, auth status, configured models, and server version. Fast (~1s, no model call).

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

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