/ Annuaire / Playground / Gemini CLI
● Officiel google-gemini 🔑 Nécessite votre clé

Gemini CLI

par google-gemini · google-gemini/gemini-cli

Gemini's official terminal agent — it does shell tasks autonomously and exposes that capability via MCP, so Claude can call Gemini for cross-model second opinions.

Gemini CLI is Google's terminal-native agent (Codex/Claude Code analog). Its MCP surface lets Claude delegate work to Gemini — useful for second opinions, large-context tasks, or model-comparison evaluations.

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

prêt

Installer

Choisissez votre client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "gemini-cli-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@google/gemini-cli",
        "mcp"
      ]
    }
  }
}

Ouvrez Claude Desktop → Settings → Developer → Edit Config. Redémarrez après avoir enregistré.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "gemini-cli-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@google/gemini-cli",
        "mcp"
      ]
    }
  }
}

Cursor utilise le même schéma mcpServers que Claude Desktop. La config projet l'emporte sur la globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "gemini-cli-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@google/gemini-cli",
        "mcp"
      ]
    }
  }
}

Cliquez sur l'icône MCP Servers dans la barre latérale Cline, puis "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "gemini-cli-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@google/gemini-cli",
        "mcp"
      ]
    }
  }
}

Même format que Claude Desktop. Redémarrez Windsurf pour appliquer.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "gemini-cli-mcp",
      "command": "npx",
      "args": [
        "-y",
        "@google/gemini-cli",
        "mcp"
      ]
    }
  ]
}

Continue utilise un tableau d'objets serveur plutôt qu'une map.

~/.config/zed/settings.json
{
  "context_servers": {
    "gemini-cli-mcp": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@google/gemini-cli",
          "mcp"
        ]
      }
    }
  }
}

Ajoutez dans context_servers. Zed recharge à chaud à la sauvegarde.

claude mcp add gemini-cli-mcp -- npx -y @google/gemini-cli mcp

Une seule ligne. Vérifiez avec claude mcp list. Supprimez avec claude mcp remove.

Cas d'usage

Usages concrets : Gemini CLI

Get a Gemini second opinion on Claude's plan

👤 Developers ⏱ ~15 min intermediate

Quand l'utiliser : You're about to ship something risky; want a fresh take from a different model.

Déroulement
  1. Bridge
    Add Gemini CLI as an MCP server.✓ Copié
    → Tool visible
  2. Ask
    Have Claude pass the plan to Gemini for critique.✓ Copié
    → Critique returns
  3. Reconcile
    Claude updates the plan with Gemini's feedback.✓ Copié
    → Better plan

Résultat : Two-model review without manual copy-paste.

Combinaisons

Associez-le à d'autres MCPs pour un effet X10

gemini-cli-mcp + github

Have Gemini draft a refactor plan, then Claude opens the PR via GitHub MCP

Combine gemini-cli-mcp with github: Have Gemini draft a refactor plan, then Claude opens the PR via GitHub MCP✓ Copié

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
gemini.ask (see docs) Send a prompt to Gemini, get a response 1 call
gemini.run_task (see docs) Run an autonomous shell task 1 call

Coût et limites

Coût d'exécution

Quota d'API
Google AI free tier; paid for higher rate
Tokens par appel
Per Gemini pricing
Monétaire
Free tier; paid plans
Astuce
Use Gemini for large-context summaries where its 2M-token window pays off

Sécurité

Permissions, secrets, portée

Portées minimales : gemini:api
Stockage des identifiants : API key in env
Sortie de données : generativelanguage.googleapis.com
Ne jamais accorder : Pass real customer data without checking Gemini data terms

Dépannage

Erreurs courantes et correctifs

429 quota exceeded

Wait or upgrade plan; check key has the right Vertex/AI Studio scope

Alternatives

Gemini CLI vs autres

AlternativeQuand l'utiliserCompromis
claude-code (self)Single-model is fineNo second opinion

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills