All integrations

Connect VS Code to Guard.ch

Set up browser access once. Then ask VS Code to work in a browser or continue a session you already opened.

What you need

A Guard.ch account with MCP access enabled and an app key from that account. Your agent can access your own sessions.

Install VS Code and enable GitHub Copilot Chat with Agent mode. The code command must be available in your terminal. Use Bash or Zsh (macOS, Linux or WSL) for this command.

1. Create an app key

Open the Agents page in your dashboard and choose Create a key. Give it a name, such as your agent name. Copy the key before closing the window. It is only shown once.

Create a key

2. Add Guard.ch to VS Code

Run this command in your terminal. It adds Guard.ch to your VS Code user profile.

code --add-mcp '{"name":"guardch","type":"http","url":"https://api.guard.ch/mcp","headers":{"Authorization":"Bearer YOUR_API_KEY"}}'

Swap YOUR_API_KEY for your own key before you save this.

For JSON configuration: if you already use other MCP servers, only add the guardch entry inside mcpServers. Keep your other entries.

3. Check the connection

In the Command Palette, run MCP: List Servers and start guardch. Confirm that you trust this server. Switch Chat to Agent mode and send the task below.

Open example.com in a Guard.ch browser and tell me what the page says.

The connection works when your agent opens a Guard.ch browser and returns the page content. Find the session under Agents in your dashboard to watch it live.

Continue an open session

In your Guard.ch viewer, choose Hand to an agent. Copy the prepared prompt into your connected agent chat. It includes the session ID so your agent continues in that exact browser. Use a key from the same account.

If something goes wrong

If code is not found, enable the VS Code shell command first. If the tools are missing, use MCP: List Servers to inspect the server output and check that your organisation allows MCP.

For an authentication error, check that your app key is still valid. For an access error, check MCP access in your dashboard. Verify the connection in your agent; Guard.ch cannot automatically detect its configuration.

Your app key grants access to your sessions. Only add it to your agent settings, never to a chat or shared file. You can revoke it under Apps.

Official VS Code documentation

MCP reference and all browser tools

Everything, free for 30 days.

Nothing is held back. A card is attached up front and charged nothing until the trial ends.

Start 30-day trial