
Deploy Scrapling MCP Server + Chromium
Scrapling web scraping MCP server with Chromium and bearer token auth
Scrapling
Just deployed
Deploy and Host Scrapling MCP Server on Railway
Scrapling is an open source (BSD-3-Clause) adaptive web scraping framework for Python. Its built-in MCP server lets AI agents fetch web pages over plain HTTP or a real headless Chromium and receive clean Markdown, text or HTML, trimmed to just the elements a CSS selector matches, which saves tokens.
About Hosting Scrapling MCP Server
This template runs the official ghcr.io/d4vinci/scrapling:0.4.15 image as a remote MCP server on the streamable HTTP transport at /mcp. Chromium is already inside the image, so browser tools work with no extra service. A server that fetches arbitrary URLs must never be open to the internet, so authentication is on from the first boot: a 64 character bearer token is generated at deploy and Scrapling refuses to start its HTTP transport without it. The endpoint also only answers for its own domain. There is no database and no volume: the server is stateless.
Common Use Cases
- Web access for coding agents: give Claude Code, Cursor or your own agent a hosted fetch tool that returns Markdown
- Selector-targeted extraction: pull only the elements you need from a page instead of sending the whole page to the model
- JavaScript-rendered pages: load pages in headless Chromium when a plain HTTP request is not enough
- Shared team endpoint: one hosted MCP server instead of a local install on every laptop
- RAG ingestion: turn documentation pages into Markdown for indexing
Dependencies for Scrapling MCP Server Hosting
- Railway Hobby plan or higher recommended: each browser call starts a headless Chromium; the Free plan's 0.5 GB per service is only enough for the plain HTTP tools
- An MCP client that can send a custom header (Claude Code, Cursor and most agent frameworks)
- No API keys, database or volume required
Deployment Dependencies
Implementation Details
PORT=8000
SCRAPLING_MCP_AUTH_TOKEN=${{secret(64,"abcdef0123456789")}}
SCRAPLING_ALLOWED_HOSTS=${{RAILWAY_PUBLIC_DOMAIN}}
MCP_ENDPOINT_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}/mcp
RAILWAY_SHM_SIZE_BYTES=536870912
The start command runs scrapling mcp --http --host 0.0.0.0 --port $PORT plus one --allowed-host per entry in SCRAPLING_ALLOWED_HOSTS. Railway's healthcheck uses /.well-known/oauth-protected-resource, which answers without a token.
First steps after deploy:
- Copy
SCRAPLING_MCP_AUTH_TOKENandMCP_ENDPOINT_URLfrom the service variables. - Add the server to your client, for example
claude mcp add --transport http scrapling --header "Authorization: Bearer ". - Ask your agent to fetch a page with
make_request, and usefetchfor pages that need JavaScript.
Security: anyone with the token can make this service fetch any URL, including private addresses of other services in the same Railway project. Deploy it in its own project and treat the token like a password. If you add a custom domain, add it to SCRAPLING_ALLOWED_HOSTS as well.
Responsible use: you are responsible for respecting each site's terms of service, robots.txt and rate limits. The tools fetch whatever URL your client asks for.
Why Deploy Scrapling MCP Server on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Scrapling MCP Server on Railway, you get an always-on, token protected scraping endpoint for your AI agents with managed TLS, generated secrets and health checks, and no browser to install on your own machine.
Template Content
Scrapling
ghcr.io/d4vinci/scrapling:0.4.15