open-gemini
Integrates with Google's Gemini web app through Chrome automation, enabling signed-in users to send prompts and access Gemini features such as text, image, video, music, canvas, research, conversation history, memory, and usage.
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., "@open-geminiask gemini to explain quantum computing in simple terms"
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.
open-gemini
Use your own signed-in Gemini web account from a local CLI, MCP server, or loopback HTTP bridge. It automates the Gemini web app through Chrome; it does not use the Gemini API and does not require a Google API key. Your Google account and plan determine which models and features are available. This project does not unlock paid features or quotas.
Requirements and setup
Node.js 22 or later
Google Chrome installed
A Google account that can use Gemini
Clone the repository and install its locked dependencies:
git clone https://github.com/mkshaonexe/open-gemini.git
cd open-gemini
npm ciSign in once through the normal Chrome window that open-gemini opens, then check the account:
node bin/cli.js login
node bin/cli.js status
node bin/cli.js capabilities
node bin/cli.js modelsAfter sign-in, ordinary commands launch Chrome headlessly using the saved profile. This is still a browser runtime: keep the profile available and do not open it in another Chrome process while open-gemini is using it.
Related MCP server: mcp-cli-gemini
CLI examples
node bin/cli.js ask "Explain this topic in three paragraphs"
node bin/cli.js ask "Summarize this file" --file ./report.pdf
node bin/cli.js ask "Make an image of a red fox in snow" --tool image
node bin/cli.js ask "Plan a short video about a solar eclipse" --tool video
node bin/cli.js ask "Compose a calm piano theme" --tool music
node bin/cli.js ask "Research recent battery recycling methods" --tool research
node bin/cli.js history --limit 10
node bin/cli.js conversation CONVERSATION_ID
node bin/cli.js usageask prints the answer text when present. Use call with JSON when you need the complete structured result, including media URLs or returned metadata:
node bin/cli.js call ask --json '{"prompt":"Make an image of a red fox in snow","tool":"image"}'The --tool options are image, video, music, canvas, and research. Check capabilities and models for what the current account exposes. Availability can change with account, plan, location, device, and rollout.
MCP
For an MCP host that supports a local stdio server, add a server entry using the absolute path to this checkout:
{
"mcpServers": {
"open-gemini": {
"command": "node",
"args": ["/absolute/path/open-gemini/bin/cli.js", "mcp"]
}
}
}Replace /absolute/path/open-gemini with the actual checkout directory. Configuration syntax varies by host, so translate this standard stdio server entry if needed. Complete node bin/cli.js login first. The MCP server exposes the methods in the account bridge, including gemini_status, gemini_capabilities, gemini_models, gemini_ask, history/conversation operations, memory operations, usage, and download. Destructive conversation or memory deletion requires confirm: true.
Claude, Codex, and other agents can use the same standard stdio MCP configuration when their host supports it. Hermes or OpenClaw can connect through standard MCP if the installed host supports MCP; otherwise use the CLI workflow in skills/open-gemini/SKILL.md. This repository does not install a host-specific plugin.
Long-running work and local HTTP bridge
For longer generation or research requests, start the server in a terminal:
node bin/cli.js serveThen submit and poll a job from another terminal:
node bin/cli.js jobs start ask --json '{"prompt":"Research this topic","tool":"research"}'
node bin/cli.js jobs JOB_IDThe server remains attached to one Chrome runtime. Stop it with Ctrl-C. A timed-out request may still have completed in Gemini; inspect its conversation or job state before retrying to avoid duplicate work.
The HTTP API listens on 127.0.0.1 by default and requires a generated bearer key. Get the local key only when configuring a trusted local client:
node bin/cli.js keyKeep this key private. It authorizes local API access and is separate from Google account credentials. The HTTP bridge limits JSON request bodies to 1 MiB and keeps a bounded, in-memory job queue of up to 100 jobs. Job state is not durable storage. The optional OpenAI-compatible routes expose model listing and one non-streaming, plain-text user message. They do not support streaming, tool calls, other message roles, or generation parameters.
Configuration
Configuration is stored under ~/.open-gemini by default. Environment variables can override it:
Variable | Purpose |
| Configuration, profile, and downloads directory |
| Chrome profile directory |
| Chrome executable path |
| Local HTTP API port (default |
| Local Chrome debugging port (default |
| Gemini account index in the browser URL (default |
| Override the generated local HTTP bearer key |
| Set to |
| Connect to an existing loopback Chrome debugging endpoint |
| Default request timeout in milliseconds |
| Point CLI commands to an already-running local bridge |
npm link is optional if you want the local checkout’s open-gemini command on your PATH. The project is used from source; this README does not promise an npm registry installation.
Troubleshooting
If
logincannot open Chrome, install Chrome or setCHROME_PATHto its executable.If Gemini still shows a sign-in page, complete sign-in in the Chrome window opened by
login, then runstatusagain.If you see
PROFILE_BUSY, another open-gemini process owns that profile. UseOPEN_GEMINI_URLto connect to its running server, or stop it before starting another command.If the Chrome debugging port is already in use, choose another
OPEN_GEMINI_CDP_PORT.If a model or feature is unavailable, check
capabilities,models, andusage; account eligibility and usage limits are controlled by Google.
See Gemini feature inventory and plans and limits for official references and scope notes.
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server for AI.TV creators — delegate account operations to your AI agent over MCP.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that wraps the Gemini CLI to provide tools for executing prompts, managing chat sessions, and accessing CLI extensions. It supports both local stdio and remote SSE transports for flexible integration with MCP clients.1-
- FlicenseAqualityDmaintenanceWraps the Gemini CLI as an MCP server, enabling AI tools to perform Gemini queries, interactive sessions, and extension management via a unified tool.411-
- AlicenseCqualityDmaintenanceExposes the local Gemini CLI as an MCP stdio server, providing tools for prompting, web search, file operations, and MCP management, enabling AI clients like Codex CLI and Claude Code to interact with Gemini.227MIT
- AlicenseNot gradedqualityBmaintenanceLocal MCP server exposing the dek-memory hybrid memory engine over stdio, with optional ChatGPT tools for managing account memories via a browser profile.MIT