Gemini Web API
MCP server for Google Gemini — free image generation, editing & chat via browser cookies. No API keys needed.
What is Gemini Web API?
Gemini Web API is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for google gemini — free image generation, editing & chat via browser cookies. no api keys needed.
MCP server for Google Gemini — free image generation, editing & chat via browser cookies. No API keys needed.
This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server for Google Gemini — free image generation, editin
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx gemini-webapiConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Gemini Web API
Gemini Web API MCP is a Python-based server that connects Claude and other MCP clients to Google Gemini's capabilities — including free image generation, image editing, file analysis, and multi-turn chat — using browser cookies instead of a paid API key. It auto-detects your Google account credentials from Chrome, making setup frictionless. Developers and creatives who want to combine Claude's reasoning with Gemini's image generation without per-request API costs will find this server particularly useful.
Prerequisites
- Python 3.10+ and uv (the fast Python package manager) installed
- Google Chrome installed and signed into a Google account with Gemini access
- An MCP-compatible client: Claude Desktop or Claude Code
- Active Google account with Gemini enabled (free tier is sufficient)
Install uv if not already present
uv is used to run the server with all dependencies in an isolated environment without a manual virtualenv setup.
curl -LsSf https://astral.sh/uv/install.sh | shAdd the server to Claude Code
Register the Gemini Web API MCP server with Claude Code using the mcp add-json command. It installs and runs the package on-demand via uv.
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"]}'Add to Claude Desktop configuration (alternative)
For Claude Desktop, add the server entry manually to claude_desktop_config.json. Cookies are auto-detected from Chrome by default.
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"]
}
}
}Configure optional environment variables
Set optional env vars to control language, account selection, or to manually provide cookie values if auto-detection fails.
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--with", "gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git", "gemini-webapi-mcp"],
"env": {
"GEMINI_LANGUAGE": "en",
"GEMINI_ACCOUNT_INDEX": "0"
}
}
}
}Restart Claude and verify
Restart your MCP client. Ask Claude to generate a test image using Gemini to confirm the connection is working.
Gemini Web API Examples
Client configuration
Claude Desktop configuration with optional manual cookie environment variables for accounts where Chrome auto-detection fails.
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": [
"run",
"--with",
"gemini-webapi-mcp @ git+https://github.com/AndyShaman/gemini-webapi-mcp.git",
"gemini-webapi-mcp"
],
"env": {
"GEMINI_LANGUAGE": "en",
"GEMINI_ACCOUNT_INDEX": "0",
"GEMINI_WM_KEEP": "0"
}
}
}
}Prompts to try
Example prompts demonstrating image generation, editing, file analysis, and multi-turn chat via Gemini.
- "Generate a watercolor painting of a cat sitting on a windowsill at sunset using Gemini"
- "Now make the background darker and add rain outside the window"
- "Upload /path/to/report.pdf to Gemini and summarize its key findings"
- "Analyze this YouTube video URL and tell me the main topics covered"
- "Start a Gemini chat session and ask it to explain quantum entanglement simply"Troubleshooting Gemini Web API
Authentication fails with cookie errors
Make sure Chrome is open and you are signed in to Google with Gemini access. If auto-detection keeps failing, manually copy your __Secure-1PSID and __Secure-1PSIDTS cookie values from Chrome DevTools and set them as GEMINI_PSID and GEMINI_PSIDTS environment variables.
Image generation returns an error or blank result
Call the gemini_reset tool to reinitialize the session, then try again. If errors persist, verify your Google account has Gemini image generation enabled (visit gemini.google.com to confirm).
uv command not found after installation
Add uv to your PATH by running 'source ~/.cargo/env' or restarting your terminal. Alternatively install uv with 'pip install uv' as a fallback.
Frequently Asked Questions about Gemini Web API
What is Gemini Web API?
Gemini Web API is a Model Context Protocol (MCP) server that mcp server for google gemini — free image generation, editing & chat via browser cookies. no api keys needed. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Gemini Web API?
Follow the installation instructions on the Gemini Web API GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Gemini Web API?
Gemini Web API works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Gemini Web API free to use?
Yes, Gemini Web API is open source and available under the AGPL-3.0 license. You can use it freely in both personal and commercial projects.
Gemini Web API Alternatives — Similar APIs Servers
Looking for alternatives to Gemini Web API? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Gemini Web API in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Gemini Web API?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.