Skip to content

chew-z/GeminiMCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

254 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeminiMCP

An MCP server that exposes Google Gemini models to MCP clients (Claude Code, IDE extensions, custom tooling).

What it does

  • gemini_ask — multimodal question answering with composable GitHub context (PRs, commits, diffs, files)
  • gemini_search — Google Search-grounded queries returning structured JSON
  • 3 workflow promptsreview_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 SystemInstruction and matching <final_instruction> body
  • Two transports: HTTP (JWT-secured, preferred) and stdio (local fallback)

Quick start

# 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=http

Claude Code mcpServers entry (stdio):

{
  "gemini": {
    "command": "/path/to/bin/mcp-gemini",
    "env": { "GEMINI_API_KEY": "your-key" }
  }
}

Documentation

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

Development

./run_test.sh     # tests
./run_lint.sh     # golangci-lint
./run_format.sh   # goimports + gofmt

Requirements

  • Go 1.25+
  • GEMINI_API_KEY (Google AI Studio)
  • GEMINI_GITHUB_TOKEN (GitHub PAT — only for github_* parameters)

About

MCP (Model Control Protocol) server integrating with Google's Gemini API

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors