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

# MCP integration

> Connect LLM agents to httpmon via MCP

httpmon's MCP server works with any MCP-compatible client. Below are configuration snippets for popular tools.

<Note>
  Start httpmon with `--mcp` before connecting a client. Print the bearer token with `httpmon --mcp-token`.
</Note>

## Claude Desktop

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "httpmon": {
      "url": "http://127.0.0.1:9551/mcp",
      "headers": {
        "Authorization": "Bearer <token>"
      }
    }
  }
}
```

Replace `<token>` with the output of `httpmon --mcp-token`.

## Cursor

Add to your Cursor MCP settings (`.cursor/mcp.json` in your project root):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "httpmon": {
      "url": "http://127.0.0.1:9551/mcp",
      "headers": {
        "Authorization": "Bearer <token>"
      }
    }
  }
}
```

## Claude Code

Add the server from the command line:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
claude mcp add httpmon \
  --transport http \
  --url http://127.0.0.1:9551/mcp \
  --header "Authorization: Bearer $(httpmon --mcp-token)"
```

Or add it to `.claude/settings.json`:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "httpmon": {
      "type": "http",
      "url": "http://127.0.0.1:9551/mcp",
      "headers": {
        "Authorization": "Bearer <token>"
      }
    }
  }
}
```

## Verifying the connection

Once connected, ask your agent to list captured requests:

> "List the last 5 HTTP requests captured by httpmon"

The agent will call `list_requests` and return the results. If authentication fails, verify the token matches the output of `httpmon --mcp-token`.

## Use cases

* **Debug API integrations** — Ask an agent to inspect response headers or body content
* **Replay and compare** — Have an agent replay a request and diff the results
* **Automate testing** — Script mock responses and throttling via the agent
* **Export for analysis** — Ask the agent to export traffic as HAR for external tools
