Content
# Gemini Browser MCP
MCP server that bridges **Claude Code** to **Google Gemini** via a Chrome extension — **no API keys required**.
Instead of using the Gemini API, it interacts with the Gemini web app directly, meaning you get all the features available in your browser: Flash, Pro, Extended thinking, uploads, and more.

---
## Features
- **No API keys needed** — uses your existing browser session.
- **Support for all models** (Flash, Pro, Extended thinking) via the official web UI.
- **Dual setup** — auto-configures Claude Code.
- **Extension Popup** to manage connected tabs, set active targets, and view the active model at a glance.

---
## Quick Start
### 1. Load the Chrome Extension
1. Load the `chrome-extension/` folder as an unpacked extension in Chrome:
- Go to `chrome://extensions/`
- Enable **Developer mode** (top-right toggle)
- Click **Load unpacked** (top-left button)
- Select the `chrome-extension/` folder from this repository
2. Open a tab on [gemini.google.com](https://gemini.google.com) and confirm you are logged in.
### 2. Configure Claude Code
Run the automatic installer:
```bash
npx gemini-browser-mcp
```
This starts a local setup wizard that automatically registers the MCP server inside Claude Code.
---
## Usage
In Claude Code, you can now use the `ask_gemini_web` tool directly:
```bash
# Ask Gemini a question
ask_gemini_web 1+1
# Give it a task
ask_gemini_web Explain quantum computing in simple terms
```
### Changing Models
To switch models, just change it on the active Gemini tab in Chrome. The extension will automatically detect the active model (Flash, Pro, Extended) and adapt the timeouts accordingly (up to 10 minutes wait for Extended thinking).
---
## Technical Details
1. The Chrome extension connects to a local Node.js WebSocket server (port `8085`).
2. Claude Code runs the MCP server on stdio.
3. When you run `ask_gemini_web`, the MCP server relays the prompt to the Chrome extension.
4. A content script injects the prompt, clicks send, waits for the response to stabilize in the DOM, and returns it to Claude.