io.github.PavelGuzenfeld/gemini

Registre officiel Outils de développement

MCP server that exposes Google Gemini as tools for Claude Code

Que pouvez-vous faire avec io.github.PavelGuzenfeld/gemini ?

  • Retry with exponential backoff on rate limits (429) and server errors (5xx)
  • Graceful error reporting back to the MCP client (no crashes)
  • Per-call model override
  • Zero configuration beyond the API key

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package claude-gemini-mcp
Claude Code
claude mcp add gemini -e 'GEMINI_API_KEY=<your gemini_api_key>' -- npx -y claude-gemini-mcp@0.1.2
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "gemini": {
            "command": "npx",
            "args": [
                "-y",
                "claude-gemini-mcp@0.1.2"
            ],
            "env": {
                "GEMINI_API_KEY": "<your gemini_api_key>"
            }
        }
    }
}

Variables d'environnement

  • GEMINI_API_KEY obligatoire secret Google Gemini API key

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. gemini-mcp
  2. Tools
  3. Quick Start
  4. Usage Examples
  5. Environment Variables
  6. Models
  7. Features
  8. Troubleshooting
  9. Development
  10. License

gemini-mcp

Lightweight MCP server that exposes Google Gemini as tools for Claude Code (or any MCP client).

Use Gemini for second opinions, large-context analysis, code review, or anything where a different model perspective helps.

Tools

ToolDescription
gemini_askAsk Gemini a question or give it a task
gemini_analyzeSend code/text for analysis with a specific instruction
gemini_chatMulti-turn conversation with full history
gemini_modelsList available Gemini models

Quick Start

1. Get an API key

Go to Google AI Studio and create a free API key.

2. Install

Option A — Clone (recommended for Claude Code)

git clone https://github.com/PavelGuzenfeld/gemini-mcp.git ~/.claude/mcp-servers/gemini
cd ~/.claude/mcp-servers/gemini
npm install

Option B — npx (no install)

npx claude-gemini-mcp
3. Register with Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/home/you/.claude/mcp-servers/gemini/index.js"],
      "env": {
        "GEMINI_API_KEY": "your-key-here"
      }
    }
  }
}

Or with npx:

{
  "mcpServers": {
    "gemini": {
      "command": "npx",
      "args": ["-y", "claude-gemini-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-key-here"
      }
    }
  }
}

Usage Examples

Ask a question
> Use gemini_ask to explain the difference between std::expected and std::optional

Gemini says: std::optional<T> represents a value that may or may not be present...
std::expected<T, E> additionally carries an error value when the expected value is absent...
Analyze code
> Use gemini_analyze to review this function for performance issues:
  instruction: "Find performance bottlenecks"
  content: <your code here>

Gemini says: Line 12 allocates inside the loop — move the vector outside...
Multi-turn conversation
> Use gemini_chat with messages:
  [{"role": "user", "content": "Design a REST API for a task manager"},
   {"role": "model", "content": "Here's a RESTful design..."},
   {"role": "user", "content": "Now add authentication"}]

Gemini says: Building on the previous design, add JWT-based auth...
Override model per call
> Use gemini_ask with model: "gemini-2.5-flash" to quickly summarize this error log

Environment Variables

VariableDefaultDescription
GEMINI_API_KEY(required)Google AI Studio API key
GEMINI_MODELgemini-2.5-proDefault model for all tools

Models

ModelBest for
gemini-2.5-proBest quality, large context (1M tokens)
gemini-2.5-flashFast, good for most tasks
gemini-2.0-flashFastest, simple tasks

Every tool accepts an optional model parameter to override the default per-call.

Features

  • Retry with exponential backoff on rate limits (429) and server errors (5xx)
  • Graceful error reporting back to the MCP client (no crashes)
  • Per-call model override
  • Zero configuration beyond the API key

Troubleshooting

ProblemSolution
GEMINI_API_KEY is not setAdd the key to your env block in settings.json
429 Too Many RequestsBuilt-in retry handles this — wait a few seconds
Model not foundRun gemini_models to list valid model names
Tools not appearing in Claude CodeCheck ~/.claude/settings.json syntax, restart Claude Code
ECONNREFUSEDCheck network/firewall — the server calls generativelanguage.googleapis.com

Development

git clone https://github.com/PavelGuzenfeld/gemini-mcp.git
cd gemini-mcp
npm install
npm test          # Run smoke tests
node index.js     # Start the MCP server locally

License

MIT

Questions fréquentes

Qu'est-ce que io.github.PavelGuzenfeld/gemini ?

MCP server that exposes Google Gemini as tools for Claude Code

Comment installer io.github.PavelGuzenfeld/gemini ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add gemini -e 'GEMINI_API_KEY=<your gemini_api_key>' -- npx -y claude-gemini-mcp@0.1.2. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.PavelGuzenfeld/gemini ?

Oui. Il attend GEMINI_API_KEY, à renseigner dans sa configuration.

io.github.PavelGuzenfeld/gemini est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient io.github.PavelGuzenfeld/gemini ?

Il est publié par PavelGuzenfeld. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.