Gemini MCP Server
Provides tools to consult Google Gemini for AI second opinions and validation, including optional context, comparison-mode formatting, configurable model/timeout/rate limiting, and consultation logging.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Gemini MCP Server
MCP (Model Context Protocol) Server with Google Gemini CLI integration for AI second opinions and validation in development workflows.
Features
π€ AI Second Opinions: Get alternative perspectives from Google's Gemini AI
π Automatic Uncertainty Detection: Triggers consultations when uncertainty is detected
β‘ Rate Limiting: Built-in rate limiting to prevent API abuse
π‘οΈ Configurable Models: Support for different Gemini models
π Consultation Logging: Track all AI consultations with timestamps
Related MCP server: Gemini MCP Server for Claude Code
Quick Start
Using uvx (Recommended)
Run directly without installation:
# Run in current directory
uvx gemini-mcp-server
# Run with specific project root
uvx gemini-mcp-server --project-root /path/to/projectLocal Development
# Clone the repository
git clone https://github.com/taehun-kmu/gemini-mcp-server
cd gemini-mcp-server
# Install with uv
uv pip install -e .
# Run the server
gemini-mcp-serverPrerequisites
Node.js 18+ - Required for Gemini CLI
Python 3.8+ - Required for MCP server
Gemini CLI - Install and authenticate:
# Install Gemini CLI
npm install -g @google/gemini-cli
# Authenticate (run once)
geminiConfiguration
Create a gemini-config.json file in your project root:
{
"enabled": true,
"auto_consult": true,
"cli_command": "gemini",
"timeout": 60,
"rate_limit_delay": 2.0,
"model": "gemini-2.5-flash",
"log_consultations": true
}Environment Variables
Override configuration with environment variables:
GEMINI_ENABLED: Enable/disable integrationGEMINI_AUTO_CONSULT: Enable/disable automatic consultationGEMINI_CLI_COMMAND: CLI command (default: "gemini")GEMINI_TIMEOUT: Command timeout in secondsGEMINI_RATE_LIMIT: Delay between consultationsGEMINI_MODEL: Model to use (default: "gemini-2.5-flash")
MCP Tools
The server exposes three MCP tools:
consult_gemini: Get second opinions from Gemini
query: The question or topiccontext: Additional contextcomparison_mode: Request structured comparison format
gemini_status: Check integration status and statistics
toggle_gemini_auto_consult: Enable/disable automatic consultation
enable: true/false or omit to toggle
Claude Code Integration
Configure Claude Code to use this MCP server by adding to your MCP configuration:
{
"mcpServers": {
"gemini": {
"command": "uvx",
"args": ["gemini-mcp-server"],
"env": {
"GEMINI_ENABLED": "true"
}
}
}
}Note: Add "--project-root", "/path/to/project" to args if you need to specify a different project directory.
Development
Project Structure
gemini-mcp-server/
βββ gemini_mcp/
β βββ __init__.py
β βββ __main__.py # CLI entry point
β βββ gemini_integration.py # Gemini integration logic
β βββ server.py # MCP server implementation
βββ pyproject.toml # Package configuration
βββ README.md # This file
βββ LICENSE # MIT License
βββ setup-gemini-integration.sh # Setup script
βββ gemini-config.json # Example configurationRunning Tests
# Install dev dependencies
uv pip install -e ".[dev]"
# Run tests
pytest
# Format code
ruff format gemini_mcp
ruff check gemini_mcpLicense
MIT License - see LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Paid second opinion for coding agents: engineering advice, diff review and multi-model consensus.
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
A paid remote MCP for CodeG, built to return verdicts, receipts, usage logs, and audit-ready JSON.
Paid remote MCP for Claude Code skill update gate MCP, structured receipts, audit logs, and reviewer
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables Claude to use Google Gemini as a secondary AI through MCP for large-scale codebase analysis and complex reasoning tasks. Supports both Gemini Flash and Pro models with specialized functions for general queries and comprehensive code analysis.4MIT
- AlicenseAqualityDmaintenanceIntegrates Google's Gemini AI models into Claude Code and other MCP clients to provide second opinions, code comparisons, and token counting. It supports streaming responses and multi-turn conversations directly within your existing AI development workflow.3Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to consult Gemini for complex coding problems with session management, file attachments, and conversation persistence.106MIT
- AlicenseAqualityCmaintenanceEnables any MCP-capable coding agent to request an independent, read-only second opinion from a stronger model at consequential decision points such as planning, debugging, risk review, and handoff. It exposes consult, session-state, reset, and health tools over stdio or authenticated Streamable HTTP, with explicit context, structured validated advice, session continuity, call budgets, and secret redaction.5MIT