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

# Set Up ChatbotX MCP by Platform

> Connect ChatbotX MCP Server to OpenClaw, Hermes, Claude Code, VS Code, Codex, Antigravity, Gemini CLI, and ChatGPT.

Choose the tab for the AI assistant or MCP client you use.

<Tabs>
  <Tab title="OpenClaw">
    <Steps>
      <Step title="Install Node.js v22 and OpenClaw">
        ```bash theme={null}
        sudo apt update && sudo apt upgrade -y
        sudo apt install -y curl git build-essential
        curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
        source ~/.bashrc
        nvm install 22
        nvm use 22
        nvm alias default 22
        curl -fsSL https://openclaw.ai/install.sh | bash
        ```
      </Step>

      <Step title="Configure OpenClaw">
        ```bash theme={null}
        openclaw configure
        ```
      </Step>

      <Step title="Install the ChatbotX skill">
        Install the official ChatbotX skill from ClawHub:

        ```bash theme={null}
        openclaw skills install chatbotx
        ```

        Configure your environment variables:

        ```bash theme={null}
        CHATBOTX_API_KEY=YOUR_WORKSPACE_TOKEN
        CHATBOTX_API_URL=https://app.chatbotx.io/api
        ```

        <Note>
          If you are running a self-hosted instance of ChatbotX, configure `CHATBOTX_API_URL` to point to your custom domain: `https://app.yourdomain.com/api`.
        </Note>

        If your server uses a self-signed certificate, add:

        ```bash theme={null}
        CHATBOTX_ALLOW_SELF_SIGNED_CERT=true
        ```
      </Step>

      <Step title="Start and check">
        ```bash theme={null}
        openclaw gateway start
        openclaw mcp list
        openclaw logs --follow
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Hermes">
    <Steps>
      <Step title="Install Hermes">
        ```bash theme={null}
        sudo apt update && sudo apt upgrade -y
        sudo apt install -y curl git build-essential
        curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
        source ~/.bashrc
        ```
      </Step>

      <Step title="Run the setup wizard">
        ```bash theme={null}
        hermes setup
        ```
      </Step>

      <Step title="Connect ChatbotX MCP Server">
        ```bash theme={null}
        hermes mcp add chatbotx --url "https://app.chatbotx.io/mcp/sse?token=YOUR_WORKSPACE_TOKEN"
        hermes config set mcp_servers.chatbotx.transport sse
        ```

        <Note>
          If you are self-hosting ChatbotX, replace the URL with: `"https://app.yourdomain.com/mcp/sse?token=YOUR_WORKSPACE_TOKEN"`.
        </Note>
      </Step>

      <Step title="Set up systemd">
        ```bash theme={null}
        sudo systemctl daemon-reload
        sudo systemctl enable --now hermes
        hermes mcp list
        journalctl -u hermes -f
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Claude Code">
    <Steps>
      <Step title="Install Claude Code">
        ```powershell theme={null}
        npm install -g @anthropic-ai/claude-code
        ```
      </Step>

      <Step title="Add ChatbotX MCP">
        You can connect Claude Code using either SSE (remote) or stdio (local):

        **Option A: Remote (SSE) Connection**

        ```powershell theme={null}
        claude mcp add chatbotx -t sse -H "x-workspace-token: YOUR_WORKSPACE_TOKEN" -s user https://app.chatbotx.io/mcp/sse
        ```

        *Note: If self-hosted, use `https://app.yourdomain.com/mcp/sse`.*

        **Option B: Local (stdio) Connection**

        ```powershell theme={null}
        claude mcp add chatbotx -e CHATBOTX_API_KEY=YOUR_WORKSPACE_TOKEN -e CHATBOTX_API_URL=https://app.chatbotx.io/api -e CHATBOTX_MCP_TRANSPORT=stdio -s user -- node /path/to/dist/index.mjs
        ```

        *Note: If self-hosted, use `https://app.yourdomain.com/api` for the API URL.*
      </Step>

      <Step title="Check status">
        ```powershell theme={null}
        claude mcp list
        claude mcp get chatbotx
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="VS Code">
    ```json theme={null}
    {
      "servers": {
        "chatbotx": {
          "type": "sse",
          "url": "https://app.chatbotx.io/mcp/sse",
          "headers": {
            "x-workspace-token": "YOUR_WORKSPACE_TOKEN"
          }
        }
      }
    }
    ```

    *Note: If you are self-hosting, replace `https://app.chatbotx.io/mcp/sse` with `https://app.yourdomain.com/mcp/sse`.*
  </Tab>

  <Tab title="OpenAI Codex">
    ```toml theme={null}
    [mcp_servers.chatbotx]
    url = "https://app.chatbotx.io/mcp/sse"
    enabled = true

    [mcp_servers.chatbotx.http_headers]
    "x-workspace-token" = "YOUR_WORKSPACE_TOKEN"
    ```

    *Note: If you are self-hosting, replace `https://app.chatbotx.io/mcp/sse` with `https://app.yourdomain.com/mcp/sse`.*
  </Tab>

  <Tab title="Antigravity">
    ```json theme={null}
    {
      "mcpServers": {
        "chatbotx": {
          "serverUrl": "https://app.chatbotx.io/mcp/sse",
          "headers": {
            "x-workspace-token": "YOUR_WORKSPACE_TOKEN"
          }
        }
      }
    }
    ```

    *Note: If you are self-hosting, replace `https://app.chatbotx.io/mcp/sse` with `https://app.yourdomain.com/mcp/sse`.*
  </Tab>

  <Tab title="Gemini CLI">
    ```json theme={null}
    {
      "mcpServers": {
        "chatbotx": {
          "httpUrl": "https://app.chatbotx.io/mcp/sse",
          "headers": {
            "x-workspace-token": "YOUR_WORKSPACE_TOKEN"
          }
        }
      }
    }
    ```

    If your Gemini CLI version does not accept `httpUrl`, try `serverUrl`.

    *Note: If you are self-hosting, replace `https://app.chatbotx.io/mcp/sse` with `https://app.yourdomain.com/mcp/sse`.*
  </Tab>

  <Tab title="ChatGPT (Developer Mode)">
    ```text theme={null}
    https://app.chatbotx.io/mcp/sse?token=YOUR_WORKSPACE_TOKEN
    ```

    Choose no additional authentication if the token is already included in the URL.

    *Note: If you are self-hosting, replace `https://app.chatbotx.io/mcp/sse` with `https://app.yourdomain.com/mcp/sse`.*
  </Tab>
</Tabs>

## Additional Guide: Create and Secure a Telegram Bot

Both OpenClaw and Hermes allow you to interact with your AI assistant using Telegram. To set this up, you need a Telegram Bot Token and your personal Chat ID for security.

### Step 1: Create a Telegram Bot

1. Open the Telegram app, search for the official **@BotFather** (verified with a blue checkmark), and click **Start**.
2. Send the `/newbot` command.
3. Enter a display name for your bot (e.g., `ChatbotX Assistant`).
4. Enter a unique username ending in `bot` (e.g., `chatbotx_mcp_bot`).
5. Copy the **Telegram Bot Token** provided (e.g., `123456789:ABCdefGhIJKlmNoPQRs...`).

### Step 2: Retrieve Your Chat ID for Security

To prevent unauthorized users from executing commands on your ChatbotX workspace via the Telegram bot, restrict bot access to your Telegram account using your Chat ID:

1. Search for **@userinfobot** on Telegram and click **Start**.
2. Copy the **Id** number returned in the message.
3. Save this Chat ID in your OpenClaw or Hermes configuration wizard to restrict access.
