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

# Connect Claude Code, Codex, or Cursor to Agent Loadout

> One MCP server URL and one scoped token connects Claude Code, Codex CLI, Cursor, ChatGPT, or any REST client to your agent's inbox, vault, and machines.

Every client that talks to Agent Loadout uses the same server URL and the same token. You connect once, the agent's 33 MCP tools become available in your client, and swapping to a different client means pointing it at the same URL — no new agent, no new credentials.

**MCP server URL**

```
https://agent-loadout.com/api/mcp
```

The server uses OAuth 2.1 with PKCE. Clients that support browser-based OAuth (Claude Code, Cursor, ChatGPT) handle authentication automatically. For programmatic access, use a token you issue in the agent's **Tokens** tab.

<Tabs>
  <Tab title="Claude Code">
    Run the following command in your terminal. Claude Code opens your browser so you can sign in, choose an agent, and approve its permissions.

    ```bash Connect Claude Code theme={null}
    claude mcp add --transport http agent-loadout https://agent-loadout.com/api/mcp
    ```

    After you approve access in the browser:

    1. Return to your terminal — Claude Code reports **33 tools available**.
    2. Open a new chat session and enable Agent Loadout in the tools menu if prompted.
    3. Ask Claude Code which agent it is connected to, and it will call `get_agent` to confirm.

    No local installation or API key is required. To disconnect, revoke the token in the agent's **Tokens** tab and remove `agent-loadout` from Claude Code's MCP server list.
  </Tab>

  <Tab title="Codex CLI">
    Add Agent Loadout as an HTTP MCP server in your Codex configuration file. The exact path depends on your Codex installation — typically `~/.codex/config.json` or `codex.yaml`.

    ```json codex.json theme={null}
    {
      "mcpServers": {
        "agent-loadout": {
          "type": "http",
          "url": "https://agent-loadout.com/api/mcp"
        }
      }
    }
    ```

    On first use, Codex will prompt you to authenticate. Sign in to Agent Loadout in the browser, choose your agent, and approve its permissions. Codex stores the resulting token and refreshes it automatically.

    <Tip>
      If Codex does not prompt for authentication automatically, generate a token in the agent's **Tokens** tab and supply it via the `AGENT_LOADOUT_TOKEN` environment variable instead.
    </Tip>
  </Tab>

  <Tab title="Cursor">
    Add Agent Loadout in Cursor's MCP settings:

    1. Open **Cursor Settings** (⌘, on macOS or **File → Preferences → Settings** on Windows/Linux).
    2. Navigate to the **MCP** section.
    3. Choose **Add new MCP server**.
    4. Enter the name `agent-loadout` and the server URL `https://agent-loadout.com/api/mcp`.
    5. Save the settings.

    Cursor opens your browser to complete authentication. Sign in to Agent Loadout, select the agent you want Cursor to use, and approve the requested permissions. The tools become available in Cursor's chat panel automatically.
  </Tab>

  <Tab title="ChatGPT">
    ChatGPT supports Agent Loadout via a custom connector. A directory listing is not yet published, so you need to add it manually.

    <Note>
      Custom connectors require Developer mode. Availability depends on your ChatGPT account and workspace policy.
    </Note>

    1. In ChatGPT, open **Settings → Security and login** and enable **Developer mode**.
    2. Open **Plugins**, choose the **plus button**, and name the connection **Agent Loadout**.
    3. Enter the server URL `https://agent-loadout.com/api/mcp` and choose **OAuth** when asked for the authentication method.
    4. Complete sign-in to Agent Loadout in the browser and review the requested access.
    5. In a new chat, open the tools menu and add **Agent Loadout** to the conversation.

    After setup, enable Agent Loadout in any chat session from the tools menu to make the agent's capabilities available.
  </Tab>

  <Tab title="REST API">
    Use the same token for direct REST calls. Pass it as a `Bearer` token in the `Authorization` header. The base URL is `https://agent-loadout.com/api/v1`.

    ```bash Verify your identity theme={null}
    curl https://agent-loadout.com/api/v1/me \
      -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN"
    ```

    ```bash List inboxes theme={null}
    curl https://agent-loadout.com/api/v1/inboxes \
      -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN"
    ```

    ```bash Send a message theme={null}
    curl -X POST https://agent-loadout.com/api/v1/inboxes/<INBOX_ID>/messages \
      -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "to": ["person@example.com"],
        "subject": "Hello from my agent",
        "text": "Sent by my agent.",
        "idempotency_key": "hello-1"
      }'
    ```

    The full OpenAPI spec is at `https://agent-loadout.com/api/v1/openapi.json`. Errors return JSON with a matching HTTP status code:

    ```json Error response theme={null}
    {
      "error": {
        "code": "forbidden",
        "message": "…",
        "hint": "…"
      }
    }
    ```

    Status codes: `400` bad request, `401` unauthenticated, `403` forbidden, `404` not found, `409` conflict, `429` rate limited, `402` quota or budget reached.
  </Tab>
</Tabs>

## Try it after connecting

Once your client is connected, try these prompts in any chat session. Tool access follows the agent's granted permissions and equipped resources.

```
Which Agent Loadout agent am I connected to, and what is its email address?
```

```
Summarize the new messages in my Agent Loadout inbox.
```

```
Draft a reply to the newest email. Save it without sending it.
```

```
List the accounts in my agent's vault without showing their passwords.
```

```
Show my agent's payment cards and spending limits without revealing card details.
```

```
List my agent's machines and tell me which are running.
```

<Info>
  Email, credentials, cards, and machines all share the same connection. Access to a credential's value must be enabled for the agent. Cards and machines must also be available in your workspace. Sending and running machines follow your account's plan limits.
</Info>

## Troubleshooting

<Accordion title="The connector option is missing in my client">
  Some accounts require Developer mode or a workspace administrator to enable custom connectors. Check the official setup guide linked in your client's own documentation. For ChatGPT specifically, Developer mode must be enabled under **Settings → Security and login** before the custom connector UI appears.
</Accordion>

<Accordion title="I signed in, but my chat cannot see any tools">
  Complete the access-approval step in the browser first, then return to your client. If the tools still do not appear:

  * Start a **new conversation** — some clients require a fresh session before tools become visible.
  * Look for a **Refresh tools** or **Reconnect** option in the client's MCP or connector settings.
  * Make sure you approved permissions for the correct agent during the OAuth flow. If you are unsure, disconnect and reconnect to choose again.
</Accordion>

<Accordion title="A tool returns 'permission denied' or 'resource not found'">
  This means the token used for the connection does not include the required capability, or the resource (inbox, credential, machine) is not equipped on the selected agent. To fix it:

  1. Open the agent's **Tokens** tab and check which capabilities the token carries.
  2. Open the agent's **Equipment** tab and confirm the inbox, vault entries, or machines are present.
  3. If you need to add capabilities, issue a new token with the required scopes and reconnect — or disconnect and reconnect to choose a different agent.
</Accordion>

<Accordion title="How do I disconnect Agent Loadout from a client">
  1. In the Agent Loadout dashboard, open the agent's **Tokens** tab.
  2. Find the token issued for that client and choose **Revoke**. This immediately stops all access from that token.
  3. In your client's MCP or connectors settings, remove the Agent Loadout server entry.

  You can reconnect at any time by pointing the client at `https://agent-loadout.com/api/mcp` again and completing a new OAuth flow.
</Accordion>
