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

# Claude Code

> Connect Claude Code to a Wirebox agent identity over HTTP or stdio.

Claude Code can reach Wirebox as a remote HTTP MCP server, or run the stdio bridge locally. Use the CLI to add it, or commit a project-level `.mcp.json` so every session in the repository has it.

## Connect with the CLI

```bash theme={null}
claude mcp add --transport http wirebox https://api.wirebox.sh/api/v1/mcp \
  --header "Authorization: Bearer $WIREBOX_API_KEY"
```

By default the server is added to the current project's local scope. Add `--scope user` to make it available in every project, or `--scope project` to write it into the shared `.mcp.json`.

## Connect with a project config

Commit a `.mcp.json` in the repository root so the whole team gets the same server:

```json theme={null}
{
  "mcpServers": {
    "wirebox": {
      "type": "http",
      "url": "https://api.wirebox.sh/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer wb_live_your_api_key_here"
      }
    }
  }
}
```

Anyone using this file should use their own key — or an identity-scoped key if the project should act as a single agent.

## Connect over stdio

If you prefer a local process, run the published bridge instead:

```bash theme={null}
claude mcp add wirebox \
  -e WIREBOX_API_KEY=wb_live_your_api_key_here \
  -e WIREBOX_IDENTITY=eva \
  -- npx -y @wirebox-sh/mcp
```

The bridge connects back to the hosted endpoint by default, so the tool catalog matches the remote setup.

## Verify

List the configured servers, then ask Claude to call `wirebox_whoami`:

```bash theme={null}
claude mcp list
```

Inside a session, `/mcp` shows connection status and the tools each server exposes. `wirebox_whoami` returns the identity the connection acts as — if it is not the agent you expected, update `WIREBOX_IDENTITY` or switch to an identity-scoped key.

## What Claude Code can do

* List, search, read, send, reply to, and delete email in the agent's mailbox
* List and read iMessage conversations, and send iMessages
* Check which identity the connection acts as

Sends follow the identity's [mail rules and policy](/api-reference/mail/rules), and nothing happens until Claude calls a tool.

## Troubleshooting

| Symptom | Fix |
| :- | :- |
| `Failed to connect` | Check the URL and that the key is valid. |
| Tools return an authorization error | The key is invalid or revoked — create a new one and re-add the server. |
| Server missing in a new session | Re-add it with `--scope user`, or commit `.mcp.json` at the project root. |
| Tools act as an unexpected identity | Use an identity-scoped key, or set `WIREBOX_IDENTITY`. |

See [MCP](/mcp) for the full tool catalog, environment variables, and identity locking.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.