> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trace.probebrowser.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Trace MCP Setup Guide

The **Trace MCP Server** acts as a bridge, effectively giving your AI Agent eyes and hands to debug your local applications. It implements the [Model Context Protocol](https://modelcontextprotocol.io).

## ⚡ Quick Start

The server runs on your local machine using `npx`. It does not require installation.

```bash theme={null}
npx -y @probebrowser/mcp-server
```

## 🛠️ IDE Configuration

### 1. Claude Desktop App

To use Trace with Claude, you need to add it to your `claude_desktop_config.json`.

**Location:**

* **Mac**: `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

**Configuration:**

```json theme={null}
{
  "mcpServers": {
    "trace": {
      "command": "npx",
      "args": [
        "-y",
        "@probebrowser/mcp-server"
      ],
      "env": {
        "TRACE_API_KEY": "sk_live_...", 
        "HEADLESS": "false" 
      }
    }
  }
}
```

> **Tip**: Set `HEADLESS` to `"false"` if you want to watch the browser open and click things while Claude works.

### 2. Cursor (AI Editor)

Cursor has built-in MCP support.

1. Open **Cursor Settings** (`Cmd + ,`).
2. Navigate to **Features -> MCP**.
3. Click **+ Add New Server**.
   * **Name**: `trace`
   * **Type**: `command`
   * **Command**: `npx -y @probebrowser/mcp-server`
4. (Optional) Add Environment Variables for `TRACE_API_KEY`.

### 3. Windsurf / Other MCP Clients

Any client supporting the `stdio` transport can connect.

**Command:**

```bash theme={null}
npx -y @probebrowser/mcp-server
```

## 🔐 Environment Variables

| Variable | Description |
| :- | :- |
| `TRACE_API_KEY` | Required for AI analysis and Cloud features. |
| `HEADLESS` | `true` (default) or `false`. Set to valid boolean string. |
| `PORT` | (SSE Mode only) Port to run the HTTP server on. Default: `3000`. |
| `TRANSPORT` | `stdio` (default) or `sse`. |

## 🧪 Verification

Once configured:

1. Restart your IDE (Claude/Cursor).
2. Ask the Agent: *"Check the console logs of the active page"* or *"Click the signup button"*.
3. You should see the tool execution in the Agent's thought process.
