⚡ Key takeaways
- Same engine, different wiring. The MCP server runs the same Scrapling library as the official skill — you expose it as a service your agent calls, instead of code the agent writes.
- Pin the image. Use
pyd4vinci/scrapling:0.5.1, notlatest. Version 0.5 renamed almost every MCP tool; a moving tag would have broken your agent overnight. - Logins now survive restarts. Since 0.5 the server can save cookies, local storage and IndexedDB to a JSON file and load them into a new session. Put that file on a Docker volume.
- Upgrading from 0.4?
fetchandstealthy_fetchbecamebrowser_fetch_once,open_sessionbecamebrowser_open,session_fetchbecamebrowser_fetch. Update your skills and reload.
The simple Scrapling guide uses the official skill — one command, no infrastructure, and the right choice for most people. This is the advanced companion: running Scrapling as your own MCP server in Docker. Same anti-bot engine, wired up as a standalone service.
Why bother? Three reasons: you want to pin an exact version, you want logged-in sessions that survive a restart, or you want to reuse the same server for tools outside Hermes. If none of those apply, stick with the skill.
Skill vs. MCP server: same engine, two front doors
Scrapling itself is a Python library — the motor that renders JavaScript, solves Cloudflare Turnstile, and gets past anti-bot systems. There are two ways to hand that motor to Hermes:
- The official skill. The agent reads a
SKILL.mdand writes Python that calls the library directly. Zero infrastructure. - The MCP server (this article). The same library, packaged as a service on a port. Hermes connects over MCP and gets ready-made tools such as
browser_fetch_once,browser_openandbrowser_fetch.
Neither is technically stronger — they run the same code and clear the same challenges. The MCP route trades one-command simplicity for version control, isolation, and sessions that stay logged in.
Run the Scrapling MCP server in Docker
Docker is the cleanest path: Scrapling’s own image (pyd4vinci is the project’s namespace, not a fork) ships with every browser dependency pre-installed. Since 0.4.12 each release gets its own version tag, so you can pin one.
The easiest way is to let Hermes set it up for you. Tell it in chat:
Set up the Scrapling MCP server in Docker with docker compose: image pyd4vinci/scrapling:0.5.1 (pinned, not latest), HTTP transport, an auth token from an environment variable, port 8001 on localhost only, and a named volume mounted at /state for saved logins. Show me the compose file before you start it.
Or write the docker-compose.yml yourself:
services:
scrapling:
image: pyd4vinci/scrapling:0.5.1
command: mcp --http --host 0.0.0.0 --port 8000
environment:
SCRAPLING_MCP_AUTH_TOKEN: ${SCRAPLING_TOKEN}
ports:
- "127.0.0.1:8001:8000"
volumes:
- scrapling-state:/state
restart: unless-stopped
volumes:
scrapling-state:
Then start it:
- Put
SCRAPLING_TOKEN=plus a long random string in a.envfile next to the compose file. - Run
docker compose up -d. - Check
docker compose logs scraplingfor the line that says the server is listening.
Four details that matter:
- You have to pass the
mcpcommand. Without it the container only prints help and exits. - A token is required over HTTP. Since 0.4.15 the HTTP transport refuses to start without one unless you pass
--no-auth. The environment variable is the documented, preferred way to pass it — it keeps the token out of your command history. --host 0.0.0.0is needed inside the container, because the server binds to127.0.0.1by default and Docker couldn’t reach it. The127.0.0.1:in the port mapping keeps it off your network anyway.- 8001 is just an example. Inside the container the server always listens on 8000; the first number in
127.0.0.1:8001:8000is the port on your machine. Pick any free port, and use the same one everywhere: in the compose file, in Hermes’config.yamland in your test URL.
Connect it to Hermes
Again, the quickest route is to ask. Tell Hermes in chat:
Add an MCP server called scrapling: URL http://localhost:8001/mcp, with the header Authorization: Bearer <my token>. Then reload MCP and test the connection.
Prefer to do it by hand? Add an mcp_servers block to Hermes’ config.yaml — ~/.hermes/config.yaml on Linux and macOS, %LOCALAPPDATA%\hermes\config.yaml on Windows:
mcp_servers:
scrapling:
url: http://localhost:8001/mcp
headers:
Authorization: "Bearer YOUR_TOKEN"
- Run
/reload-mcpin a chat. - Run
hermes mcp test scraplingto confirm the connection. - If you allowlist tools per server, narrow the list here to what your agent actually needs.
The tools in 0.5.1
Version 0.5 rebuilt the tool set around one idea: every browser is the stealth browser. There is no separate "dynamic" browser any more, so the agent no longer has to choose. The server now has 17 Scrapling tools: 14 for the browser and 3 for plain HTTP. Your MCP client may list 21, because it also shows four generic MCP tools (list_prompts, get_prompt, list_resources, read_resource). Nothing is missing. These are the ones you’ll use most:
browser_fetch_once— opens a stealth browser, renders one URL, closes it. Your default for a single page.make_request— a plain HTTP request with a browser fingerprint. Much faster when the page needs no JavaScript.browser_open/browser_fetch/close_session— open a persistent session, fetch several pages through it, close it when done.list_sessionsshows what’s open.browser_save_state/browser_load_state— save and restore a login (next section).browser_extract— read the current page again as HTML, Markdown or text without reloading it.browser_actions— click, fill fields, press keys and wait, as one chain of steps.
A typical stealthy one-shot:
browser_fetch_once(
url="https://www.imdb.com/title/tt0111161/",
solve_cloudflare=True,
network_idle=True,
timeout=60000
)
Parameters worth knowing:
solve_cloudflare=True— solves Cloudflare Turnstile and Interstitial challenges. Adds roughly 5–15 seconds.network_idle=True— waits until the page stops loading. Use it for single-page apps.timeout— 30,000 ms by default. Raise it to at least 60,000 ms when solving Cloudflare.main_content_only— on by default: returns the cleaned page body instead of the full HTML, which keeps output small.
Calls within one browser session run one after another, not in parallel. And the bulk tools are gone: for a list of URLs, the agent makes one call per URL, ideally through one open session.
Logged-in sites: save the state once
This is the reason I run my own server. I use Scrapling for Reddit, PubMed and other NIH sites, and for some of those a logged-in session makes all the difference.
My first attempt kept the browser profile on an attached disk. It worked — until the disk wasn’t mounted at startup, which happened often, and the agent was silently logged out again. Version 0.5 solves this properly: browser_load_state restores cookies, local storage and IndexedDB from one Playwright-compatible JSON file into any new session. All my logins now live in one file, /state/main.json, on the Docker volume from the compose file above.
The MCP server runs headless, so there’s no window to log in through. I log in myself, in a separate container with a visible browser, and only hand the result to the server. My login container is a small image I built on top of Scrapling 0.5.1, with x11vnc and noVNC added so I can see and use its Chromium from my own browser. It listens only on 127.0.0.1.
Adding a login, step by step:
- Back up the state file first. Run
docker exec <server-container> cp /state/main.json /state/main.backup-<date>.json. No backup, no merge. - Start the login container with the same
/statevolume attached, and open its noVNC page onhttp://127.0.0.1:6080. - Log in yourself in that visible Chromium, with your username and password. Buttons such as "Continue with Google" may be blocked in this browser, so use a direct login.
- Export the login with Playwright over the browser’s CDP port:
contexts[0].storage_state(path='/state/login-new.json', indexed_db=True). - Merge it into
/state/main.json. Match cookies on name, domain and path, add theoriginsentries, and let the new login win where they overlap. Then remove the login container. - Check it in a fresh session. Ask Hermes to run
browser_open, thenbrowser_load_statewith/state/main.json, thenbrowser_fetchon the site. Your username should appear on the page.
Merging instead of overwriting is the point: one file holds every login, and adding a new site doesn’t wipe the others. In my setup the login still worked after a full restart of the container.
What about browser_save_state? I only use it to refresh a login that has expired on the server side — and then always in the same session, after loading main.json first. Save from a fresh session without loading the file, and you overwrite main.json with an empty state: every login in it is gone. Logging in through browser_actions and saving that directly may also work, but I haven’t tested it on 0.5.1.
Using the saved login in everyday work:
- Open a session with
browser_open. - Run
browser_load_statewith/state/main.json— before the first page load. - Fetch with
browser_fetch. The site sees you as logged in.
Three things to know:
- The path is inside the container. The file is written on the machine that runs the server, so without a volume it disappears with the container.
- Not everything is saved. Open tabs, browser settings and
sessionStorageare left out. A site that keeps its login only insessionStoragewon’t survive a restart. - Treat the file like a password. Anyone with
main.jsonis logged in as you. Keep it on the local volume, and never commit it to a repo.
⚠ Logged-in scraping can cost you the account. For Reddit I keep my agent to one request at a time and don’t let it retry on a failure — a burst of retries from a logged-in session is exactly what gets an account flagged. Respect each site’s terms and rate limits.
Upgrading from 0.4.15
If you followed an earlier version of this setup, 0.5 is a breaking upgrade. The tool renames:
fetchandstealthy_fetch→browser_fetch_onceopen_session→browser_opensession_fetch→browser_fetchscreenshot→browser_screenshot(now captures the current page, no URL)bulk_fetch,bulk_stealthy_fetch,bulk_get→ removed; one call per URL
Two more changes: browser_open no longer takes a session_type, because every browser session is stealthy now, and single-URL tools return one result instead of a list.
The safe order is to run the new server next to the old one first:
- Start the 0.5.1 container on its own port, with the state volume attached.
- Point Hermes’
scraplingMCP entry at the new port and run/reload-mcp. - Ask Hermes to update every skill that mentions the old tool names to the new ones, and show you the changes.
- Update any tool allowlist for the server — old names in an allowlist simply hide the new tools.
- Test once on
https://example.com, then once on a logged-in site with the saved state. - Only then stop the 0.4 container and remove it from the compose file.
Maintenance is on you
The trade-off for control is upkeep. With the skill, every pip install pulls whatever is newest. With your own container, you decide when to bump the image — and because anti-bot is an arms race, you will need to. Version 0.5 alone brought several Cloudflare-solving fixes.
Updating later takes three steps:
- Read the release notes for breaking changes, especially to the MCP tools.
- Change the version tag in your compose file.
- Run
docker compose pulland thendocker compose up -d. The state volume, and with it your logins, stays.
Frequently asked questions
Do I still need the Scrapling skill if I run the MCP server?
No. You can run both, but in practice you pick one, so the agent isn’t juggling two ways to do the same thing. Note that the official skill still refers to DynamicFetcher, which 0.5 removed — one more reason to pick a single route.
Why not just use the latest tag?
Because 0.5 renamed nearly every tool. With latest, a routine restart would have pulled the new version and every skill calling session_fetch would have broken without warning.
Can I reuse a browser I already have open?
Yes: browser_open accepts a cdp_url to connect to a running Chromium browser. Version 0.5.1 added this as a separate remote-session type, so a logged-in browser can be shared with the agent. For a Docker setup, the saved-state file is simpler.
Is scraping with a stealth browser legal?
It depends on what you scrape, how you use it, and the site’s terms of service. Check robots.txt, respect rate limits, and read the ToS. This guide is for personal, non-commercial agent automation.
Wrapping up
Run the skill for everyday scraping; run your own server when you need control. Pin 0.5.1, put your logins in one state file on a volume, and read the release notes before every bump — the jump from 0.4 to 0.5 showed how much can change under a single version number.
This article is part of the Agentic AI series. If you haven’t set up basic scraping yet, start with Scrapling for Hermes: get past Cloudflare walls.
The Tested Weekly
One email a week with the guides we tested, sources linked. No spam.