Skip to content

mcp: add fetchable agent-setup page (AGENT_SETUP.md)#104

Merged
suchintan merged 6 commits into
Skyvern-AI:mainfrom
sujithps:mcp-agent-setup
Jul 21, 2026
Merged

mcp: add fetchable agent-setup page (AGENT_SETUP.md)#104
suchintan merged 6 commits into
Skyvern-AI:mainfrom
sujithps:mcp-agent-setup

Conversation

@sujithps

@sujithps sujithps commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Adds a one-page, agent-facing setup document in the style of Cloudflare's agent-setup prompt: a user tells their coding agent

Fetch https://raw.githubusercontent.com/Skyvern-AI/rustwright/main/mcp/AGENT_SETUP.md and follow the instructions

and the agent installs, registers, and verifies the Rustwright MCP server itself.

Contents

  • Written in second person to the agent, imperative ("complete the steps yourself by running the commands directly")
  • Prerequisite checks: uv (with install one-liners), browser (installed Chrome via RUSTWRIGHT_MCP_CHANNEL=chrome, or the bundled Chromium)
  • Per-client registration: Claude Code (with the -- variadic-flag gotcha called out), Codex CLI (config.toml), Cursor, Claude Desktop, VS Code agent mode, and a generic stdio fallback
  • A verification step with the expected snapshot output for example.com and a completion report template
  • Env-var reference and troubleshooting for the known failure modes (missing separator, CDP launch timeout, headless bot-blocking, stale refs)
  • Linked from mcp/README.md and the root README's agent section

Verified

  • The raw URL serves the markdown as fetched by an agent
  • The uvx server one-liner (boots and answers MCP initialize), claude mcp add registration, the python -m rustwright CLI exposure through uvx, and the example.com verification snapshot content

sujithps added 2 commits July 18, 2026 23:53
One-page, agent-facing install instructions in the style of
developers.cloudflare.com/agent-setup/prompt.md: a user tells their agent to
fetch the raw URL and follow it. Covers prerequisites, per-client
registration (Claude Code, Codex, Cursor, Claude Desktop, VS Code, generic
stdio), a verification step with expected output, env configuration, and
troubleshooting for the known failure modes. Linked from mcp/README.md and
the root README agent section.
… hardening

- Claude Desktop: require absolute uvx path (GUI apps miss the shell PATH,
  bare 'uvx' fails with spawn ENOENT)
- Troubleshooting: map errors to their real causes; 'Could not find a
  Chromium executable' vs 'did not expose a CDP endpoint' (missing system
  libs in containers; document install-deps), and add the Linux arm64
  bundled-download limit with the RUSTWRIGHT_MCP_EXECUTABLE escape hatch
- Windows: -ExecutionPolicy ByPass on the uv installer, note that multi-line
  commands are POSIX-shell, add winget/brew alternatives
- uv PATH: tell agents to source ~/.local/bin/env when uvx is not found
  right after install
- Codex: startup_timeout_sec=120 (cold uvx git build exceeds the 10s default)
- ALLOW_EVAL: correct accepted values (1/true/yes) and add leave-unset
  guidance for autonomous readers
- Preamble: verify the fetched URL points at Skyvern-AI/rustwright before
  running anything
- Raw URLs use /HEAD/ instead of /main/ (survives default-branch rename)
- Local-browser prerequisite and config table no longer claim completeness
  (stays correct when remote CDP attach lands)
- Completion report is descriptive, not a hardcoded 'headless' template
@sujithps

Copy link
Copy Markdown
Contributor Author

