# MCP server

`cdpfleet-mcp` gives an AI assistant a real browser on the fleet through the Model Context Protocol: it picks the browser the site should see, browses through a residential IP (by country) or your own proxy, reads pages as accessibility snapshots, and can hand the browser to a person — to solve a captcha or type a code — through live view. Every session is recorded, so you can watch afterwards what the agent did.

## Hosted: nothing to install

**Step-by-step for Claude, ChatGPT, Claude Code, Codex and Cursor:** [MCP setup](https://cdpfleet.com/docs/mcp/setup). **What to ask, with the real tool calls:** [example prompts](https://cdpfleet.com/docs/mcp/prompts).

The same tools run at `https://cdpfleet.com/mcp` (MCP over Streamable HTTP). Your browsers are billed and limited by your plan exactly as from code.

-   **Claude, ChatGPT, Cursor, Claude Code…:** add `https://cdpfleet.com/mcp`; your assistant opens a cdpfleet window — sign in and click **Allow** (OAuth). Disconnect any time in the dashboard → API keys → Connected AI apps.
-   **Without OAuth** (scripts, headless agents): send `Authorization: Bearer <your API key>`.

Each MCP connection gets its own browser; one left idle for 30 minutes is closed, which ends its browser session.

What an agent gets from a real browser — live-view handoff, recordings, profiles, `keep_alive` — and when not to use one: [cdpfleet for AI agents](https://cdpfleet.com/ai-agents).

## Or run it locally

**Claude Code:**

```bash
claude mcp add cdpfleet -e CDPFLEET_API_KEY=your-key -- npx -y cdpfleet-mcp
```

**Claude Desktop, Cursor, Windsurf and other clients** — add to the client's MCP configuration (`claude_desktop_config.json`, `.cursor/mcp.json`, …):

```json
{
  "mcpServers": {
    "cdpfleet": {
      "command": "npx",
      "args": [
        "-y",
        "cdpfleet-mcp"
      ],
      "env": {
        "CDPFLEET_API_KEY": "your key"
      }
    }
  }
}
```

Optional: `CDPFLEET_PROXY` sets the default proxy (your own proxy URL); without it the agent uses the [cdpfleet residential proxy](https://cdpfleet.com/docs/proxies#residential), billed per GB from your balance by tier ($5 free credit).

## Tools

| Tool | What it does |
| --- | --- |
| `launch_browser` | Starts a browser: `browser` (chrome, edge, brave, opera, whale, yandex, chromium, patchright, camoufox, firefox, webkit), `headless` (default headful), `proxy`, `country` (residential exit), `record`, `downloads` (keep downloaded files), and any other [launch option](https://cdpfleet.com/docs/builder). |
| `navigate` | Opens a URL; returns the status, final URL and title. |
| `snapshot` | The page (or one element) as an accessibility snapshot — roles, names, text and links, a fraction of the HTML's size ([case](https://cdpfleet.com/docs/cases/page-to-text-for-llms)). |
| `click`, `type`, `press`, `wait_for` | Act on the page by CSS selector or by role and name from the snapshot. |
| `screenshot` | A JPEG of the viewport or the whole page. |
| `evaluate` | Runs JavaScript in the page and returns the result (data extraction). |
| `live_view` | Hands the browser to a person: they watch or take control in the dashboard's Sessions page while the agent waits. |
| `close_browser` | Ends the session; its recording appears under Sessions shortly after. |
| `downloads` | Files kept from a session launched with `downloads: true` (paid plans): names, sizes and a private 15-minute link each, about a second after `close_browser` (the tool waits for them) ([downloads](https://cdpfleet.com/docs/downloads)). Hosted server and npm cdpfleet-mcp 0.1.3+. |
| `list_browsers`, `account` | The browsers and versions on offer; your usage, live sessions and residential balance. |

## Good to know

-   **One browser at a time** per MCP server; launching again closes the previous one.
-   **Billing** is the same as for your code: thread time while the browser runs (a headful browser takes 2 threads), residential traffic per GB.
-   **Not built in:** captcha solving — use `live_view` to let a person do it.
-   Built on the [Node.js SDK](https://cdpfleet.com/docs/sdk); sources at [github.com/cdpfleet/cdpfleet/sdk/mcp](https://github.com/cdpfleet/cdpfleet/tree/main/sdk/mcp).

---
Source: https://cdpfleet.com/docs/mcp · Markdown: https://cdpfleet.com/docs/mcp.md · All docs for AI tools: https://cdpfleet.com/llms.txt
