
choplin/mcp-gemini-cli
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
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
Местное развитие
-
Клонирование и установка:
-
Добавить в 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 querychat: Sends prompts directly to Gemini for general conversationsanalyzeFile: 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
- Clone and install:
git clone https://github.com/choplin/mcp-gemini-cli
cd mcp-gemini-cli
bun install
- 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 querylimit(optional): Maximum number of resultssandbox(optional): Run in sandbox modeyolo(optional): Skip confirmationsmodel(optional): Gemini model to use (default: “gemini-2.5-pro”)
2. chat
Have a conversation with Gemini.
Parameters:
prompt(required): The conversation promptsandbox(optional): Run in sandbox modeyolo(optional): Skip confirmationsmodel(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 analyzeprompt(optional): Additional instructions for analyzing the filesandbox(optional): Run in sandbox modeyolo(optional): Skip confirmationsmodel(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”
Установка
npx mcp-gemini-cli --allow-npxКонфигурация
{
"mcpServers": {
"mcp-gemini-cli": {
"command": "npx",
"args": ["mcp-gemini-cli", "--allow-npx"]
}
}
}