MCP client integration

Twin Browser + Claude Code

Claude Code is Anthropic’s agentic coding tool that runs in the terminal and supports MCP servers. Registered MCP tools become available to the agent so it can take real actions — including browser automation — as part of a coding task.

MCP client3 MCP tools: run · compile_skill · run_skillBearer key auth

How Twin plugs into Claude Code

Register the Twin MCP server with Claude Code and its agent can call `run`, `compile_skill`, and `run_skill`. That turns “check that the deployed page works” or “grab the data behind this login” into a single tool call. Compiled skills replay deterministically with zero LLM calls, so a verification step you run on every change costs a fraction of an exploratory agent run.

Twin is the browser execution layer your stack calls. The first run cold-compiles a skill; every similar request after that is matched from the cache and replayed deterministically, so your marginal cost per run trends toward zero.

app.example.com
  1. Receive goal from Claude Codedone
  2. Compile DOM → token-efficient indexed statedone
  3. Match the semantic dispatch cacherunning
  4. Replay compiled skill — 0 LLM callsqueued
Wire it up

Drop Twin into Claude Code

Copy, paste, and swap in your Bearer key. The first run compiles a skill; repeats hit the semantic dispatch cache and replay deterministically.

Register with the Claude Code CLIbash
claude mcp add twin-browser \
  --url https://twin-browser.com/api/v1/mcp \
  --header "Authorization: Bearer tw_live_xxx"

# Then, inside Claude Code:
#   "With twin-browser, run the signup flow on the preview URL and
#    compile it into a skill so we can replay it on every deploy."

Base URL https://twin-browser.com/api/v1 · auth Authorization: Bearer tw_live_… · MCP tools run, compile_skill, run_skill.

Get started

Connect Claude Code in 4 steps

Install → configure your key → make the first call. The cache takes over from there.

  1. 1
    Add the server

    Run claude mcp add or edit the MCP config to include the Twin server.

  2. 2
    Provide the key

    Set the Authorization header to your Twin Bearer key.

  3. 3
    Confirm the tools

    Claude Code lists run, compile_skill, and run_skill on startup.

  4. 4
    Use it in a task

    Ask Claude Code to perform or verify a web flow; it calls Twin.

Why this stays cheap at scale

Most browser infrastructure re-runs the LLM on every execution, so cost climbs with usage. Twin compiles a task once via skill compilation, matches re-phrased requests to it, and replays without the model — so repeated workflows stop scaling with your token bill.

FAQ

Claude Code on Twin — common questions

Why use Twin inside Claude Code instead of a headless browser script?
A script breaks on layout drift and a raw agent re-pays the LLM each run. Twin compiles the flow once, matches re-worded goals semantically, and replays deterministically — so a per-deploy check is cheap and resilient.
Can Claude Code compile skills for CI?
Yes. Have the agent call compile_skill once, then run_skill by id from CI over the REST API for a deterministic, LLM-free check.

Wire up Claude Code in minutes

Free to start. Usage-based credits from $29/mo, with LLM cost metered and passed through at 1×.