Web Data for Sandboxed Coding Agents: Docker Sandboxes Kit vs MCP Gateway (2026)
Docker Sandboxes block most of the web by default. Firecrawl's kit is one way in. The sbx MCP gateway and custom secrets keep any vendor's key outside it.
Docker Sandboxes, driven by the sbx CLI, run an agent in a disposable microVM. Outbound traffic goes through a proxy on your machine that applies a network policy. The policy most people start with, balanced, allows package registries, GitHub and a curated list of vendor APIs, and answers a 403 for general websites, including most documentation sites. That is the point: an agent with shell access and your repository should not be able to fetch, or post to, anything it likes.
It also means the agent can't read the changelog of the library it is upgrading. Something has to fetch pages for it, through a door the policy allows, without handing the agent a credential it could leak. On November 16, 2026 Docker's blog presented Firecrawl's kit as that door, and Firecrawl wrote up the same kit two days later. This post compares the kit with the two built-in sbx features that do the same job for any vendor, based on Docker's and Firecrawl's documentation.
Three ways to let a sandboxed agent reach web data
| Firecrawl kit | MCP gateway (sbx mcp add) | Custom secret (sbx secret set-custom) | |
|---|---|---|---|
| What the agent uses | Firecrawl's Python SDK (firecrawl-py) | MCP tools from a remote server | Any HTTP client, such as curl in a skill |
| Who connects to the vendor | The sandbox, through the proxy | The host | The sandbox, through the proxy |
| Where the key lives | Host secret store (sbx secret set firecrawl) | Host secret store (mcp:<server>:<name>), or OAuth tokens in the OS credential store | Host secret store; the sandbox sees a placeholder |
| Network rule | Kit allows api.firecrawl.dev (PyPI only at install) | None in the sandbox: the host makes the call | You add sbx policy allow network <host> |
| Vendors | Firecrawl | Any remote MCP server with header or OAuth auth | Any REST API whose key goes in a header |
| Maturity | Kits v3, early access | Documented, supported agents only | Experimental |
Route 1: the Firecrawl kit
A kit bundles four things: network rules, a credential declaration, tools, and instructions for the agent. Firecrawl's is a v3 mixin, which you stack on a v3 workload. Docker's shell workload with the Claude Code mixin is the documented pairing:
sbx secret set firecrawl # prompts for the fc-... key, once
sbx run docker.io/docker/sbx-kit-shell:1.0.0 --name firecrawl-claude \
--kit docker.io/docker/sbx-kit-claude-mixin:2.1.285 \
--kit docker.io/firecrawl/sbx-kit-firecrawl:1.0.0 .
It needs sbx 0.46 or later. Inside, the agent calls firecrawl-py, and the proxy swaps in the real key for requests to api.firecrawl.dev. The built-in shortcuts such as sbx run claude still use v2 kits, so Firecrawl also ships a v2 form for those.
Firecrawl's own write-up is candid about the limits, and they are worth repeating:
- One host, not the web. A URL the agent finds in a scrape result is still blocked for
curl, so it has to be fetched through Firecrawl too. - Media links fail. Screenshot and media formats return links on Firecrawl's storage host, which the kit does not allow.
- Org governance wins. Under organization governance, kit allow rules are inactive, and an admin has to allow
api.firecrawl.dev. - Unattended runs need setup. A detached or CI run cannot answer the credential prompt. Approve the binding in one interactive run, or write it to
~/.config/sbx/credentials.yaml. - A 402 means no credits. The kit tells the agent to stop rather than retry.
Choose it when the agent writes Python against Firecrawl anyway, or when you want the vendor's instructions to come preinstalled.
Route 2: the MCP gateway, for any remote server
sbx mcp add registers an MCP server on the host. When a sandbox starts with --static-mcp <name>, or later through sbx mcp load, the agent inside sees the server's tools, but the host makes the connection. For a key in a header, the registration holds a placeholder and the secret store holds the value:
sbx mcp add crawlora-web --url https://mcp.crawlora.net/mcp/family/web \
--header 'Authorization: Bearer ${api-key}'
sbx secret set mcp:crawlora-web:api-key
sbx run claude --name research --static-mcp crawlora-web
The single quotes matter. ${api-key} names a stored secret, mcp:crawlora-web:api-key, not a shell variable. Docker's docs say credential headers such as Authorization must use a placeholder. Header secrets are global on the host, and sbx mcp inspect shows the template and whether the secret is set, never the value.
For OAuth servers, sbx mcp add starts the sign-in itself, and the tokens are stored in the host operating system's credential store. --client-id covers servers without dynamic client registration. The gateway works with agent integrations that configure MCP at startup: Claude Code, Codex, Devin, Kiro and OpenCode.
How each vendor fits:
| Vendor | Gateway registration | Notes |
|---|---|---|
| Firecrawl | --url https://mcp.firecrawl.dev/v2/mcp-oauth (OAuth) | No kit needed if the agent should use MCP tools instead of the SDK |
| Bright Data | --url 'https://mcp.brightdata.com/mcp?token=…' | The token is part of the URL, so it sits in the registration, not the secret store. Bright Data documents only this URL form |
| Zyte | --url https://mcp.zyte.com/v1/mcp (OAuth) | Sign-in through Zyte; add --client-id if its OAuth needs a registered client |
| Crawlora | --url https://mcp.crawlora.net/mcp/family/<platform> with a Bearer placeholder, or OAuth | Use a family endpoint or /mcp/agent, not the full catalog of 5,462 tools |
One warning from Docker's docs applies to any vendor. A local stdio server added with --command (for example npx running a vendor's package) runs on the host, outside the sandbox's isolation. Custom headers can't be used with --command either. For web data, prefer the vendor's hosted endpoint.
Choose it when the agent should see MCP tools and you want one setup that covers several vendors.
Route 3: custom secrets, for REST and skills
Many vendors ship skills that call a REST API with curl, not MCP tools. Crawlora's open-source skills, for example, read CRAWLORA_API_KEY and send it as an x-api-key header to https://api.crawlora.net/api/v1. sbx secret set-custom fits that pattern:
sbx policy allow network api.crawlora.net
printf '%s' "$CRAWLORA_API_KEY" | sbx secret set-custom \
--host api.crawlora.net --env CRAWLORA_API_KEY --value-stdin
Inside the sandbox, CRAWLORA_API_KEY holds a generated placeholder (sbx-cs-…). When a request to api.crawlora.net carries the placeholder in a header, the proxy replaces it with the real key. The agent never sees the value. Two caveats from the docs: the feature is experimental, and the swap happens only in request headers, not bodies. A scheme that encodes the key before sending it, such as HTTP Basic auth, carries an encoded placeholder that the proxy has no reason to recognize. Zyte API's REST interface uses Basic auth, so for Zyte use the gateway with its OAuth sign-in instead.
sbx policy allow network also takes --method and --path, so you can allow only the endpoints a skill needs. Choose it for skills and scripts that make plain HTTPS calls, when you want a narrow allow rule rather than a whole MCP server.
What to check before trusting a setup
- From inside the sandbox, curl the vendor's API with no key. If it answers with data, the policy is wider than you think.
- Print the environment variable inside the sandbox. You should see a placeholder (custom secrets) or nothing (kit and gateway), never the real key.
- Under organization governance, confirm an admin has allowed the vendor's host. Kit allow rules are inactive there.
- For detached or CI runs, pre-approve credential bindings, or the run will stop at the prompt.
- Rotate a gateway header secret by running sbx secret set again with the same name. Removing a registration keeps its secrets until you run sbx secret rm.
How to choose, by job
- Agent writes Python with Firecrawl: the kit.
- Agent should call MCP tools from one or more vendors: the gateway, using hosted endpoints with a header placeholder or OAuth.
- Agent runs vendor skills that call REST with a header key:
set-customplus a narrowpolicy allowrule. - Bright Data: the gateway with the token in the registered URL, or its CLI-based skills with a token you can revoke. Neither is as clean as a header secret.
- Zyte: the gateway over OAuth.
- Named-platform records (prices, rankings, listings) in a locked-down sandbox: Crawlora through the gateway's family endpoint, or its skills through
set-custom.
Kits v3 and custom secrets are early-access or experimental, so flags may change between sbx releases. Keep sandboxed agents to public data you have the right to collect, as covered in Is web scraping legal in 2026?.
Structured web data for locked-down agents
A hosted MCP server and open-source REST skills, both with header keys the sandbox never sees. 2,000 free credits a month, no card.
Sources
Related reading
- Skills over MCP: Which Web Scraping MCP Servers Ship Agent Skills in 2026: installed and served skills, and how hosts control them.
- Best Web Scraping MCP Servers for Claude Code in 2026 · Best MCP Servers for OpenAI Codex in 2026: the same vendors, outside a sandbox.
- Best MCP Servers for OpenCode in 2026: another agent the gateway supports.
- Crawlora vs Firecrawl · Crawlora vs Bright Data · Crawlora vs Zyte.
Frequently asked questions
Why can't my agent fetch web pages inside a Docker Sandbox?
The sandbox's traffic goes through a proxy that applies a network policy. The balanced policy allows package registries, GitHub and a curated list of vendor domains, and returns a 403 for general websites. An agent needs an allowed route, such as a web-data API, to read other pages.
What does the Firecrawl kit for Docker Sandboxes do?
It is a v3 kit mixin that installs Firecrawl's Python SDK, declares a required firecrawl credential stored with sbx secret set firecrawl, allows api.firecrawl.dev at runtime and PyPI only at install, and adds instructions for the agent. The proxy injects the key, so it never enters the sandbox. It needs sbx 0.46 or later.
Can I use other web-data vendors in a Docker Sandbox without a kit?
Yes. sbx mcp add registers any remote MCP server on the host with a header secret placeholder such as Authorization: Bearer ${api-key}, or with OAuth, and the agent sees the tools. For REST calls, sbx secret set-custom plus sbx policy allow network gives the sandbox a placeholder that the proxy replaces with the real key.
Do local MCP servers run inside the sandbox?
No. Docker's docs warn that a local stdio server added with sbx mcp add --command runs on the host, outside sandbox isolation, and custom headers can't be used with --command. Prefer a vendor's hosted endpoint.
Which agents can use the sbx MCP gateway?
Agent integrations that configure MCP at startup: Claude Code, Codex, Devin, Kiro and OpenCode, per Docker's MCP gateway docs as of November 30, 2026.
