Connect Claude Code in claude-sandbox#
Let Claude Code in claude-sandbox use scrap.
scrap on Kubernetes or at DLS#
For scrap installed as in Install scrap on Kubernetes or
Install scrap at DLS, scrap is at an HTTPS name, so claude-sandbox.conf needs no
local-port or allow-ip line. Add scrap’s address as in Connect a Claude Code session, with a
headersHelper and an env file under ~/.config/terminal-config, which the jail already sees
(see If /mcp needs a token).
The DLS installer, run on the host, puts the token in that env file (SCRAP_DLS_MCP_TOKEN), and
the helper and a connect script in ~/.config/terminal-config/.claude, the containers’
~/.claude. In any container, run sh /user-terminal-config/.claude/scrap-dls-connect.sh once
to add the server as scrap-dls, as in Claude Code.
Then install the sc commands and the skills as in Connect a Claude Code session.
scrap on the host#
For a scrap running on the host, such as the one from “Try it” in the README on port 8000:
On the host, add this line to
~/.config/claude-sandbox.conf, keeping any lines already in it (details):local-port = 8000
If
~/.config/claude-sandbox.confdid not exist before, runclaude-sandbox --recreatein each project that already has a container.In the container (
claude-sandbox shell), add scrap:claude mcp add --transport http --scope user scrap http://localhost:8000/mcp claude mcp list
Install the
sccommands and the skills as in Connect a Claude Code session.
scrap on another machine on your LAN#
For a trial on your LAN (Try scrap on your LAN), use allow-ip = <that machine's IP address> in ~/.config/claude-sandbox.conf instead of local-port (an IP address, not a
hostname), then:
On that machine, make scrap listen beyond loopback (
--host 0.0.0.0, as in Try scrap on your LAN), addhttp://<IP address>:8000toSCRAP_PUBLIC_URL(/mcpanswers only loopback and the addresses listed there) and restart scrap.Run
claude-sandbox --recreate.Add scrap with
http://<IP address>:8000/mcp.
Tokens and Cloudflare Access#
For a scrap that needs a bearer token or Cloudflare Access service-token headers, send them with a
headersHelper and an env file under ~/.config/terminal-config, which the jail already sees. See
If /mcp needs a token.