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-mcpUpload 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.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Target model to select. Defaults to current active model. | |
| prompt | Yes | The user prompt or instruction to send to Gemini. | |
| new_chat | No | Whether to reset to a clean chat window before sending. | |
| thinking_level | No | Thinking depth level for reasoning models. | |
| timeout_seconds | No | Max seconds to wait for generation to finish. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare non-readOnly, openWorld, non-idempotent, non-destructive, so the description earns credit for adding that the call blocks until generation finishes and returns text, plus the thinking-level behavior. It stops short of disclosing that the chat is stateful across calls (continuity only hinted at by new_chat) and says nothing about timeout/failure behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three front-loaded sentences with the action first and the return contract last; nothing is padded. The inline enumeration of model aliases is slightly redundant with the schema enum and is the only wasteful element.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a five-parameter, no-output-schema tool with full schema coverage, the description explains the action, the blocking wait, and the text return, which is enough to call it correctly. The main gap is conversational statefulness and what happens on timeout, which an agent would need to reason about.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema documents all five parameters. The description's model aliases and thinking levels largely duplicate the enum values rather than adding new meaning (e.g., what 'Argon' maps to, or whether thinking_level applies to non-reasoning models).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Send a prompt to Gemini web') plus the return behavior ('returns the text'), so the core action is unambiguous. It doesn't differentiate from siblings like gemini_upload_and_ask or gemini_switch_model, even though it partially overlaps their functionality via the model parameter.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use or when-not-to-use guidance is given, and no sibling is named as an alternative. The description advertises model switching inline, which overlaps gemini_switch_model, but never says when to use this tool versus that one.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_new_chatStart New ChatCIdempotent
Start a fresh chat conversation on Gemini.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations state it is not read-only, idempotent, and non-destructive, and the description adds nothing beyond 'start a fresh chat'. It does not say what happens to the existing conversation or context, what 'fresh' means for state, or what the caller gets back. For a state-mutating tool, this leaves the key behavioral questions unanswered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One short, front-loaded sentence with no filler. It is efficient, though its brevity comes at the cost of the missing behavioral detail rather than from disciplined editing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a no-parameter, no-output-schema tool with annotations covering the safety profile, the definition is minimally sufficient to invoke it. However, it should say what starting a fresh chat does to existing context and how it relates to gemini_chat, which are not covered anywhere else.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, and the schema is fully described, so there is no parameter semantics burden. Baseline 4 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description is essentially a restatement of the title 'Start New Chat' with 'fresh' and 'conversation' added. It conveys the basic action but offers no distinguishing detail versus siblings like gemini_chat, so it lands in tautology territory.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to call this rather than gemini_chat or gemini_switch_model. No exclusions, prerequisites, or alternative-selection criteria are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_statusGemini Web StatusARead-only
Check the Gemini web session (signed-in Google account, active model, thinking level, and available models).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety and external-dependency profile is covered. The description adds the useful detail that it reports session state fields rather than performing an action, but says nothing about failure modes such as an unauthenticated session or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with the resource first and the reported fields in parentheses. Nothing is redundant or padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no parameters and no output schema, the description carries the burden of saying what comes back, and it does so by naming the four reported fields. Minor gap: it does not state what happens or what is returned when no session is signed in.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4. The description correctly implies no input is required, and the listed fields are outputs, not arguments.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb ("Check") and resource ("Gemini web session") and enumerates exactly what is inspected: signed-in account, active model, thinking level, available models. That enumeration separates it from siblings like gemini_chat and gemini_switch_model, though no sibling is named explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use or when-not-to-use guidance, and no alternative is named. The inspection nature of the tool implies it is a pre-flight or diagnostic call before gemini_chat or gemini_switch_model, but the agent must infer that.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model to switch to. | |
| thinking_level | No | Thinking level to set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare this is a non-read-only, idempotent, non-destructive state change; the description usefully adds that no chat turn is triggered. It does not say whether the switch persists across later calls, whether omitted parameters are left unchanged, or what the response reports.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One short sentence, front-loaded with the primary action and qualified with the key constraint. Nothing superfluous.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With zero required parameters and no output schema, the definition should clarify whether both optional parameters can be set together and what a call with no parameters does. Those behaviors are left unstated, which is a meaningful gap for a two-optional-param state-changing tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and both parameters have enums, so the schema carries the parameter documentation. The description repeats four model names already in the enum but adds no guidance on defaulting, combining model and thinking_level, or calling with neither parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('switch the active model') plus a second capability ('adjust thinking level'), and enumerates the model names. The clause 'without sending a chat message' distinguishes it cleanly from the gemini_chat sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'without sending a chat message' implies the selection condition: use this when you only want to change model or thinking level, and use gemini_chat when you actually want a response. It stops short of naming gemini_chat explicitly or stating what happens if both parameters are supplied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Target model. | |
| prompt | Yes | Prompt or instructions regarding the uploaded file(s). | |
| new_chat | No | Whether to reset to a clean chat window before sending. | |
| file_paths | Yes | Absolute paths to the local files to upload. | |
| thinking_level | No | Thinking depth level. | |
| timeout_seconds | No | Max seconds to wait for generation to finish. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false, openWorldHint=true, and non-idempotent, so the safety profile is covered. The description adds the useful fact that files leave the local machine for Gemini, but omits whether uploads persist across turns, whether the chat window is shared with gemini_chat, and what a repeated call does to an existing session.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler, and the verb+resource comes first. It is arguably too terse for a six-parameter, session-affecting tool, but nothing in it is redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a non-read-only, open-world tool with six parameters and chat-session state (model, thinking_level, new_chat, timeout), one sentence leaves key questions unanswered: does the upload persist in the conversation, and how does this differ from gemini_chat plus gemini_new_chat. High schema coverage offsets some of this, but the session semantics are not in the schema at all.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all six parameters are already documented, setting the baseline at 3. The description adds only a mild hint about supported file kinds (images, documents, code); it says nothing about model selection, thinking_level, timeout behavior, or what new_chat actually resets.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific compound action: uploading local files (images, documents, code) to Gemini and asking a question about them. This implicitly distinguishes it from gemini_chat (no file upload), but the description never names that sibling or explicitly contrasts the two.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied by the file-upload framing — an agent can infer 'use when I have local files to reason about.' There is no explicit guidance on when to prefer gemini_chat instead, nor on how this interacts with gemini_new_chat or gemini_switch_model.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and openWorldHint, so safety and network access are covered. The description adds real value by enumerating the returned data and the plan enum (Pro/Ultra/Free), which substitutes for the missing output schema. It says nothing about authentication or session requirements, which matters for an open-world fetch against a logged-in web page.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler, and the returned fields are listed compactly in one clause. The URL is slightly redundant but usefully anchors where the data comes from.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the enumerated return fields are the right thing to include, and they are present. What is missing for an open-world web-scraping tool is any note about requiring a signed-in session, possible failure modes, or what an unauthenticated agent should expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing for the description to disambiguate. Baseline for a no-parameter tool applies, and the description does not confuse matters by implying optional filters that do not exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('Check Gemini quota and usage limits') and names the source page plus the exact data points returned (usage percentage, reset time, weekly limit, plan). It is understandable without opening the schema. It does not, however, distinguish itself from the sibling gemini_status, which an agent could easily confuse it with.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer this is the tool for quota questions rather than for chat or status. There is no explicit when-to-use, when-not-to-use, or pointer to gemini_status as the alternative for service health checks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.1- First observed
gemini_chat - First observed
gemini_new_chat - First observed
gemini_status - First observed
gemini_switch_model - First observed
gemini_upload_and_ask - First observed
gemini_usage
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.9 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables MCP clients to control a real local browser window for web automation tasks such as clicking, typing, scrolling, and taking screenshots.8 npm-
- AlicenseBqualityBmaintenanceEnables 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.7GPL 3.0