A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
MCP server for Google Gemini — free image generation, editing & chat via browser cookies. No API keys needed.
MCP-сервер для Google Gemini — генерация и редактирование изображений, чат и анализ файлов через браузерные cookies.
Без API-ключей. Бесплатно.
Откройте Chrome, перейдите на gemini.google.com и войдите в свой Google-аккаунт.
Из GitHub (без клонирования):
uv run --with "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git" gemini-webapi-mcp
Локальная установка:
git clone https://github.com/AndyShaman/gemini-webapi-mcp.git
cd gemini-webapi-mcp
uv sync
uv run gemini-webapi-mcp
claude mcp add-json gemini '{"command":"uv","args":["run","--with","gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git","gemini-webapi-mcp"]}'
Или добавьте вручную в .mcp.json в корне проекта:
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"]
}
}
}
Добавьте в конфиг Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"]
}
}
}
Используйте стандартный MCP stdio-конфиг:
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"]
}
}
}
Путь к файлу конфига зависит от вашего MCP-клиента.
"args": ["--directory", "/path/to/gemini-webapi-mcp", "run", "gemini-webapi-mcp"]
Папка skill/ содержит скилл для Claude Code — подсказки по промптингу, документацию по тулам и гайд по генерации изображений. Скилл автоматически активируется при работе с Gemini.
cp -r skill ~/.claude/skills/gemini-mcp
Запустите сервер вручную — если инициализация прошла без ошибок, всё работает:
uv run --with "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git" gemini-webapi-mcp
После этого откройте Claude Code или Claude Desktop и попробуйте: «Сгенерируй картинку кота в акварельном стиле через Gemini».
Сервер автоматически читает cookies из Chrome через browser-cookie3.
Несколько Google-аккаунтов? Установите
GEMINI_ACCOUNT_INDEX— номер аккаунта из Chrome (0 = первый, 1 = второй, ...). Посмотрите порядок: кликните на аватарку в gemini.google.com.
Если автоопределение cookies не работает, задайте их вручную:
__Secure-1PSID и __Secure-1PSIDTS{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"],
"env": {
"GEMINI_PSID": "your__Secure-1PSID_value",
"GEMINI_PSIDTS": "your__Secure-1PSIDTS_value"
}
}
}
}
| Переменная | Описание | По умолчанию |
|---|---|---|
GEMINI_PSID | Значение cookie __Secure-1PSID | авто из Chrome |
GEMINI_PSIDTS | Значение cookie __Secure-1PSIDTS | авто из Chrome |
GEMINI_LANGUAGE | Язык ответов Gemini (ru, en, ja, ...) | en |
GEMINI_ACCOUNT_INDEX | Индекс Google-аккаунта (0, 1, 2, ...) | 0 |
Сервер автоматически запрашивает у Google увеличенную версию сгенерированного изображения — тот же механизм, что использует кнопка "Download" в веб-интерфейсе Gemini. Google выполняет server-side upscale, и вы получаете изображение в 2x разрешении:
| Модель | Нативное | 2x (скачивается) |
|---|---|---|
| Flash-Thinking (16:9) | 1408x768 | 2816x1536 |
| Flash-Thinking (9:16) | 768x1376 | 1536x2752 |
| Flash-Thinking (1:1) | 1024x1024 | 2048x2048 |
Если 2x-версия недоступна (таймаут, ошибка сети), сервер автоматически использует нативное разрешение.
Gemini добавляет sparkle-метку (четырёхконечную звёздочку) в правый нижний угол сгенерированных изображений. Сервер убирает её встроенным алгоритмом Reverse Alpha Blending — original = (watermarked − premult) / (1 − alpha) — без внешних бинарников, ML-моделей и скачиваний.
Позиция и прозрачность метки детерминированы — они зависят только от того, был ли в запросе загружен файл-исходник, поэтому метка снимается без всякой детекции:
| Случай | Отступ от угла | Прозрачность |
|---|---|---|
| Генерация по тексту / continuation | 32 px | ~0.50 |
| Редактирование загруженного фото | 96 px | ~0.30 |
Логотип всегда 48 px (×2 при 2x-upscale). Так как сервер сам знает тип запроса, метка снимается чисто на любом фоне, включая тёмный. Откалиброванные alpha-карты лежат в src/gemini_webapi_mcp/assets/. Чтобы временно отключить удаление, задайте GEMINI_WM_KEEP=1.
| Инструмент | Описание |
|---|---|
gemini_generate_image | Генерация новых или редактирование существующих изображений |
gemini_upload_file | Анализ файлов — видео, изображения, PDF, документы |
gemini_analyze_url | Анализ URL — YouTube-видео, веб-страницы, статьи |
gemini_chat | Текстовый чат (одиночный или multi-turn) |
gemini_start_chat | Начать multi-turn сессию |
gemini_reset | Переинициализация клиента при ошибках авторизации |
| Модель | По умолчанию для | Примечание |
|---|---|---|
gemini-3.0-flash | чат, анализ файлов | Быстрая |
gemini-3.0-flash-thinking | генерация изображений | Nano Banana 2, поддержка пропорций |
gemini-3.0-pro | — | Альтернативная модель |
После настройки MCP-конфига Claude сам вызывает нужные инструменты. Просто попросите в чате:
| Задача | Что написать Claude |
|---|---|
| Сгенерировать изображение | «Сгенерируй через Gemini кота в акварельном стиле» |
| Отредактировать изображение | «Отредактируй через Gemini /path/to/cat.png — сделай кота серым» |
| Итеративная правка | «Теперь сделай фон темнее» (в том же разговоре) |
| Проанализировать видео | «Проанализируй через Gemini это видео: https://youtube.com/watch?v=...» |
| Проанализировать файл | «Загрузи в Gemini /path/to/doc.pdf и сделай краткое резюме» |
Инструменты, которые Claude вызовет:
gemini_generate_image(prompt="кот в акварельном стиле")
gemini_generate_image(prompt="сделай кота серым", files=["/path/to/cat.png"])
gemini_generate_image(prompt="сделай фон темнее", conversation_id=["c_abc", "r_123", "rc_456"])
gemini_analyze_url(url="https://youtube.com/watch?v=...", prompt="О чём это видео?")
gemini_upload_file(file_path="/path/to/doc.pdf", prompt="Сделай краткое резюме")
Этот проект построен на основе библиотеки gemini-webapi от @HanaokaYuzu (форк @xob0t с поддержкой curl_cffi) — реверс-инжиниринговой асинхронной Python-обёртки для веб-приложения Google Gemini. Лицензия: AGPL-3.0.
Алгоритм удаления вотермарки (Reverse Alpha Blending) изначально вдохновлён проектами gwt-mini от @allenk (Allen Kuo, MIT License) и gemini-watermark-remover от @GargantuaX (MIT License). В текущей версии сервер использует собственную встроенную реализацию и откалиброванные alpha-карты — внешние бинарники не требуются.
AGPL-3.0 — свободно используйте, модифицируйте и распространяйте при условии сохранения открытости исходного кода.
@AndyShaman · gemini-webapi-mcp
MCP server for Google Gemini — image generation/editing, chat and file analysis via browser cookies.
No API keys. Free.
Open Chrome, go to gemini.google.com and sign in.
From GitHub (no clone needed):
uv run --with "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git" gemini-webapi-mcp
Local install:
git clone https://github.com/AndyShaman/gemini-webapi-mcp.git
cd gemini-webapi-mcp
uv sync
uv run gemini-webapi-mcp
claude mcp add-json gemini '{"command":"uv","args":["run","--with","gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git","gemini-webapi-mcp"]}'
Or add manually to .mcp.json in your project root:
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"]
}
}
}
Add to Claude Desktop config:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"]
}
}
}
Use the standard MCP stdio config:
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"]
}
}
}
Config file path depends on your MCP client.
"args": ["--directory", "/path/to/gemini-webapi-mcp", "run", "gemini-webapi-mcp"]
The skill/ folder contains a Claude Code skill — prompting tips, tool documentation and an image generation guide. The skill auto-activates when working with Gemini.
cp -r skill ~/.claude/skills/gemini-mcp
Run the server manually — if it initializes without errors, everything works:
uv run --with "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git" gemini-webapi-mcp
Then open Claude Code or Claude Desktop and try: "Generate a watercolor cat image with Gemini".
The server reads cookies from Chrome automatically via browser-cookie3.
Multiple Google accounts? Set
GEMINI_ACCOUNT_INDEX— the account number from Chrome (0 = first, 1 = second, ...). Check the order by clicking your avatar on gemini.google.com.
If cookie auto-detection fails, set them manually:
__Secure-1PSID and __Secure-1PSIDTS values{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"],
"env": {
"GEMINI_PSID": "your__Secure-1PSID_value",
"GEMINI_PSIDTS": "your__Secure-1PSIDTS_value"
}
}
}
}
| Variable | Description | Default |
|---|---|---|
GEMINI_PSID | Cookie value __Secure-1PSID | auto from Chrome |
GEMINI_PSIDTS | Cookie value __Secure-1PSIDTS | auto from Chrome |
GEMINI_LANGUAGE | Gemini response language (ru, en, ja, ...) | en |
GEMINI_ACCOUNT_INDEX | Google account index (0, 1, 2, ...) | 0 |
The server automatically requests an upscaled version of each generated image — the same mechanism used by the "Download" button in Gemini's web interface. Google performs server-side upscaling, delivering images at 2x resolution:
| Model | Native | 2x (downloaded) |
|---|---|---|
| Flash-Thinking (16:9) | 1408x768 | 2816x1536 |
| Flash-Thinking (9:16) | 768x1376 | 1536x2752 |
| Flash-Thinking (1:1) | 1024x1024 | 2048x2048 |
If the 2x version is unavailable (timeout, network error), the server automatically falls back to native resolution.
Gemini adds a sparkle watermark (4-point star) to the bottom-right corner of generated images. The server removes it with a built-in Reverse Alpha Blending pass — original = (watermarked − premult) / (1 − alpha) — with no external binaries, ML models, or downloads.
The mark's position and opacity are deterministic — they depend only on whether a source file was uploaded in the request, so the mark is removed without any detection:
| Case | Corner margin | Opacity |
|---|---|---|
| Text-to-image / continuation | 32 px | ~0.50 |
| Editing an uploaded photo | 96 px | ~0.30 |
The logo is always 48 px (×2 when 2x-upscaled). Since the server knows the request type, the mark is removed cleanly on any background, including dark ones. Calibrated alpha maps live in src/gemini_webapi_mcp/assets/. Set GEMINI_WM_KEEP=1 to disable removal.
| Tool | Description |
|---|---|
gemini_generate_image | Generate new or edit existing images |
gemini_upload_file | Analyze files — video, images, PDF, documents |
gemini_analyze_url | Analyze URLs — YouTube videos, webpages, articles |
gemini_chat | Text chat (single or multi-turn) |
gemini_start_chat | Start a multi-turn session |
gemini_reset | Re-initialize client on auth errors |
| Model | Default for | Notes |
|---|---|---|
gemini-3.0-flash | chat, file analysis | Fast |
gemini-3.0-flash-thinking | image generation | Nano Banana 2, supports aspect ratios |
gemini-3.0-pro | — | Alternative model |
Once configured, Claude calls the right tools automatically. Just ask in chat:
| Task | What to tell Claude |
|---|---|
| Generate an image | "Generate a watercolor cat with Gemini" |
| Edit an image | "Edit /path/to/cat.png with Gemini — make the cat gray" |
| Iterative refinement | "Now make the background darker" (same conversation) |
| Analyze a video | "Analyze this video with Gemini: https://youtube.com/watch?v=..." |
| Analyze a file | "Upload /path/to/doc.pdf to Gemini and summarize it" |
Tools that Claude will call:
gemini_generate_image(prompt="a cat in watercolor style")
gemini_generate_image(prompt="make it gray", files=["/path/to/cat.png"])
gemini_generate_image(prompt="make the background darker", conversation_id=["c_abc", "r_123", "rc_456"])
gemini_analyze_url(url="https://youtube.com/watch?v=...", prompt="Summarize this video")
gemini_upload_file(file_path="/path/to/doc.pdf", prompt="Summarize key points")
This project is built on top of gemini-webapi by @HanaokaYuzu (fork by @xob0t with curl_cffi support) — a reverse-engineered async Python wrapper for the Google Gemini web app. Licensed under AGPL-3.0.
The watermark-removal algorithm (Reverse Alpha Blending) was originally inspired by gwt-mini by @allenk (Allen Kuo, MIT License) and gemini-watermark-remover by @GargantuaX (MIT License). The current version uses its own built-in implementation and calibrated alpha maps — no external binaries required.
AGPL-3.0 — free to use, modify, and distribute, provided the source code remains open.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnos
Browser automation using accessibility snapshots instead of screenshots
MCP server integration for DaVinci Resolve Studio