gemini-mcp
Automates Gemini on gemini.google.com via an authenticated browser profile, exposing tools to chat with Gemini, switch models, adjust thinking depth, reset conversations, and upload local files for analysis.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gemini-mcp Upload report.pdf and ask Gemini to summarize it using 4 Argon."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Gemini MCP (gemini-mcp)
A local Model Context Protocol (MCP) server that automates gemini.google.com using an authenticated browser profile via Playwright CDP.
Built specifically to unlock web-exclusive capabilities—including 4 Argon, 3.1 Pro, and Thinking Level depth controls—directly inside agentic workflows (Claude Desktop, Cursor, Hermes Agent, etc.).
Features
Model Switching:
4 Argon(Complex tasks / Deep reasoning) — Requires Gemini Advanced / Google One AI Premium (Pro) plan3.1 Pro(Advanced reasoning)3.8 Flash(All-around everyday tasks)3.5 Flash-Lite(Fastest responses)
Google Plan Requirement for 4 Argon:
To unlock and use 4 Argon, your signed-in Google account must have an active Google One AI Premium / Gemini Advanced (Pro) subscription. Free-tier Google accounts will only have access to 3.8 Flash and 3.5 Flash-Lite.
Thinking Depth:
Low(Quick & concise)Medium(Balanced depth)High(Extra thorough reasoning)
Local File Uploads: Upload images, documents, and code files directly via
gemini_upload_and_ask.Usage & Quota Monitoring: Check live consumption %, weekly limits, and reset timestamps via
gemini_usage.Browser Profile Isolation: Defaults to a dedicated secondary profile (
Profile 1) to ensure your main personal profile remains untouched.Headless & Headed Support: Automatically detects running CDP instances (default:
9333), launches headless viaxvfb-runon Linux servers, or opens normally on desktop environments (Linux, macOS, Windows).
Related MCP server: Browser MCP
Exposed Tools
Tool | Description |
| Returns connection state, signed-in Google account, active model, and thinking level. |
| Checks real-time quota usage limits from |
| Sends a prompt to Gemini with optional model selection, thinking level, and chat reset. Waits for streaming to complete. |
| Changes the active model or adjusts thinking level without sending a message. |
| Resets the session and opens a fresh conversation. |
| Uploads local file paths (images/docs/code) and submits a prompt about them. |
Prerequisites
Google Account with Pro Plan: To access 4 Argon, your account must be subscribed to Gemini Advanced / Google One AI Premium (Pro).
Node.js: v18.0.0 or higher.
Browser: Brave Browser (recommended) or Google Chrome.
(Optional - Linux Headless): If running on a headless Linux server without a display:
sudo apt update && sudo apt install -y xvfb
Quick Start
1. Clone & Build
git clone https://github.com/ferrianes/gemini-mcp.git
cd gemini-mcp
npm install
npm run build2. One-Time Google Authentication
Before running the MCP server, sign in to your Google Account on the designated browser profile once:
On Linux:
brave-browser --profile-directory="Profile 1" "https://gemini.google.com/app?hl=en"On macOS:
open -a "Brave Browser" --args --profile-directory="Profile 1" "https://gemini.google.com/app?hl=en"Log in to your Google account (with Gemini Advanced / Google One Pro access).
Complete 2FA / Passkey verification.
Once the Gemini chat interface loads, close the browser window. The session cookies will be saved in that profile.
MCP Configuration
Add gemini-mcp to your MCP client configuration (Claude Desktop, Cursor, Hermes Agent, etc.):
Option 1: Direct via npx (No manual clone needed)
Using GitHub repository directly:
{
"mcpServers": {
"gemini": {
"command": "npx",
"args": [
"-y",
"github:ferrianes/gemini-mcp"
]
}
}
}Or via npm (if using the published @ferrianes/gemini-mcp package):
{
"mcpServers": {
"gemini": {
"command": "npx",
"args": [
"-y",
"@ferrianes/gemini-mcp"
]
}
}
}Option 2: Local Script (run.sh)
{
"mcpServers": {
"gemini": {
"command": "/path/to/gemini-mcp/run.sh"
}
}
}Environment Variables
You can customize behavior using the following environment variables:
Variable | Default | Description |
| Auto-detected | Path to browser binary (e.g. |
|
| Chrome/Brave profile folder name to use. |
| OS Default | Path to the browser user data directory. |
|
| Port used for Chrome DevTools Protocol remote debugging. |
License
This project is licensed under the MIT License.
Available Tools
6 toolsgemini_chatChat with GeminiA
Send a prompt to Gemini web. Supports switching models ('Argon' / '4 Argon', 'Pro' / '3.1 Pro', 'Flash' / '3.8 Flash', 'Flash-Lite') and setting thinking level ('low', 'medium', 'high'). Waits for response to complete and returns the text.
Inputs: prompt (required), model, new_chat, thinking_level, +1 more.
gemini_new_chatStart New ChatCIdempotent
Start a fresh chat conversation on Gemini.
Inputs: no named parameters.
gemini_statusGemini Web StatusARead-only
Check the Gemini web session (signed-in Google account, active model, thinking level, and available models).
Inputs: no named parameters.
gemini_switch_modelSwitch Model or Thinking LevelAIdempotent
Switch the active model ('Argon', 'Pro', 'Flash', 'Flash-Lite') or adjust thinking level without sending a chat message.
Inputs: model, thinking_level.
gemini_upload_and_askUpload Files and Ask GeminiB
Upload one or more local files (images, documents, code) to Gemini and ask a question about them.
Inputs: prompt (required), file_paths (required), model, new_chat, +2 more.
gemini_usageGemini Quota & Usage LimitsARead-only
Check Gemini quota and usage limits from gemini.google.com/usage, including current usage percentage, reset time, weekly limit, and active plan (Pro / Ultra / Free).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct role: status vs usage are separated by session/model info versus quota/limits, and chat/new_chat/switch_model/upload_and_ask are clearly differentiated. The only mild overlap is between gemini_chat and gemini_upload_and_ask, since both send prompts, but the file-upload capability makes the boundary clear enough.
All six tools use a consistent gemini_ prefix with snake_case verb/noun naming (gemini_status, gemini_chat, gemini_new_chat, gemini_usage, gemini_switch_model, gemini_upload_and_ask). The pattern is predictable and readable throughout.
Six tools is well-scoped for a Gemini web-session wrapper, with each tool earning its place across status, chat, reset, usage, model switching, and file upload. There is no obvious redundancy or bloat.
The surface covers the core lifecycle: check status, start a new chat, send prompts, switch models, upload files, and inspect usage. Minor gaps exist around conversation history management (listing or deleting past chats), but core workflows are covered.
Maintenance
Related MCP Connectors
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to drive a real, logged-in Chrome browser for web automation tasks like navigation, clicking, typing, and screenshotting.2 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables MCP clients to control a real local browser window for web automation tasks such as clicking, typing, scrolling, and taking screenshots.11 npm-
- AlicenseBqualityCmaintenanceEnables MCP clients like Codex to operate chatgpt.com through a dedicated persistent browser profile, allowing chat creation, project management, prompt submission, file uploads, and response reading without using the ChatGPT API.33MIT
- AlicenseBqualityCmaintenanceEnables MCP clients to drive a real Chromium browser for automation, including navigation, JavaScript execution, CDP commands, network capture, and multi-tab control.730 PyPIGPL 3.0