Repository navigation
how to let gemini cli use a browser
If you already use Gemini CLI, you do not need invisible_playwright_mcp's interface, its CLI, or an OpenRouter key. Gemini brings the model; you add the browser to it. The browser is the same MCP server invisible_playwright_mcp itself talks to - the MCP server - so anything invisible_playwright_mcp's own interface can do, your assistant can do too, and that is by construction: the interface holds no privileged access, it calls the same tools over the same protocol as any other client.
This page is Gemini CLI specifically. Claude Code and Codex have their own pages, and the clients that take a config file instead of a command have theirs: Claude Desktop, Cursor, Cline. The config blocks themselves live in the MCP server page, which is the one place they are kept current.
Two prerequisites, same as everywhere in this project: Python 3.11 or newer on
Windows (x86_64) or Linux (x86_64, arm64) - macOS is not supported, the last
engine build for it was firefox-20 - and uv,
because the extension runs the server with uvx. Then, once:
gemini extensions install https://github.com/oss-invisible/playwright_mcpGemini CLI asks you to confirm that the extension comes from a third party,
then reports it installed and enabled. The extension brings two things: the
MCP server, started as uvx invisible-playwright-mcp, so there is nothing to clone or
pip-install first; and a setup skill that knows about the engine download
below, so Gemini can walk you through it if browser_open reports that the
download failed. Check with gemini extensions list: invisible_playwright_mcp is there, with
the server invisible_playwright_mcp under MCP servers and setup under agent skills.
The same extension is listed in the
Gemini CLI extensions gallery, where the
gallery's own install command is this one. Updates come with
gemini extensions update invisible_playwright_mcp.
Installing the extension does not install the browser. The engine is a patched
Firefox of roughly a quarter of a gigabyte, and the server downloads it the
first time it starts, from the moment Gemini connects it - so by the time you
type a first browsing prompt, it is usually there. If it is not yet,
browser_open does not sit there: it answers with how far the download is and
asks to be called again in a minute, and Gemini does that on its own.
To get it over with in a terminal where you can watch the progress, or after a download that failed:
uvx invisible-playwright fetchIt is cached afterwards and shared by every way into the engine, including invisible_playwright_mcp's own interface if you later run that too.
A set of browser tools from the server invisible_playwright_mcp. The authoritative list is
whatever /mcp shows in a session for your installed server version; the
families, with the names invisible_playwright_mcp's own client code knows them by:
-
Navigation:
browser_navigate. A browser drives one page; when you need a second,browser_openopens thesupportbrowser beside it rather than a tab, so the two sites never share cookies or a fingerprint. -
Reading the page:
browser_read_text,browser_read_html, andbrowser_snapshotfor a structural view of what is interactive. -
Acting on the page:
browser_clickandbrowser_click_at,browser_type,browser_press_key, andbrowser_select_optionfor dropdowns, added precisely so a model never has to fake a selection through script. -
Seeing it:
browser_take_screenshot.
Behind the tools is the point of the exercise: a real patched Firefox that drives pages through actual input events, not a headless toolkit. What that buys, and what it honestly does not, is the blocked page's subject.
Start small, so the first success and the first failure are both legible:
Go to example.com and tell me the main heading on the page.
One navigation, one read. If this works, the server, the engine and the wiring all work. Then something with a decision in it:
Go to [paste the URL of a docs page you actually read] and find the section about installation. Quote the exact command it recommends.
Then something multi-step, the shape most real use takes:
Open [paste the URL of a public page with a list on it], read the first ten entries, and give them to me as a table with a link column.
If that last shape is your actual goal, the extract-to-CSV page takes it the rest of the way. One habit worth forming from the start: ask for one page and one outcome per prompt. The assistant sees the page only through tool results, and short steps keep its context small and its mistakes cheap.
-
invisible_playwright_mcpis not ingemini extensions list. The install needsgiton your machine, because Gemini CLI fetches the extension from GitHub; the command says so when it is missing. Ifuvxis not on your PATH, the extension can be installed and its server still fail to start - install uv and tryuvx invisible-playwright-mcpby hand, which surfaces the real error. - The first browsing prompt answers "the engine is downloading". That is the server saying what it is doing, not a fault: ask again in a minute, or run the fetch command above in a terminal to watch it finish.
-
Tools appear but every call fails. Try the one-line prompt above; if
even
example.comfails, the problem is below the model - the browser-or-model page is the systematic version of that diagnosis, and blocks and challenge pages have their own checklist. - You want a proxy, a fixed identity, or a persistent profile. Those are server-side options, read from the environment Gemini was started in; the MCP server page documents them. This page deliberately does not duplicate that reference.
How do I add invisible_playwright_mcp's browser to Gemini CLI?
gemini extensions install https://github.com/oss-invisible/playwright_mcp, once, with uv
installed. New sessions then have the browser tools in /mcp.
Do I need an OpenRouter key for this? No. The key is only for invisible_playwright_mcp's own interface and CLI, where invisible_playwright_mcp must bring a model. In Gemini CLI, Gemini is the model.
Why does the first browsing request say the engine is downloading? The
engine, about a quarter of a gigabyte, is downloaded by the server itself when
it starts, and browser_open reports the progress rather than waiting. Run
uvx invisible-playwright fetch once in a terminal to do it up front instead.
Is this different from what invisible_playwright_mcp's own UI drives? No - same server, same engine, same tools. The interface is just another MCP client of it, with no privileged access.
Does it work on macOS? No. The engine ships for Windows and Linux only;
the last macOS build was firefox-20.
All retrieved 2026-09-22.
-
oss-invisible/playwright_mcp, this repository's
README (the verbatim install command, the prerequisites and platforms, the
engine download), its
gemini-extension.json(the manifest Gemini reads) and source:src/invisible_playwright_mcp/link.pyandsrc/invisible_playwright_mcp/web.py(the interface reaching the browser over MCP as an ordinary client),src/invisible_playwright_mcp/actions_help.py(the tool names above). - Gemini CLI extensions, the install, list and update commands, and the gallery.
- The MCP server page, the server itself: config blocks for other clients, server-side options, and the current tool list.
See also: running invisible_playwright_mcp with Claude Code, running invisible_playwright_mcp with Codex, how to extract data to CSV with an AI agent, and browser problem or model problem?.
From the invisible_playwright_mcp wiki. Gemini CLI takes the browser as an extension, one command and no config file, and the server says "downloading" instead of making you wait, so the first prompt is never a mystery.
- OpenAI Operator alternatives
- Open-source Operator-style agents
- Is OpenAI Operator still available?
- OpenAI Operator vs Claude computer use
- browser-use alternatives
- Choosing an AI browser agent
- Open-source AI browser agents
- Open-source computer-use agents
- What is an AI web agent?
- AI browser agents vs traditional scraping
- Cloud browser infrastructure for AI agents, explained
- Browserbase alternatives
- Firecrawl vs an AI browser agent
- Skyvern alternatives
- Stagehand vs browser-use
- Project Mariner is gone: what replaced it
- Manus alternatives
- Gemini computer use vs Claude computer use
- A stealth browser MCP, reviewed honestly by its own wiki
- AI browser vs AI browser agent: which one do you want?
- AI browser agent vs RPA: which one fits the job
- AI browser agent vs n8n, Zapier and Make
- Vercel agent-browser alternatives, compared honestly
- What is an agentic browser? Definition and the two kinds
- Open-source agentic browsers: the three layers, compared
- Choosing an MCP server for browser automation: four axes
- Stealth MCP servers compared: Camoufox, nodriver, Patchright
- Playwright MCP alternatives, and the three you don't need
- Autonomous browser agents: the four rungs of autonomy
- What is actually free in the AI browser agent stack
- browser-use on GitHub: what the repo actually gives you
- Playwright MCP vs Chrome DevTools MCP: different jobs
- How to choose among MCP servers: a map by category
- Which MCP servers are worth adding to Claude Code
- MCP on GitHub: finding servers and judging them fast
- MCP vs an API: the decision, and what the wrapper costs
- MCP alternatives: when the protocol is the wrong shape
- Why does my AI agent get blocked?
- The timing signal AI agents give off
- Agent retry loops trip rate limits, not fingerprints
- Claude computer use detected as a bot
- browser-use getting blocked: what you can and cannot change
- Playwright MCP session blocked: four causes, four fixes
- Playwright MCP and captchas: what actually gets you past
- Cloudflare and a browser MCP server: what is being read
- Can an AI agent solve a captcha? The honest answer
- Getting an AI agent to fill out forms
- The best model for an MCP browser agent, and what it really costs
- Browser problem or model problem?
- How to use a Playwright MCP server with Claude Code
- Extracting data to a CSV with an AI agent
- Monitoring a page for changes with an AI agent
- How to let Claude Desktop control a browser
- How to add a browser to Cursor as an MCP server
- Using an AI agent to hunt for apartments
- Getting website data into Google Sheets with an AI agent
- Using an AI agent to download invoices from portals
- AI agents for web research
- Using an AI agent to test your own website
- How to add a browser to Cline as an MCP server
- Posting to social media with an AI agent
- Posting to Facebook with an AI agent
- Posting to Instagram with an AI agent
- Posting to X with an AI agent
- Automating LinkedIn posts: read this first
- Appointment bots: what they are and what an agent can legitimately do
- Track prices across sites with an AI agent
- Build a lead list with an AI browser agent
- Run an AI browser agent on a schedule
- AI browser agent with a local LLM: what changes
- Should you log your AI agent into your accounts?
- How to write a task an AI browser agent can follow
- Move data between two web apps with an AI agent
- The MCP server
- How the tools are shaped, and why
- Playwright MCP vs the Playwright CLI: which fits when
- Playwright MCP: browser is already in use, and the fix
- Playwright MCP best practices: four decisions that matter
- Playwright MCP with a proxy, and the three leaks it leaves
- A browser MCP server in GitHub Copilot: setup and limits
- Using a browser MCP server for web scraping: the pattern
- Which LLM for browser automation: the four properties
- How to build a browser agent, and what to take instead
- Getting an AI agent to log into a website: three routes
- MCP tools, resources and prompts: who controls each
- How many MCP tools is too many? The context arithmetic
- How to build an MCP server: the decisions, not the scaffold
- Local or remote MCP server: what changes, and what does not
- Writing an MCP client in Python: the thirty-line version
- Self-hosted AI agent: what one actually costs to run
- How long an AI browser agent takes per step, measured
- Text, HTML, snapshot or screenshot: what the agent should read
- Giving an AI browser agent a stopping condition
- Keeping an AI browser agent out of destructive actions
- Why did the AI agent click the wrong thing
- When the page changes under the AI agent
- Running one AI agent task across a list of sites
- Seeing a page as it appears in another country
- Getting data out of a dashboard with no export button
- Two browsers in one session: main and support
- Finding the dead links on a site with an AI agent
- Filling a CRM record from a company's website
- One form submission per spreadsheet row, with an AI agent
- Dated screenshots of a page as evidence
- Checking order and delivery status with an AI agent
- Reading a PDF that opens inside the browser
- Summarising a long page or thread with an AI agent
- Collecting every image on a page with its caption
- Collecting event and course listings with an AI agent
- Cancelling a subscription with an AI agent
- What an AI agent can and cannot do inside an iframe
- Shadow DOM and an AI agent: you can click it, you cannot read it
- How to add a browser to Codex as an MCP server
- What a page snapshot costs, per control
- How to let Gemini CLI use a browser
- Native selects and the ones that only look like selects
- Clicking by selector or by coordinates
- How long the agent waits before it gives up
- What a second browser costs
- Uploading a file with an AI agent, and why this one cannot
- Watching the agent work, and when it is worth it
- When not to use an AI browser agent
- Agent or script: deciding once instead of every time
- Using the keyboard instead of the mouse
- Secrets in an agent task: where they end up
- What an agent run should log
- Deduplicating what an AI agent collects
- Normalising values across sites
- Validating an AI agent's output
- Reading a table with an AI agent
- Driving a site's own search and filters
- The task works headed and fails headless
- How to let the AdaL CLI use a browser