Connecting an AI assistant over MCP
The hosted MCP server lets your AI assistant control a Guard.ch cloud browser. Set up your app key and client here, then learn which tools and sessions are available.
MCP (Model Context Protocol) gives your assistant additional tools. With Guard.ch, it can open and read pages in an isolated cloud browser, click, fill forms, upload files, run JavaScript and take screenshots. You choose the exit location.
You don't need a local browser service or driver. Guard.ch provides the browser, manages the session and gives you a live view you can take over at any time. The model stays with your client; there is no model key to configure here.
Connect in three steps
Create an app key
Create an app key for your assistant in the Guard.ch dashboard.
Add the server to your client
Choose your client, add the configuration and replace YOUR_API_KEY with your app key. Set up each device the same way if you use more than one.
Restart the client so it recognises the new server. The browser runs on Guard.ch; check your client guide for any additional setup.
Try the connection
Give your assistant a task that needs a browser. It opens the session itself:
Open example.com in a Guard.ch browser and tell me what the page says.If your assistant describes the page, the connection works. If it reports no tools, restart the client so it reloads the MCP configuration.
What you need
- Endpoint
- https://api.guard.ch/mcp
- Transport
- Streamable HTTP, stateless per request
- Authentication
- A Guard.ch app key in a request header
- Plan
- A plan with programmatic access; the 30-day trial includes it
- Browsers
- Any Chromium-family image your plan allows, Chrome by default
- Concurrency
- Up to three concurrent sessions per person, shared with their agents
Manage your app key
- One key per client. A separate key for each assistant, machine or pipeline lets you revoke access for one client without interrupting the others.
- Choose an expiry. At creation, choose no expiry, 30 days, 90 days or one year. An expiry date is useful for unattended processes.
- Copy it once. The key is shown a single time, at creation. A lost key is replaced, not recovered: revoke it and create another.
- Revocation is immediate. A revoked key stops working at once, including in the middle of a conversation.
Endpoint and authentication
The server speaks Model Context Protocol over Streamable HTTP. Each request stands on its own, so your client can restart without the server having to keep conversation state.
https://api.beta.browser.lol/mcpSend the key in one of these two headers. It never belongs in the URL, where it would leak into browser history, proxy logs and analytics:
Authorization: Bearer YOUR_API_KEYas a Bearer token, which is what every snippet below uses.x-api-key: YOUR_API_KEYfor clients that cannot set Authorization.
Client configuration examples
Show configuration examples for all clients
Claude Code
Run it in your terminal.
claude mcp add --scope user --transport http guardch https://api.beta.browser.lol/mcp \
--header "Authorization: Bearer YOUR_API_KEY"Setup guide for Claude CodeClaude Desktop
Goes into claude_desktop_config.json.
{
"mcpServers": {
"guardch": {
"command": "npx",
"args": [
"-y", "mcp-remote", "https://api.beta.browser.lol/mcp",
"--header", "Authorization:Bearer YOUR_API_KEY"
]
}
}
}Setup guide for Claude DesktopCursor
Goes into ~/.cursor/mcp.json.
{
"mcpServers": {
"guardch": {
"url": "https://api.beta.browser.lol/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}Setup guide for CursorVS Code
Run it in your terminal.
code --add-mcp '{"name":"guardch","type":"http","url":"https://api.beta.browser.lol/mcp","headers":{"Authorization":"Bearer YOUR_API_KEY"}}'Setup guide for VS CodeCodex CLI
Run it in your terminal, with the key in the GUARDCH_API_KEY environment variable.
export GUARDCH_API_KEY="YOUR_API_KEY"
codex mcp add guardch --url https://api.beta.browser.lol/mcp \
--bearer-token-env-var GUARDCH_API_KEYSetup guide for Codex CLIGemini CLI
Run it in your terminal.
gemini mcp add --scope user --transport http guardch https://api.beta.browser.lol/mcp \
--header "Authorization: Bearer YOUR_API_KEY"Setup guide for Gemini CLIWindsurf
Goes into ~/.codeium/windsurf/mcp_config.json.
{
"mcpServers": {
"guardch": {
"serverUrl": "https://api.beta.browser.lol/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}Setup guide for WindsurfChoosing a browser and an exit location
image selects an available Chromium browser when you create a session. Chrome is the default. Firefox and Tor cannot be driven programmatically; a request for either returns the supported browser IDs.
Use country to choose an exit country or city (us, de, us-dal). residential uses a residential address where available; proxy uses your own proxy. browser_set_location can change the location during a session.
Watching a session, and taking it over
Every session comes with a live view URL, and the sessions your agents are running are listed on the Agents tab of your dashboard. Open one in the same viewer you use for your own sessions: the page streams live, and you can end the session from there.
If the assistant needs help with a sign-in, captcha or decision, you can take over the mouse and keyboard. It can then continue in the same browser.
Live analysis beside the page
On a Chromium browser, Guard.ch's analysis lane can run beside the page: requests, redirect chains, response headers, console output, security issues, downloads, forms, cookies and storage, the technologies and trackers it recognises, WHOIS, IP and certificate look-ups on demand, and a verdict per host that shows its sources.
browser_session_analysis turns analysis on or off for a session started by a person in the app. When it is on, you can follow the findings live and the dashboard lists the session as an investigation. Sessions started by the assistant do not support this control; attempts to switch analysis on or off return analysis_unavailable.
How the sessions behave
- Sessions can start automatically. The first page tool opens a session when none is running for that key. If several sessions are running, Guard.ch refuses a call without a session_id instead of guessing which browser you mean.
- Sessions end automatically. You do not set a lifetime. A session ends a few minutes after the last tool call or CDP disconnect, and 18 hours after it started at the latest. Closing it yourself frees the slot immediately.
- Retries are safe. An idempotency key returns the successful creation response on a retry instead of opening a second browser. This helps with queues and retried jobs.
- People and agents share one account. Your assistant can list, drive and close the sessions you started in the app, and you can do the same with its own. Closing one of yours closes the window you are watching, which is a good reason to name sessions.
- Access stays within your account. Every tool works on your own sessions only. No other member's sessions are visible or reachable through the server.
Limits and refusals
- Programmatic access is a plan feature. Without it every call answers with an upgrade notice instead of a tool result. Both paid plans include it, and so does the 30-day trial.
- Up to three concurrent sessions per person. Agent sessions share this limit with your own sessions. Once all three slots are in use, new sessions are rejected rather than queued.
- No per-tool charge. Your plan must include programmatic access. Individual tool calls carry no additional fee. Residential egress counts against your workspace data allowance.
- Creation is rate-limited. Per-minute, hourly and daily limits protect the platform from excessive session creation. Check the response status and delay further attempts if you reach a limit.
- Nothing is stored. A closed session is gone with everything it saw. The session list keeps 30 days of entries (what ran, when and for how long), never the pages themselves.
The tools your assistant gets
The server provides 33 browser_ tools with structured results. An assistant can start with browser_navigate: Guard.ch opens a session if needed and returns an accessibility snapshot with references for later actions. For many tasks, this is more precise and efficient than a screenshot.
Show all 33 tools
Sessions and lifecycle
These tools let the assistant choose a browser and exit location, check session status and end sessions.
| Tool | Description |
|---|---|
browser_session_create | Start a session and get its handle: browser image, name, exit country, residential or custom-proxy egress, screen size, an initial URL and a retry key. |
browser_session_get | Read one session's state: status, image, current URL, whether analysis is attached, and its live view URL. |
browser_session_list | List every session on the account, newest first, with the concurrency quota and 30 days of usage. Each row says whether an agent or a person started it. |
browser_session_close | Stop a session and free its slot at once, instead of waiting for it to end on its own. |
browser_session_rename | Give a session a display name, so a person reading the session list can tell what it is for. |
browser_session_analysis | Switch the live analysis lane on or off for a session a person started in the app. |
browser_set_location | Change the exit location of a running session without restarting it. |
Navigation
Open websites, move between pages and manage tabs.
| Tool | Description |
|---|---|
browser_navigate | Open a URL and get the page back as an accessibility snapshot. This is the entry point: it opens a session when there is none. |
browser_go_back | Go back one entry in the tab's history. |
browser_go_forward | Go forward one entry. |
browser_reload | Reload the page, optionally bypassing the cache. |
browser_tabs | List, open, switch and close tabs; every page tool takes a tab id. |
Reading the page
Read page content as a compact structure, screenshot or network activity.
| Tool | Description |
|---|---|
browser_snapshot | The accessibility snapshot of the page, with the ref ids the interaction tools act on. |
browser_find | Search the page for text or a regular expression and get the matching refs back. |
browser_screenshot | Capture the viewport, the full page or one element. |
browser_console_messages | Read the console output and page exceptions. |
browser_network_requests | List the requests the page made, filterable by method, status and host. |
browser_network_request | Open one request in full: headers, timing and body. |
Interaction
Use the mouse and keyboard, and handle dialogs or interruptions.
| Tool | Description |
|---|---|
browser_click | Click an element by ref, with modifiers and double-click. |
browser_type | Type into a field and optionally submit. |
browser_fill_form | Fill several fields in one call. |
browser_select_option | Choose options in a select element. |
browser_hover | Hover an element, for menus that only open that way. |
browser_drag | Drag one element onto another. |
browser_press_key | Press a single key, such as Enter or Escape. |
browser_scroll | Scroll by pixels or bring an element into view. |
browser_wait_for | Wait for text, a URL, a load state, or for something to disappear. |
browser_handle_dialog | Answer the JavaScript dialog that is blocking the page after a tool reported dialog_open: accept, dismiss, or type into a prompt. |
browser_file_upload | Hand a file to a file input, with the name the page should see. |
browser_evaluate | Run JavaScript in the page and return its result. |
browser_resize | Change the viewport size. |
browser_mouse | Raw mouse moves, presses and wheel events, for canvases and maps. |
Downloads
Download and provide files from the browser.
| Tool | Description |
|---|---|
browser_downloads | List what this session downloaded, with an authenticated link per completed file. |
Security
- An app key is a credential: keep it in your client's secret store or an environment variable, never in a shared config file or a link. If it is exposed, revoke it on the Apps tab.
- The key travels in a request header. Keep it out of URLs, where it would land in browser history, proxy logs and analytics.
- Pages load in our infrastructure, never on the machine running the assistant and never in a browser profile of yours: every session is a throwaway container.
- The MCP server uses no model of its own. It returns the requested results to your client, where you decide which model processes them.
- An agent's session is as visible as a person's. It is listed in the dashboard, watchable live, and can be ended by hand at any moment.
- Everything runs over TLS, and the sessions are covered by the same DPA as the rest of the product.
Troubleshooting
If something goes wrong, check these common causes first:
The client lists no tools. It has not reloaded its configuration. Restart it after adding the server, and check the URL is the /mcp endpoint above rather than the REST base.
Every call answers with an upgrade notice. The account behind the key has no plan with programmatic access. Start the trial, or ask a workspace manager for a seat.
A call is refused as an ambiguous session. Two or more sessions are running on that key, so Guard.ch will not guess which one you mean. List them and pass the session_id explicitly from then on.
Creating a session is refused. Either all three of the account's running sessions are in use, or the image asked for cannot be driven programmatically. The refusal says which, and names the ids you may use.
The key stopped working mid-conversation. It was revoked or reached its expiry date. Create a new one and update the client's configuration.
The same browsers without MCP
A client that does not speak MCP can create the same sessions over REST and attach Playwright or Puppeteer to the CDP endpoint each one returns. The API integration guide covers that path.
Next steps
Create a key under Apps, add the endpoint to your client and ask the assistant to open a page. You can watch or end its sessions on the Agents tab. If your client is missing from this guide, get in touch.