Skip to main content
Glama

gemini-mcp

An MCP server that lets Claude (or any MCP client) use the Google Gemini web app with your normal Google account. No API key.

It drives the real Gemini website in its own Chrome window. The tools find buttons, links and text boxes by their accessible role and name (what a screen reader sees), not by CSS selectors, so the agent can re-read the page and keep working when Google changes the layout.

Unofficial. This is not affiliated with Google. It automates the normal website, which may go against Google's Terms of Service and may stop working if Google blocks automated browsers. Use it for personal and experimental work, at your own risk. If you need something supported, use the paid Gemini API instead.

Tools

Shortcuts:

Tool

What it does

gem_ask

Send a prompt and return the finished reply as markdown. Options: continue a chat (chat), attach local files, pick a model ("Pro", "Flash", ...), switch on a tool ("Create image", ...)

gem_list_chats

List recent chats with their URLs

gem_download

Click a download button (e.g. "Download full size image") and save the file (default ~/Downloads/Gemini)

General tools, which work on any page:

Tool

What it does

gem_snapshot

Accessibility tree of the page: every element's role, name and text

gem_open

Go to a URL (default: a new chat)

gem_click

Click an element by role/name, or by visible text

gem_type

Fill a text field and optionally press Enter

gem_press

Press a key, e.g. Escape to close a popup

gem_upload

Click an upload button and give it local files

gem_read

Read the visible text of the page or one element

gem_wait

Wait for a reply to finish, or until some text appears

gem_screenshot

PNG of the page when the text view is not enough

Related MCP server: WebCore-MCP

Setup

Needs Node.js 18+ and a Chrome-type browser. It uses, in order: GEM_CHROME, an installed Google Chrome or Chromium, or a Chromium downloaded by Playwright (npx playwright install chromium).

git clone https://github.com/DwytMCL/gemini-mcp.git
cd gemini-mcp
npm install
node server.js login
npm test   # starts the server, lists the tools and opens Gemini

login opens a separate Chrome window with its own profile. Sign in, check Gemini loads, then quit that window (Cmd+Q). The server cannot attach while the sign-in window is still open.

Sign in separately for each tool. Never copy a signed-in profile folder to another browser or server: Google sees the same session in two browsers, revokes it, and both come back signed out after the next restart.

Claude Code

claude mcp add -s user gemini -- node /absolute/path/to/gemini-mcp/server.js

Claude Desktop

Add to claude_desktop_config.json and restart Claude Desktop:

{
  "mcpServers": {
    "gemini": { "command": "node", "args": ["/absolute/path/to/gemini-mcp/server.js"] }
  }
}

Settings

All optional, set as environment variables:

Variable

Default

Meaning

GEM_CHROME

Google Chrome, else Playwright's Chromium

Path to the Chrome/Chromium binary

GEM_PROFILE

~/.gemini-mcp/profile

Browser profile holding your Google sign-in

GEM_PORT

9334

Local port the server uses to control Chrome

GEM_DOWNLOADS

~/Downloads/Gemini

Where gem_download saves files

Privacy

Your Google session lives only in the browser profile folder on your machine (GEM_PROFILE). Nothing is sent anywhere except to Google by the browser itself. Treat that folder like a password: don't share or commit it. Chrome's control port listens on 127.0.0.1 only, but any program on your machine could use it while the window is open.

License

MIT

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Use your signed-in Chrome through a local MCP server and companion extension. Supports tabs, navigation, forms, screenshots, and page reading, with a deny-all domain allowlist. Install: npx -y mcp-browser-extension@latest.
    22
    467 npm
    6
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables a local MCP server to control an authenticated Chrome browser for interacting with Google Search, Gemini, ChatGPT, Claude, and DeepSeek, including web search and image generation without per-provider API keys.
    -
  • A
    license
    B
    quality
    C
    maintenance
    Enables browser control through your existing signed-in Chrome profile, letting MCP clients like Claude Code manage tabs, navigate, inspect pages, and perform real user interactions via tool calls. Works with any model backend without needing Playwright or a fresh browser profile.
    21
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables Gemini to control a visible dedicated Chrome profile with structured page controls, screenshot/coordinate tools, and compact output via Playwright MCP, without a separate API key.
    MIT