Skip to main content
Glama

gemini-mcp

npm MCP Registry Node.js License: MIT

Легковесный MCP-сервер, который предоставляет Google Gemini в виде инструментов для Claude (или любого MCP-клиента).

Используйте Gemini для альтернативных мнений, анализа больших контекстов, ревью кода или всего, где помогает взгляд другой модели.

Инструменты

Инструмент

Описание

gemini_ask

Задайте Gemini вопрос или дайте ему задачу

gemini_analyze

Отправьте код/текст для анализа с конкретной инструкцией

gemini_chat

Многоходовой диалог с полной историей

gemini_models

Список доступных моделей Gemini

Related MCP server: Gemini Bridge

Быстрый старт

1. Получите API-ключ

Перейдите в Google AI Studio и создайте бесплатный API-ключ.

2. Установка

Вариант A — Клонирование (рекомендуется для Claude Code)

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

Вариант B — npx (без установки)

npx claude-gemini-mcp

3. Регистрация в Claude Code

Добавьте в ~/.claude/settings.json:

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

Или с помощью npx:

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

Примеры использования

Задать вопрос

> 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...

Проанализировать код

> 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...

Многоходовой диалог

> 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...

Переопределить модель для вызова

> Use gemini_ask with model: "gemini-2.5-flash" to quickly summarize this error log

Переменные окружения

Переменная

По умолчанию

Описание

GEMINI_API_KEY

(обязательно)

API-ключ Google AI Studio

GEMINI_MODEL

gemini-2.5-pro

Модель по умолчанию для всех инструментов

Модели

Модель

Лучше всего подходит для

gemini-2.5-pro

Лучшее качество, большой контекст (1M токенов)

gemini-2.5-flash

Быстрая, подходит для большинства задач

gemini-2.0-flash

Самая быстрая, простые задачи

Каждый инструмент принимает необязательный параметр model для переопределения значения по умолчанию при каждом вызове.

Возможности

  • Повторные попытки с экспоненциальной задержкой при ограничении частоты запросов (429) и серверных ошибках (5xx)

  • Корректное сообщение об ошибках MCP-клиенту (без сбоев)

  • Переопределение модели при каждом вызове

  • Ноль конфигурации, кроме API-ключа

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

Проблема

Решение

GEMINI_API_KEY is not set

Добавьте ключ в блок env в settings.json

429 Too Many Requests

Встроенная повторная попытка решает это — подождите несколько секунд

Model not found

Запустите gemini_models, чтобы получить список допустимых названий моделей

Инструменты не появляются в Claude Code

Проверьте синтаксис ~/.claude/settings.json, перезапустите Claude Code

ECONNREFUSED

Проверьте сеть/брандмауэр — сервер обращается к generativelanguage.googleapis.com

Разработка

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

Лицензия

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PavelGuzenfeld/gemini-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server