Skip to main content

What is MCP?

The Model Context Protocol (MCP) allows AI assistants like Claude, ChatGPT and Cline to access external tools and services. By adding the WebRun MCP server, you give these assistants the ability to browse the web autonomously.

Choose your path

There is one server URL for every client:
  • Claude and ChatGPT connect with that URL and no API key at all — you authorize WebRun once, in the browser. Start at Connect with OAuth.
  • Everything with a config file (Claude Code, Cursor, Claude Desktop, VS Code, Cline) uses the same URL plus an API-Key header. A second header, Environment-Id, is optional — it decides whether tasks run on a persistent machine or a throwaway one. Start at Connect with an API key.
Your API key travels in a header, never in the URL. That keeps it out of browser history, shell history and proxy logs, and it means you can rotate the key without touching a URL you may have already copied somewhere else.

Connect with OAuth (Claude and ChatGPT)

No API key needed.
1

Open connector settings

In Claude or ChatGPT, go to Settings → Connectors → Add custom connector.
2

Paste the server URL

3

Authorize from WebRun

Approve the connection when prompted. WebRun issues the credentials for you.
If you have more than one environment, the one you pick during authorization becomes the connection’s default — the assistant will use it without being told.

Connect with an API key

Every example below is complete: the same URL, your API key, and the environment you want the assistant to work in. Copy the whole block.

Claude Code

--header is repeatable — that is how both values are passed in one command. Or, to share the connection with a project, add this to .mcp.json at the repo root:
Delete the Environment-Id line to get a fresh disposable machine for every task.
"type": "http" is required. Claude Code reads a url entry with no type as a local command, and the server will not start.
${WEBRUN_API_KEY} is expanded from your environment when the file loads, so the file is safe to commit. The environment ID is not a secret and can stay inline.

Cursor

Add this to ~/.cursor/mcp.json, or .cursor/mcp.json inside a project:
Delete the Environment-Id line to get a fresh disposable machine for every task. Cursor does not use a type field for remote servers, and its variable syntax is ${env:NAME}.

Claude Desktop

Claude Desktop’s configuration file only supports local (stdio) servers, so connect through Settings → Connectors using the OAuth flow above — no key, no file editing, and you choose the environment during authorization. If you must use the config file, bridge it with mcp-remote:
Delete the second --header pair to get a fresh disposable machine for every task.
The headers are written without a space after the colon on purpose — mcp-remote splits --header arguments on spaces.
After editing, quit Claude Desktop completely and reopen it.

VS Code

Add this to .vscode/mcp.json — note the top-level key is servers, not mcpServers:
Delete the Environment-Id line to get a fresh disposable machine for every task. VS Code prompts for the key on first use and stores it securely rather than in the file.

Cline

Open the Cline panel, use the menu in its top-right corner, choose MCP Servers, and edit cline_mcp_settings.json:
Delete the Environment-Id line to get a fresh disposable machine for every task.
"type": "streamableHttp" is camelCase with no hyphen. Writing streamable-http, or leaving type out, makes Cline fall back to SSE and the connection fails with a 405.
Cline does not expand environment variables in this file, so the key goes in literally — keep the file out of version control.

Environments

An environment is a persistent remote machine with its own browser, file system, and desktop, so logins, cookies, and downloaded files survive between tasks. The Environment-Id header is optional. Both ways of running are fully supported: Leaving the header out is a normal configuration, not a broken one. Omit it when every task should start from a clean slate, and add an environment when you need the browser to remember something — a logged-in account, a downloaded file, an installed extension. Where to find the ID: ask the assistant to list your environments, or copy it from the Environment page in the dashboard. It is a 24-character hex string, and it is not a secret — it is safe to commit. Three ways to choose one: The per-task argument means you can keep one connection and still send one task to your logged-in shopping profile and the next to a clean machine.

Your First Browser Task

Once configured, you can ask Claude to browse the web: Example Prompts:
  • “Search Google for Anthropic and summarize the first result”
  • “Go to example.com and extract all the product prices”
  • “Navigate to LinkedIn, search for software engineers in SF, and list the top 5 results”
What happens:
  1. Claude recognizes your request requires web browsing
  2. It calls the WebRun MCP tool with your task
  3. An AI agent executes the task in a real browser
  4. Results are returned to Claude
  5. Claude presents the information to you
For multi-step work, ask for a session instead of a one-off task — “Create a browser session, go to Amazon, search for wireless keyboards, and tell me the top 3 results.” The assistant calls create_session once and then send_task for each follow-up, so the browser keeps its place between steps.

Available Tools

The WebRun MCP server exposes 21 tools. Browser tasks Controlling a running task Environments Workflows — saved, reusable automations Scheduled agents — automations that run on a timer Full MCP Reference →

Troubleshooting

Tools not appearing (Claude Code)

Run claude mcp get webrun. The most common cause is a missing "type": "http" — without it the entry is treated as a local command.

Tools not appearing (Cursor / VS Code)

Confirm the top-level key: Cursor uses mcpServers, VS Code uses servers.

It connects but every task fails

The server lists its tools without a key, so a connection with a missing or wrong key looks healthy until the first task. Check the API-Key header value.

Authentication errors

Keys start with wr_ or enig_. Confirm the key is active in the dashboard and that the account has balance.

”Environment not found”

The ID must be a 24-character hex string belonging to your account. Ask the assistant to list your environments.

Session timeouts

Sessions expire after 5 minutes idle. A single task runs up to 20 minutes by default — pass maxDuration for longer, or split the work.
Claude Code, Cursor and VS Code pick up config changes without a restart. Only Claude Desktop needs a full quit and reopen.

Next Steps

Full MCP Reference

All tools, parameters, and advanced patterns

Multi-Task Workflows

Chain multiple browser tasks

Handling Guardrails

Respond to human-in-the-loop requests

Video Streaming

Watch browser sessions live