/ Каталог / Песочница / Gemini CLI
● Официальный google-gemini 🔑 Нужен свой ключ

Gemini CLI

автор 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.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

готово

Установка

Выберите клиент

~/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"
      ]
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

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

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

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

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

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

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

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

Continue использует массив объектов серверов, а не map.

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

Добавьте в context_servers. Zed перезагружается автоматически.

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

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: Gemini CLI

Get a Gemini second opinion on Claude's plan

👤 Developers ⏱ ~15 min intermediate

Когда использовать: You're about to ship something risky; want a fresh take from a different model.

Поток
  1. Bridge
    Add Gemini CLI as an MCP server.✓ Скопировано
    → Tool visible
  2. Ask
    Have Claude pass the plan to Gemini for critique.✓ Скопировано
    → Critique returns
  3. Reconcile
    Claude updates the plan with Gemini's feedback.✓ Скопировано
    → Better plan

Итог: Two-model review without manual copy-paste.

Комбинации

Сочетайте с другими MCP — эффект 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✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
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

Стоимость и лимиты

Во что обходится

Квота API
Google AI free tier; paid for higher rate
Токенов на вызов
Per Gemini pricing
Деньги
Free tier; paid plans
Совет
Use Gemini for large-context summaries where its 2M-token window pays off

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: gemini:api
Хранение учётных данных: API key in env
Исходящий трафик: generativelanguage.googleapis.com
Никогда не давайте: Pass real customer data without checking Gemini data terms

Устранение неполадок

Частые ошибки и исправления

429 quota exceeded

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

Альтернативы

Gemini CLI в сравнении

АльтернативаКогда использоватьКомпромисс
claude-code (self)Single-model is fineNo second opinion

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills