CM

choplin/mcp-gemini-cli

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

100 stars 16 forks Качество 54 Тренд 0

choplin/mcp-gemini-cli — это кандидат на сервер MCP, импортированный из https://github.com/choplin/mcp-gemini-cli.

Обзор

choplin/mcp-gemini-cli — это кандидат на сервер MCP, импортированный из https://github.com/choplin/mcp-gemini-cli.

Обзор (машинный перевод)

Простая обёртка сервера MCP для Google Gemini CLI, позволяющая ассистентам ИИ использовать возможности Gemini через протокол Model Context Protocol.

Что он делает

Этот сервер предоставляет три инструмента, взаимодействующих с Gemini CLI:

  • googleSearch: Просит Gemini выполнить поиск в Google по вашему запросу
  • chat: Отправляет подсказки напрямую в Gemini для общих разговоров
  • analyzeFile: Анализирует файлы (изображения, PDF, текст) с использованием мультимодальных возможностей Gemini

Предварительные требования

  • Установка и настройка Gemini CLI (опционально с флагом --allow-npx)

🚀 Быстрый старт с кодом Клода

1. Добавить MCP-сервер

Или настройте свой MCP-клиент с настройками, указанными в разделе «Настройки установки» ниже.

2. Попробуй

Примеры запросов:

  • Поиск: «Поиск последних функций TypeScript 5.0 с помощью Google»
  • Чат: «Попросите Gemini объяснить разницу между async/await и promises в JavaScript»
  • Анализ файла: «Попросите Gemini проанализировать изображение по адресу /path/to/screenshot.png»

🔧 Варианты установки

Использование npx с флагом --allow-npx

Местное развитие

  1. Клонирование и установка:

  2. Добавить в Claude Desktop конфигурацию:

🛠️ Доступные инструменты

1. googleSearch

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

MCP Gemini CLI

A simple MCP server wrapper for Google’s Gemini CLI that enables AI assistants to use Gemini’s capabilities through the Model Context Protocol.

What it does

This server exposes three tools that interact with Gemini CLI:

  • googleSearch: Asks Gemini to perform a Google search using your query
  • chat: Sends prompts directly to Gemini for general conversations
  • analyzeFile: Analyzes files (images, PDFs, text) using Gemini’s multimodal capabilities

Prerequisites

  • Gemini CLI installed and configured (optional with --allow-npx flag)

🚀 Quick Start with Claude Code

1. Add the MCP server

claude mcp add -s project gemini-cli -- npx mcp-gemini-cli --allow-npx

Or configure your MCP client with the settings shown in the Installation Options section below.

2. Try it out

Example prompts:

  • Search: “Search for the latest TypeScript 5.0 features using Google”
  • Chat: “Ask Gemini to explain the difference between async/await and promises in JavaScript”
  • File Analysis: “Ask Gemini to analyze the image at /path/to/screenshot.png”

🔧 Installation Options

Using npx with --allow-npx flag

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

Local Development

  1. Clone and install:
git clone https://github.com/choplin/mcp-gemini-cli
cd mcp-gemini-cli
bun install
  1. Add to Claude Desktop config:
{
  "mcpServers": {
    "mcp-gemini-cli": {
      "command": "bun",
      "args": ["run", "/path/to/mcp-gemini-cli/index.ts"]
    }
  }
}

🛠️ Available Tools

1. googleSearch

Performs a Google search using Gemini CLI.

Parameters:

  • query (required): The search query
  • limit (optional): Maximum number of results
  • sandbox (optional): Run in sandbox mode
  • yolo (optional): Skip confirmations
  • model (optional): Gemini model to use (default: “gemini-2.5-pro”)

2. chat

Have a conversation with Gemini.

Parameters:

  • prompt (required): The conversation prompt
  • sandbox (optional): Run in sandbox mode
  • yolo (optional): Skip confirmations
  • model (optional): Gemini model to use (default: “gemini-2.5-pro”)

3. analyzeFile

Analyze files using Gemini’s multimodal capabilities.

Supported file types:

  • Images: PNG, JPG, JPEG, GIF, WEBP, SVG, BMP
  • Text: TXT, MD, TEXT
  • Documents: PDF

Parameters:

  • filePath (required): The absolute path to the file to analyze
  • prompt (optional): Additional instructions for analyzing the file
  • sandbox (optional): Run in sandbox mode
  • yolo (optional): Skip confirmations
  • model (optional): Gemini model to use (default: “gemini-2.5-pro”)

💡 Example Prompts

Try these prompts to see mcp-gemini-cli in action:

  • Search: “Search for the latest TypeScript 5.0 features using Google”
Открыть полный README на GitHub

Установка

npx mcp-gemini-cli --allow-npx
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

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