Skip to content

Connect Your Agent ​

Your AI tool connects to BrowseMCP over the internet with an API key. There is nothing to install on your computer.

Step 1: Get a key ​

  1. Open your Workspace page.
  2. Under Connect your AI agent, click Create a key.
  3. The key is shown only once. The setup lines on that page already include it, so you can copy them straight away.

Keep your key private: anyone who has it can use your browsers. You can remove a key at any time under Agent access keys.

Step 2: Add BrowseMCP to your AI tool ​

Replace YOUR_API_KEY with your key (the Workspace page fills it in for you). Then restart your AI tool.

Any tool, one command ​

This adds BrowseMCP to Claude Code, Codex, Gemini CLI, OpenCode, Cursor, VS Code, Windsurf and about 20 more. It asks which ones you want:

bash
npx add-mcp https://api.browsemcp.online/mcp --name browse-mcp -g \
  --header "Authorization: Bearer YOUR_API_KEY"

It uses add-mcp, an open-source installer, and needs Node.js. Prefer your tool's own command? Use the section for it below.

Claude Code ​

bash
claude mcp add --transport http --scope user browse-mcp https://api.browsemcp.online/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Codex ​

Codex reads the key from an environment variable:

bash
codex mcp add browse-mcp --url https://api.browsemcp.online/mcp --bearer-token-env-var BROWSEMCP_API_KEY
export BROWSEMCP_API_KEY="YOUR_API_KEY"

Add the export line to your shell profile (~/.bashrc or ~/.zshrc) so it is set every time you start Codex.

Prefer editing the config file?

Add to ~/.codex/config.toml (no environment variable needed):

toml
[mcp_servers.browse-mcp]
url = "https://api.browsemcp.online/mcp"
http_headers = { Authorization = "Bearer YOUR_API_KEY" }

Gemini CLI ​

bash
gemini mcp add --scope user --transport http browse-mcp https://api.browsemcp.online/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

OpenCode ​

bash
opencode mcp add browse-mcp --url https://api.browsemcp.online/mcp \
  --header "Authorization=Bearer YOUR_API_KEY"
Prefer editing the config file?

Add under "mcp" in ~/.config/opencode/opencode.json:

json
"browse-mcp": {
  "type": "remote",
  "url": "https://api.browsemcp.online/mcp",
  "enabled": true,
  "oauth": false,
  "headers": { "Authorization": "Bearer YOUR_API_KEY" }
}

Google Antigravity ​

Antigravity takes a server URL, so use the direct URL. Add to ~/.gemini/config/mcp_config.json (older versions use ~/.gemini/antigravity/mcp_config.json):

json
{
  "mcpServers": {
    "browse-mcp": {
      "serverUrl": "https://api.browsemcp.online/mcp?key=YOUR_API_KEY"
    }
  }
}

Other AI tools ​

Any tool that supports remote MCP servers works. Use:

  • URL: https://api.browsemcp.online/mcp
  • Header: Authorization: Bearer YOUR_API_KEY

Direct URL (no headers) ​

Some AI tools only let you paste a server address and have no place for a header. For those, put the key in the address instead:

https://api.browsemcp.online/mcp?key=YOUR_API_KEY

That one link is all the tool needs. The Direct URL tab on your Workspace page shows it with your key filled in.

Keep this link private

The key is part of the address, so treat the whole link like a password. Don't paste it into chats, screenshots, or shared config files. If it leaks, remove the key on your Workspace page and create a new one. When your tool supports headers, prefer the header method above.

Check it works ​

Ask your agent: "List my BrowseMCP browsers." It should name the browser you connected. If it says no browser is online, open the extension and make sure it says Connected.

Using the agentab CLI instead ​

Before the hosted connection existed, BrowseMCP used a small CLI called agentab. It is deprecated: it still works for existing setups, but it won't get new releases. Switch to the hosted connection above when you can.

bash
npm install -g agentab   # needs Node.js 20 or newer
agentab auth             # sign in through your browser
agentab setup            # add BrowseMCP to your AI tools

Older name

browse-mcp-server is an older name for the same package and keeps working.

Next ​

Connect your browser if you haven't yet.

Released under the MIT License.