seleniumbase-mcp
Click on "Install 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., "@seleniumbase-mcpopen example.com and list page scripts"
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.
seleniumbase-mcp — SeleniumBase CDP Mode as an MCP server
An MCP server that exposes SeleniumBase's CDP Mode (undetected, driverless Chrome automation) to any MCP client — Claude Code, Claude Desktop, Cursor, or your own agent.
Beyond the usual click/type/screenshot tools, it ships a JavaScript
reverse-engineering toolkit: grep across a page's bundles, dump a function's
source, hook a function to record its arguments, and intercept fetch/XHR to
discover a site's private API — all without pulling megabytes of minified code
into the model's context.
Também disponível em português.
Why CDP Mode
SeleniumBase's CDP Mode drives Chrome over the DevTools Protocol with no WebDriver attached, which gets past most bot detection that trivially flags Selenium and Playwright. This server keeps that property intact and adds multi-browser session management on top.
Related MCP server: js-reverse-mcp
Features
Many browsers at once. Every browser is named by a
browser_idyou choose, so one agent can drive several, and several agents can share one server without stepping on each other.Thread-per-browser isolation. Each browser owns a dedicated thread and event loop — required, because SeleniumBase's CDP layer calls
loop.run_until_completeinternally and would deadlock inside FastMCP's loop.Context-frugal reverse engineering. The RE tools run JavaScript inside the page and return only the match, the slice, or the payload you asked for.
stdio or HTTP. Run one server per client for full isolation, or one shared HTTP server for several clients.
Install
git clone https://github.com/ileonzin/seleniumbase-mcp.git
cd seleniumbase-mcp
pip install -r requirements.txtRequires Python 3.10+ and a local Chrome installation.
Register with a client
Claude Code
claude mcp add seleniumbase-cdp -- python /absolute/path/to/seleniumbase-mcp/sb_mcp_server.pyClaude Desktop / any client with a JSON config
{
"mcpServers": {
"seleniumbase-cdp": {
"command": "python",
"args": ["/absolute/path/to/seleniumbase-mcp/sb_mcp_server.py"]
}
}
}Restart the client; the tools appear as mcp__seleniumbase-cdp__*.
Shared HTTP server (several clients, one browser pool)
python sb_mcp_server.py --http --port 8765claude mcp add --transport http seleniumbase-cdp http://127.0.0.1:8765/mcpGive each client its own browser_id prefix (agent1-main, agent2-main) so
they don't collide.
Tools
Lifecycle
Tool | What it does |
| Launch a CDP-mode Chrome under a name you pick |
| Close it and free the Chrome process |
| Names of all open browsers |
Navigation and interaction
Tool | What it does |
| Go to a URL, returns the landed URL |
| Click the first CSS match |
| Type into a field |
| Visible text of an element |
| Full page source |
| Current URL |
| Evaluate JS, return the value |
| Wait until visible |
| PNG returned as an image |
Reverse-engineering toolkit
Tool | What it does |
| Inventory of |
| Read one script by index or URL substring, paginated. Same-origin only (CORS blocks the rest). |
| Regex every inline and same-origin script; returns matching lines with file and line number. |
|
|
| Wrap a function so its calls are recorded (args + return). Cleared on navigation. |
| Last 200 recorded calls. |
| Install |
| Last 200 captured requests. |
Example: find out how a site signs its API calls
browser_open(browser_id="re", url="https://target.example")
network_log(browser_id="re") # start watching traffic
click(browser_id="re", selector="#search-button") # trigger the action
get_network(browser_id="re") # → POST /api/v2/search, X-Sig header
grep_js(browser_id="re", pattern="X-Sig|signature")
get_fn_source(browser_id="re", expression="window.__app.sign")
hook_fn(browser_id="re", path="__app.sign") # capture real inputs
get_hook_log(browser_id="re")
browser_close(browser_id="re")The model sees a handful of matched lines and one function body instead of a 3 MB bundle.
Notes and limits
Prefer
headless=Falseon anti-bot sites. CDP Mode is meaningfully more stealthy with a visible window.Cross-origin scripts are unreadable by
get_scriptandgrep_js— the page's ownfetchis subject to CORS. They're reported underunreadable.hook_fncaptures the return value synchronously. For anasyncfunction you get the Promise object, not its resolution; the arguments — the usually interesting part — come through fine.Hooks die on reload. Both
hook_fnandnetwork_logpatch live objects, so navigation or a reload wipes them. Re-install after navigating.Every
browser_openstarts a real Chrome process. Close what you open.
Intended use
Built for authorized work: testing your own sites, scraping where you have permission, security research, and understanding APIs you're allowed to integrate with. Respect the terms of service and the law of whatever you point it at.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables direct browser control via Chrome DevTools Protocol, supporting navigation, interaction, content extraction, and screenshots through a single MCP tool.Last updated1336MIT
- Alicense-qualityBmaintenanceA Chrome DevTools Protocol-based MCP server that enables AI coding assistants to control browsers for JavaScript debugging, reverse engineering, web scraping, and API debugging.Last updated1,0461Apache 2.0
- AlicenseBqualityCmaintenanceProvides undetectable browser automation for LLM agents via MCP, enabling real Chrome interaction with stealth features, DOM accessibility, and DevTools integration.Last updated983MIT
- Alicense-qualityCmaintenanceEnables browser automation over MCP using a real Chrome browser with existing profile, supporting real tabs, downloads, cookies, and RPA workflows.Last updated86MIT
Related MCP Connectors
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
A paid remote MCP for AI agent browser DevTools MCP, built to return verdicts, receipts, usage logs,
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ileonzin/seleniumbase-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server