An MCP server that exposes Google Gemini models to MCP clients (Claude Code, IDE extensions, custom tooling).
gemini_ask— multimodal question answering with composable GitHub context (PRs, commits, diffs, files)gemini_search— Google Search-grounded queries returning structured JSON- 3 workflow prompts —
review_pr,explain_commit,compare_refs - 8 coding prompts — code review, explain, debug, refactor, architecture, tests, security, research
- Gemini 3-style XML envelope — every user turn is rendered as
<context>/<task>/<final_instruction>with attacker-controllable bodies emitted as raw text - Server-side system-prompt selection — a Flash classifier picks a category-specific
SystemInstructionand matching<final_instruction>body - Two transports: HTTP (JWT-secured, preferred) and stdio (local fallback)
# Build
go build -o bin/mcp-gemini .
# Configure
cp .env.example .env
# Edit .env — set GEMINI_API_KEY at minimum
# Run (stdio, for Claude Code)
./bin/mcp-gemini
# Run (HTTP)
./bin/mcp-gemini --transport=httpClaude Code mcpServers entry (stdio):
{
"gemini": {
"command": "/path/to/bin/mcp-gemini",
"env": { "GEMINI_API_KEY": "your-key" }
}
}| Doc | Contents |
|---|---|
| docs/QUICKREF.md | One-page cheat sheet — parameters, env vars, CLI flags, examples |
| docs/TOOLS.md | Full tool and prompt reference with all parameters and examples |
| docs/PROMPTS.md | MCP-prompt registry and server-side system-prompt selection |
| docs/USAGE.md | Installation, transport modes, authentication, all env vars |
| docs/ARCHITECTURE OVERVIEW.md | Codebase map, component diagram, request lifecycle |
| .env.example | Annotated configuration template |
./run_test.sh # tests
./run_lint.sh # golangci-lint
./run_format.sh # goimports + gofmt- Go 1.25+
GEMINI_API_KEY(Google AI Studio)GEMINI_GITHUB_TOKEN(GitHub PAT — only forgithub_*parameters)