botcan-mcp
An MCP server for YAML-driven browser automation that runs recipes and returns extracted data.
play_recipe— execute a YAML recipe from a file path (optionaloutput_dir) to open pages, run browser steps, and collect extracted dataplay_steps— execute inline YAML (agent-generated) mirroring the recipe format, with optionaloutput_dirRecipes can fill/click/select/hover/scroll forms, wait for elements, extract text, copy link URLs, download files, take screenshots, and save JSON
Supports navigation via
open, an orderedstepslist, and optionalcloseErrors (bad YAML, unknown actions, failed steps) are returned in results rather than raised, preserving data collected before failure
Enables browser automation and scraping through Firefox via Playwright, executing YAML recipes to navigate pages, interact with elements, extract data, download files, and take screenshots.
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., "@botcan-mcp grab the top 5 Hacker News stories and return their titles and links"
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.
botcan
YAML-driven browser automation and scraping. Write a recipe, run it, get extracted data plus downloaded files. Runs Firefox through Playwright; every run uses a fresh disposable browser profile.
Setup
Requires uv.
uv sync
uvx playwright install firefox # one-time per machineRelated MCP server: marionette-mcp
Run a recipe
uv run python main.py # demo recipe, visible browser
uv run python main.py my_recipe.yaml # any recipe
uv run python main.py my_recipe.yaml ./out # custom output dir (default: ./output)Extracted data is printed as JSON. download, screenshot, and save steps write into
the output dir. On failure the CLI prints botcan: StepError: ... and exits 1.
The demo recipe points at http://127.0.0.1:5500/Projects_/Botcan/demo/demo.html; serve
the repo's parent directory on port 5500 (VS Code Live Server does this by default) or
adjust the open: URL to wherever demo/demo.html is served.
Recipe format
Top level: open (URL — starts the browser when hit), steps (list), close (optional marker).
Each step is a single-key mapping.
open: https://example.com
steps:
- fill: {selector: "#search", value: "weather"}
- press: {selector: "#search", key: "Enter"}
- wait: {selector: "#results", timeout: 5000}
- extract: {selector: "#results h3", all: true}
- copy_link: {selector: "a.permalink", key: "permalink"}
- screenshot: {path: "results.png", full_page: true}
- save: {path: "results.json", format: json}
close:Actions and required args: click(selector), check(selector), uncheck(selector),
clear(selector), fill(selector, value), press(selector, key), select(selector, value),
hover(selector), scroll(selector), wait(selector, timeout?), copy_link(selector, key),
extract(selector, first?|all?), download(selector, path), screenshot(path, full_page?),
save(path, format).
extract and copy_link fill extracted_data: the former under the selector, the latter
under key. A step before open fails with "browser is not open".
Run as an MCP server
uv run python server.pyTwo tools: play_recipe (path to a recipe file) and play_steps (inline YAML). Both return:
{"extracted_data": {"#product-name": "...", "internal_link": "https://..."}, "error": null}Bad YAML, unknown actions, and failed steps return a string in error (not an exception),
and extracted_data keeps everything collected before the failure.
Register with your AI app, pointing --directory at this checkout:
# OpenCode (global for every project)
opencode mcp add botcan --global -- uv --directory <path-to-botcan> run python server.py// OpenCode — ~/.config/opencode/opencode.jsonc
"mcp": {
"servers": {
"botcan": {
"type": "local",
"command": ["uv", "--directory", "<path-to-botcan>", "run", "python", "server.py"]
}
}
}// Claude Desktop — claude_desktop_config.json
{ "mcpServers": { "botcan": { "command": "uv", "args": ["--directory", "<path-to-botcan>", "run", "python", "server.py"] } } }# Claude Code
claude mcp add botcan -- uv --directory <path-to-botcan> run python server.py# Codex — ~/.codex/config.toml
[mcp_servers.botcan]
command = "uv"
args = ["--directory", "<path-to-botcan>", "run", "python", "server.py"]Skill (teaches models the recipe language)
skills/botcan/SKILL.md — copy (or symlink) that directory into ~/.claude/skills/botcan/.
Claude Code reads it natively; OpenCode discovers it through its ~/.claude/skills
compatibility scan. For claude.ai, upload it as a ZIP in Settings → Skills:
zip -r botcan-skill.zip skills/botcanLayout
main.py CLI runner
scraper.py recipe engine: actions, extraction, errors
server.py MCP server: play_recipe / play_steps
demo/ demo page + recipe
skills/ model-facing skill for the recipe languageAvailable Tools
2 toolsplay_recipeB
Execute a YAML recipe file: open pages, run browser steps, return extracted data.
Inputs: recipe_path (required), output_dir. Returns: result
play_stepsC
Execute an inline YAML recipe string (agent-generated). Args mirror recipe file format.
Inputs: recipe_yaml (required), output_dir. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Both tools execute YAML recipes; the only difference is file vs inline string input. Descriptions clarify the distinction, but the core action overlaps, and the names play_recipe vs play_steps could confuse an agent about which to use.
Both tools follow a clear verb_noun pattern with the same verb 'play_', making the naming predictable and consistent throughout.
Only two tools are provided, which feels thin for a recipe execution server. While both earn their place, the set is borderline minimal for the apparent scope.
The surface covers file-based and inline execution, but notable operations like recipe validation, listing available recipes, or error handling without execution are missing. Agents can work around these gaps, but they are significant.
Related MCP Connectors
Run reusable browser automations from your AI assistant: scrape sites, extract data, fill forms.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to launch a fingerprint-randomized browser, navigate, click, type, read the DOM, and take screenshots through a patched Firefox engine.MIT
- AlicenseAqualityBmaintenanceEnables web search and browser automation against a real, locally installed Firefox driven over its built-in Marionette TCP protocol. Exposes tools for multi-engine search, JS-rendered page text and link extraction, screenshots, cookie save/load, and arbitrary JS evaluation, with SSRF guarding, rate limiting, and untrusted-content wrapping.10MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to drive a local Firefox browser: opening and managing tabs, navigating, reading page structure and text, clicking, typing, filling forms, running JavaScript, taking screenshots, and inspecting console messages and network requests. Everything runs over a local Unix socket with no network traffic, and actions are restricted to tabs explicitly placed under Claude's control.GPL 3.0
- AlicenseAqualityBmaintenanceLet AI agents use the Firefox, Zen, or LibreWolf browser you already have open, with your logins, cookies, and extensions intact. No Playwright, Chromium, or WebDriver. Agents work in background tabs while you keep browsing: read pages, click, fill forms, take screenshots, and capture network traffic. A WebExtension plus a local bridge lets several agents share one browser.6282 PyPI44MIT