Gemini CLI

v1.0.0Coding Agentsstable

Bridges Google's Gemini CLI with MCP-compatible clients and integrates OpenRouter API for access to 400+ AI models. Provides 33 specialized tools enabling multi-AI workflows, collaborations, and debates between Claude, Gemini, and other LLMs.

gemini-cli-mcp-servermcpai-integration
Share:
141
Stars
0
Downloads
0
Weekly
0/5

What is Gemini CLI?

Gemini CLI is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to bridges google's gemini cli with mcp-compatible clients and integrates openrouter api for access to 400+ ai models. provides 33 specialized tools enabling multi-ai workflows, collaborations, and debat...

Bridges Google's Gemini CLI with MCP-compatible clients and integrates OpenRouter API for access to 400+ AI models. Provides 33 specialized tools enabling multi-AI workflows, collaborations, and debates between Claude, Gemini, and other LLMs.

This server falls under the Coding Agents and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Bridges Google's Gemini CLI with MCP-compatible clients and

Use Cases

Access 400+ AI models via OpenRouter
Enable multi-AI workflows and debates
centminmod

Maintainer

LicenseApache 2.0
Languagejavascript
Versionv1.0.0
UpdatedMay 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx gemini-cli-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Gemini CLI

Gemini CLI MCP Server bridges Google's Gemini CLI with any MCP-compatible client and integrates OpenRouter to give you access to 400+ AI models from a single server. It exposes 33 specialized tools covering Gemini prompting, multi-file analysis, code review, conversation management, cross-model comparison, and multi-AI collaboration modes including debates between Claude, Gemini, GPT, and other models. This makes it an ideal hub for workflows that require querying multiple AI models, comparing their outputs, or orchestrating complex multi-step AI reasoning chains from within Claude Desktop or Cursor.

Prerequisites

  • Python 3.10 or higher with pip and uv
  • Google Gemini CLI installed and authenticated (`gemini config set api_key YOUR_KEY`)
  • A Google Gemini API key (from Google AI Studio)
  • An OpenRouter API key (from openrouter.ai) for accessing 400+ additional models — optional but required for OpenRouter tools
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Clone the repository and set up the Python environment

Clone the gemini-cli-mcp-server repository and create an isolated Python virtual environment using uv.

git clone https://github.com/centminmod/gemini-cli-mcp-server.git
cd gemini-cli-mcp-server
uv venv && source .venv/bin/activate
uv pip install -r requirements.txt
2

Configure your Gemini API key

Set your Google Gemini API key using the Gemini CLI configuration command. This is required for all core Gemini tools.

gemini config set api_key YOUR_GEMINI_API_KEY
3

Set your OpenRouter API key (optional)

Export your OpenRouter API key as an environment variable to enable access to 400+ models including GPT, Claude via OpenRouter, Llama, Mistral, and others through the OpenRouter tool suite.

export OPENROUTER_API_KEY="sk-or-v1-your-api-key-here"
# Optional: set a daily cost limit
export OPENROUTER_COST_LIMIT_PER_DAY="10.0"
4

Test the server locally

Start the MCP server to verify it launches without errors before wiring it into your MCP client.

python server.py
5

Configure your MCP client

Add the Gemini CLI MCP Server to your Claude Desktop configuration, pointing to the Python executable in your virtual environment and passing required API keys as environment variables.

{
  "mcpServers": {
    "gemini-cli-mcp-server": {
      "command": "/path/to/gemini-cli-mcp-server/.venv/bin/python",
      "args": ["/path/to/gemini-cli-mcp-server/server.py"],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key",
        "OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key"
      }
    }
  }
}

Gemini CLI Examples

Client configuration (Claude Desktop)

Full claude_desktop_config.json entry for the Gemini CLI MCP Server with both Gemini and OpenRouter keys.

{
  "mcpServers": {
    "gemini-cli-mcp-server": {
      "command": "/path/to/gemini-cli-mcp-server/.venv/bin/python",
      "args": ["/path/to/gemini-cli-mcp-server/server.py"],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key",
        "OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key",
        "OPENROUTER_COST_LIMIT_PER_DAY": "5.0"
      }
    }
  }
}

Prompts to try

Example prompts demonstrating the multi-model and collaboration capabilities of the Gemini CLI MCP Server.

- "Use gemini_prompt to explain quantum entanglement using gemini-2.5-flash."
- "Run a security-focused code review on @src/auth.py using the gemini_review_code tool."
- "Start a debate between gemini-2.5-flash and openai/gpt-4.1-mini about microservices vs monolith architecture — 4 rounds."
- "Compare gemini-2.5-pro and anthropic/claude-3-haiku on summarizing this research paper: @paper.pdf."
- "Use gemini_git_diff_review to review my latest git diff and identify any security issues."
- "Summarize all files in the @./docs/ folder using gemini_summarize_files."

Troubleshooting Gemini CLI

gemini_prompt returns authentication errors

Verify your Gemini API key is set correctly by running `gemini config set api_key YOUR_KEY` in the terminal where the server runs. Also ensure the GEMINI_API_KEY environment variable is passed through in your MCP client config env block.

OpenRouter tools fail or return model-not-found errors

Confirm OPENROUTER_API_KEY is set and starts with `sk-or-v1-`. Check your OpenRouter account has credits available. Use the `gemini_openrouter_models` tool to list currently available models before calling other OpenRouter tools.

Rate limiting errors on Gemini API calls

The server has a built-in rate limiter (default 100 requests per 60-second window). Set `GEMINI_RATE_LIMIT_REQUESTS` to a lower value matching your Gemini API tier, or spread requests across multiple tool calls with delays between them.

Frequently Asked Questions about Gemini CLI

What is Gemini CLI?

Gemini CLI is a Model Context Protocol (MCP) server that bridges google's gemini cli with mcp-compatible clients and integrates openrouter api for access to 400+ ai models. provides 33 specialized tools enabling multi-ai workflows, collaborations, and debates between claude, gemini, and other llms. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Gemini CLI?

Follow the installation instructions on the Gemini CLI GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Gemini CLI?

Gemini CLI works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Gemini CLI free to use?

Yes, Gemini CLI is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "gemini-cli-mcp-server": { "command": "npx", "args": ["-y", "gemini-cli-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Gemini CLI?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides