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

# Connect Emma

> Use Emma in Claude.ai, Claude Code, Codex, or OpenClaw.

Emma's tools are available through Model Context Protocol (MCP). Any MCP-compatible client can connect to them. Four setups are documented below. Pick the one that matches where you already work.

## Server reference

* **Endpoint**: `https://api.agentweb.pro/mcp`
* **Transport**: Streamable HTTP
* **Auth (Claude.ai)**: OAuth 2.0. Authorization endpoint: `https://app.agentweb.pro/oauth/authorize`. Scope: `mcp:tools`.
* **Auth (Claude Code, OpenClaw)**: API key via `Authorization` header. Key format: `aw_<hex>`. Issue keys at `https://app.agentweb.pro` under Settings → API Keys.
* **Codex setup**: create an Emma plugin with Plugin Creator and point it at `https://api.agentweb.pro/mcp`.
* **Skill manifest**: `https://api.agentweb.pro/skill.md`.
* **Tools surface**: marketing operations (brand, content, ads, leads, schedules, landing pages, performance). Full tool list and schemas are advertised by the MCP server on connect.

## Before you begin

Sign up for an AgentWeb account at [app.agentweb.pro/register](https://app.agentweb.pro/register) if you don't have one.

For Claude Code and OpenClaw, generate an API key:

1. Open [app.agentweb.pro](https://app.agentweb.pro).
2. Go to **Settings → API Keys**.
3. Click **Generate**.

API keys start with `aw_`. Keep them secret.

Claude.ai uses OAuth and does not require an API key. Codex uses a plugin generated by Plugin Creator.

<Steps>
  <Step title="Add Emma as a connector">
    <Tabs>
      <Tab title="Claude.ai (Recommended)">
        1. Open [claude.ai](https://claude.ai) and go to **Settings → Connectors**.
        2. Click **Add custom connector**.
        3. Fill in the fields:
           * **Name**: `Emma`
           * **MCP server URL**: `https://api.agentweb.pro/mcp`
        4. Click **Connect**. Claude.ai redirects you to AgentWeb's authorization screen.
        5. Sign in to AgentWeb if prompted.
        6. Review the scopes being granted, then click **Authorize**.

        The scopes Emma requests:

        * Use Emma's MCP tools on your behalf
        * Read AgentWeb data (campaigns, content, leads, schedules)
        * Send messages on connected accounts (LinkedIn, Gmail, etc.)
        * Manage schedules and run workflows

        <Tip>
          Same connection model Claude.ai uses for Gmail, Notion, and Slack. No CLI to maintain, no key to rotate.
        </Tip>
      </Tab>

      <Tab title="Claude Code">
        In your terminal:

        ```bash theme={null}
        claude mcp add \
          --transport http \
          emma \
          https://api.agentweb.pro/mcp \
          --header "Authorization: Bearer aw_YOUR_API_KEY_HERE"
        ```

        | Argument                       | Description                                       |
        | ------------------------------ | ------------------------------------------------- |
        | `--transport http`             | Emma's MCP server uses Streamable HTTP.           |
        | `emma`                         | A local alias for the connection. Any name works. |
        | `https://api.agentweb.pro/mcp` | Emma's MCP endpoint.                              |
        | `--header`                     | Your AgentWeb API key as a bearer token.          |

        Verify with `claude mcp list` — `emma` should appear.

        <Warning>
          Claude Code stores your API key in `~/.claude.json`. Do not commit this file. If a key leaks, revoke it in **Settings → API Keys**.
        </Warning>
      </Tab>

      <Tab title="Codex">
        Create an Emma plugin in Codex:

        1. Open Codex.
        2. Open **Plugin Creator**.
        3. Choose the option to create a plugin from an MCP server.
        4. Fill in the fields:
           * **Name**: `Emma`
           * **MCP server URL**: `https://api.agentweb.pro/mcp`
        5. Create the plugin.
        6. Install or enable the generated Emma plugin when Codex prompts you.

        Plugin Creator packages the MCP server as a Codex plugin. New Codex threads can then load Emma's tools from that plugin.

        | Field              | Value                          |
        | ------------------ | ------------------------------ |
        | **Name**           | `Emma`                         |
        | **MCP server URL** | `https://api.agentweb.pro/mcp` |

        Start a new Codex thread after installing the plugin. MCP tools are loaded when a thread starts.

        <Warning>
          Do not add Emma as a raw `codex mcp` server unless AgentWeb support asks you to. Use Plugin Creator so Codex can package and install the MCP server as a plugin.
        </Warning>
      </Tab>

      <Tab title="OpenClaw">
        1. Copy your API key from **Settings → API Keys** in the portal.
        2. Add the key to OpenClaw:
           ```bash theme={null}
           openclaw config set agentweb_api_key aw_YOUR_API_KEY_HERE
           ```
        3. Load Emma's skill file from `https://api.agentweb.pro/skill.md`.

        The skill file declares Emma's tools. OpenClaw reads it and registers them for use in any channel it's connected to — Slack, WhatsApp, Telegram, Discord.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Use Emma in any chat">
    Open a conversation in your connected client. Emma's tools are available automatically. Try:

    * *"Emma, what's in my brand guidelines?"*
    * *"Pull my latest Meta campaign performance and tell me what to cut."*
    * *"Draft three LinkedIn posts in my founder voice about \[topic]."*
    * *"Search my CRM for leads who haven't replied in two weeks."*
  </Step>
</Steps>

## Verify the connection

Paste this prompt into any session with Emma to confirm tools are wired up correctly:

<Prompt description="Verify Emma is connected" icon="circle-check" actions={["copy"]}>
  Call the AgentWeb tool that lists my brand guidelines and return the brand name, tagline, and primary color. If no brand profile exists yet, say so and list which tool you would call to create one.
</Prompt>

If Emma returns brand details or names the right tool, the connection is working.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Claude.ai: authorization screen fails to load">
    * Make sure you're signed in to AgentWeb in the same browser. OAuth requires an active session cookie.
    * If you have multiple AgentWeb accounts, sign out and sign in with the account you want connected.
    * If the redirect doesn't complete, try an incognito window or disable browser extensions.
  </Accordion>

  <Accordion title="Claude Code: connection refused or timeout">
    * Confirm the endpoint URL is `https://api.agentweb.pro/mcp` with no trailing slash.
    * Test the key by calling the endpoint with `curl` and the same authorization header. A 200 response confirms the key works.
    * Some corporate networks block Streamable HTTP. Try a different network to rule this out.
  </Accordion>

  <Accordion title="Claude Code: tools don't appear">
    1. Run `claude mcp list` to confirm the server is registered.
    2. If missing, run `claude mcp remove emma` and the add command again.
    3. Restart Claude Code. MCP servers load when a session starts.
  </Accordion>

  <Accordion title="Codex: tools don't appear">
    1. Confirm the Emma plugin is installed and enabled in Codex.
    2. Open the plugin and confirm **MCP server URL** is `https://api.agentweb.pro/mcp`.
    3. Start a new Codex thread. MCP tools are loaded when a thread starts.
    4. If the plugin was created with the wrong URL, create it again in Plugin Creator with the values above.
  </Accordion>

  <Accordion title="OpenClaw: skill file doesn't load">
    * Open `https://api.agentweb.pro/skill.md` in a browser to confirm it returns markdown.
    * Confirm the API key in OpenClaw matches the one in the portal. Whitespace counts.
    * "Unknown tool" errors usually mean a stale skill file. Reload it.
  </Accordion>

  <Accordion title="Revoke a leaked API key">
    1. Go to **Settings → API Keys** in the portal.
    2. Click **Revoke** on the compromised key.
    3. Click **Generate** to create a new key.
    4. Update Claude Code (`claude mcp remove emma`, then add again) or OpenClaw with the new key.

    The revoked key stops working immediately.
  </Accordion>
</AccordionGroup>

## Next steps

* [Set up your brand profile](/onboarding/brand-onboarding) before using Emma.
* [Agent Mode reference](/user-guide/agent-mode) for how Emma uses your Knowledge Base.
