SeleniumBase
๐ APIs for Web Scraping, Browser Automation, and E2E Testing. CDP Mode bypasses bot-detection and CAPTCHAs. Supports Playwright. Includes an MCP server and a CLI.
Install / Use
claude mcp add seleniumbase -- npx -y github:seleniumbase/SeleniumBaseIf the server publishes to npm under a different name, use that package instead โ check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Our assessment of SeleniumBase
SeleniumBase scores 87/100 on our quality scale, 1655th of 2,873 Automation skills we index.
Its MCP Server is 82 KB long, split into 5 sections with 89 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.
With 13,223 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated today, so SeleniumBase is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit โ read the skill file before letting an agent act on it.
SeleniumBase compared with similar skills
All 4 of these similar skills score higher than SeleniumBase; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| SeleniumBase (this skill)by seleniumbase | 87 | 13.2k | today | MCP Server |
| Agent-Reachby Panniantong | 100 | 108.4k | 2d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.7k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 93.9k | today | MCP Server |
Frequently asked questions
- How do I install SeleniumBase?
- Run
claude mcp add seleniumbase -- npx -y github:seleniumbase/SeleniumBase. The install tabs above show the steps for each supported agent. - Which AI agents does SeleniumBase work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is SeleniumBase safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is SeleniumBase still maintained?
- The repository was last updated today, so SeleniumBase is actively maintained.
Skill content
View source on GitHub๐ <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> bypasses bot-detection and <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/ReadMe.md">makes <span translate="no">Playwright</span> stealthy</a>.
โน๏ธ Example scripts that start or end with "<code>test</code>" run with <code><b>pytest</b></code>. Other scripts run directly with raw <code><b>python</b></code> (and start with "<code>raw</code>" to avoid confusion).
๐ This example uses <b><code translate="no">seleniumbase</code></b> <b><code translate="no">sb_cdp</code></b> (Pure CDP Mode):<br /><em>(It bypasses BrowserScan, Sannysoft, and Cloudflare bot-detection)</em>
from seleniumbase import sb_cdp
sb = sb_cdp.Chrome() # Launch a stealth browser
sb.goto("https://browserscan.net/bot-detection")
sb.assert_element('strong:contains("Normal")')
sb.sleep(1)
sb.goto("https://bot.sannysoft.com/")
sb.assert_element(".passed")
sb.assert_element_not_visible(".failed")
sb.sleep(1)
sb.goto("https://www.planetminecraft.com/account")
sb.type('[name="email"]', "Name123")
sb.type('[name="password"]', "Pass")
sb.click("input#autologin")
sb.solve_captcha() # Works on different CAPTCHAs
sb.assert_element('input[name="login"]')
sb.assert_element_not_visible("input[disabled]")
sb.sleep(1)
sb.quit() # Quit browser before end-of-program
<p align="center">
<img src="https://seleniumbase.github.io/cdn/img/results_normal.jpg" width="520" style="max-width: 100% !important; height: auto !important;" alt="BrowserScan Test Results: Normal" />
<br /><em>(All BrowserScan bot-detection tests passed successfully)</em>
</p>
<p align="center">
<img src="https://seleniumbase.github.io/other/sannysoft_success.jpg" width="428" style="max-width: 100% !important; height: auto !important;" alt="All Sannysoft tests passed successfully" />
<br /><em>(All Sannysoft bot-detection tests passed successfully)</em>
</p>
<p align="center">
<img src="https://seleniumbase.github.io/other/pmc_captcha_2.png" width="530" style="max-width: 100% !important; height: auto !important;" alt="Cloudflare Turnstile bypassed successfully" />
<br /><em>(Cloudflare Turnstile bypassed successfully on Planet Minecraft)</em>
</p>
โ <b><code>sb.solve_captcha()</code></b> handles CAPTCHAs that aren't bypassed automatically.<br />(If called when there's no CAPTCHA on the page, then nothing happens / no-op.)
โน๏ธ <code>sb.assert_*</code> methods wait up to 7 seconds for the expected condition.<br />(Raises an exception if the condition isn't met in time.)
<p align="left">๐ <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_yc_news.py" target="_blank" rel="noopener">This script</a> scrapes Hacker News listings:</p>
from seleniumbase import sb_cdp
sb = sb_cdp.Chrome(fast=True)
sb.goto("https://hn.algolia.com/?query=seleniumbase")
elements = sb.find_elements("div.Story_title > a")
for element in elements:
print("* " + element.text)
python raw_cdp_yc_news.py
<p align="left">
<img src="https://seleniumbase.github.io/other/yc_news_results.png" alt="SeleniumBase" width="510" style="max-width: 100% !important; height: auto !important;"/>
</p>
<p align="left">๐ <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py" target="_blank" rel="noopener">This script</a> bypasses Cloudflare's challenge page with UC + CDP Mode:</p>
from seleniumbase import SB
with SB(uc=True, test=True, locale="en") as sb:
sb.activate_cdp_mode()
sb.goto("https://gitlab.com/users/sign_in")
sb.sleep(2)
sb.solve_captcha()
sb.highlight('h1:contains("GitLab")')
sb.highlight('button:contains("Sign in")')
python raw_gitlab.py
<p align="left">
<img src="https://seleniumbase.github.io/other/gitlab_bypass_2.png" alt="SeleniumBase" width="420" style="max-width: 100% !important; height: auto !important;"/>
</p>
๐งช End-to-End Testing examples are located in ./examples/.
๐ Stealthy CDP Mode examples are located in ./examples/cdp_mode/.
๐ญ Stealthy Playwright examples are located in ./examples/cdp_mode/playwright/.
<h3 align="left">๐ CLI Options for Supported Chromium Browsers</h3> <p>๐ก You can set which Chromium browser to use via command-line parameters:</p>
``
Truncated for display โ read the full file on GitHub.
Related Skills
Agent-Reach
108.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu โ one CLI, zero API fees.
headroom
78.7kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.8kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
93.9k๐ท๏ธ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit โ see the Safety scan above for what the skill file itself contains.