Pushed a self-review pass (a3f6126) after a thorough audit of the page. Fixes, most important first:

  • Claude Desktop section could never work as written: GUI-launched apps on macOS do not inherit the shell PATH, so bare "command": "uvx" fails with spawn ENOENT. The section now requires the absolute path (which uvx)
  • Troubleshooting mapped the wrong error to the wrong cause: Could not find a Chromium executable (no browser) and did not expose a CDP endpoint (browser found but failed to start, usually missing system libs in containers) are now separate entries, the latter pointing at python -m rustwright install-deps
  • Linux arm64 dead end: the bundled Chrome-for-Testing download is x86_64-only; added the distro-Chromium + RUSTWRIGHT_MCP_EXECUTABLE escape hatch
  • Windows: -ExecutionPolicy ByPass on the uv installer (matches uv's official docs), a note that multi-line commands are POSIX-shell, and winget/brew alternatives to curl|sh
  • Codex: startup_timeout_sec = 120; the first cold uvx git build exceeds Codex's 10s default and looks like an intermittent failure
  • uv PATH: agents now get the source ~/.local/bin/env hint instead of concluding the install failed in the same shell
  • ALLOW_EVAL row: accepted values corrected to 1/true/yes (matches server.py) plus leave-unset-unless-asked guidance, since the audience is an autonomous agent scanning for options
  • Spoofing guard: the preamble now tells the agent to verify the fetched URL points at Skyvern-AI/rustwright before running anything (same mitigation the Cloudflare agent-setup page uses)
  • Raw URLs use /HEAD/ rather than /main/ so a default-branch rename cannot 404 copies of the prompt that live outside the repo
  • The local-browser prerequisite and env-var table no longer claim to be complete, so the page stays correct when mcp: attach to a remote browser over CDP #93 (remote CDP attach) lands

sujithps and others added 4 commits July 20, 2026 19:53
…ndows paths

- Ship RUSTWRIGHT_MCP_ALLOW_EVAL=0 in every registration config and correct
  the configuration table: page-world evaluation is on by default when unset
  (the previous wording implied the opposite); verify browser_evaluate is
  absent in Step 3 and report eval status to the user
- Codex CLI: register via 'codex mcp add' (verified flags), note config.toml
  is global scope, keep startup_timeout_sec block
- Troubleshooting: split Chromium launch failures into process-exited
  (missing libraries -> install-deps) and launch-timeout (slow machine)
  cases to match the actual error strings; align stale-ref wording with the
  server message
- Step 3: restart handoff with a paste-ready verification prompt for clients
  that load MCP servers only on restart
- Claude Desktop: Windows equivalents for locating uvx and JSON backslash
  escaping; note that install sources are unpinned with a pin syntax for
  reproducible installs
- README: move the agent-setup pointer from the CLI section into the MCP
  server section (merge artifact)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nd system-change guardrails

Adopted from a second review round (security + factual lenses):
- Quote only the invariant part of the process-exited launch error so agents
  can match it verbatim (the emitted string embeds a real exit status)
- ALLOW_EVAL row: name the browser_evaluate tool rather than page-world
  evaluation broadly (the server still runs its own internal page scripts),
  note values are case-insensitive
- Ask the user before the uv installer script or install-deps (apt-get/sudo)
- Merge the rustwright entry into existing client configs instead of
  replacing files; Cursor gets the same project-scope-first guidance as the
  other clients
- Pin note no longer claims full reproducibility (deps still resolve at
  install time); README claim softened to installs + walks through
  verification

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@suchintan

Copy link
Copy Markdown
Member

Reviewed this in depth (two independent review rounds — a correctness/security pass and a factual-accuracy pass verifying every claim against the code) and pushed fixes on top rather than round-tripping comments. Great page overall — almost every command, error string, and platform claim checked out exactly against the source, and it is clear it was actually exercised. What the two follow-up commits change:

Round 1 (3a14768) — merged current main into the branch, then:

  • RUSTWRIGHT_MCP_ALLOW_EVAL inverted the real default. The server exposes browser_evaluate when the variable is unset (_allow_eval() in mcp/rustwright_mcp/server.py, pinned by test_browser_evaluate_is_default_on_and_explicitly_disableable), so "leave unset" left arbitrary page-JS enabled while the agent reported it absent. Every config block now ships RUSTWRIGHT_MCP_ALLOW_EVAL=0, the table row states the true default, and Step 3 verifies the tool is absent.
  • Codex CLI: codex mcp add one-liner as the primary path (flags verified against Codex 0.144.4), global-scope note, kept the startup_timeout_sec block.
  • Troubleshooting: missing system libraries crash the browser and produce Chromium process exited before CDP endpoint became available, not the launch-timeout message — split the bullets so the install-deps advice is attached to the string agents will actually see; aligned the stale-ref bullet with the server's real message.
  • Step 3: restart handoff for clients that only load MCP servers on restart, with a paste-ready verification prompt.
  • Windows: where.exe / Get-Command for locating uvx, JSON backslash escaping.
  • README: moved the agent-setup pointer into the MCP section (it had drifted into the CLI section in the branch-update merge).

Round 2 (664b4e8) — fresh-eyes review of the updated page:

  • Quote only the invariant prefix of the process-exited error (the emitted string ends with a real exit status, so the (status: ...) form could never match verbatim).
  • "Agent-supplied page evaluation (browser_evaluate)" instead of "page-world evaluation" broadly — the server still runs its own internal page scripts for snapshots/health checks.
  • Guardrails for a page agents execute directly: ask the user before the uv installer script or install-deps (apt-get, possibly sudo); merge the rustwright entry into existing client configs instead of replacing files; Cursor gets the same project-scope-first guidance as the other clients; the pin note no longer claims full reproducibility (Python deps still resolve at install time).

One open product question deliberately not changed here: the configs inherit the server's default mirror toolset (24 tools with eval off). If agent-driven installs should default to the leaner profile instead, that is a one-line addition (RUSTWRIGHT_MCP_TOOLSET=lean) but a product call, not a docs fix.

@suchintan suchintan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two full review rounds (details in the thread comment); fixes pushed and re-verified. Approving.

@suchintan
suchintan merged commit 41f1f92 into Skyvern-AI:main Jul 21, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown

Synced to rustwright-cloud: https://github.com/Skyvern-AI/rustwright-cloud/pull/113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants