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

# Connect your client

> Connect your AI client to PostQueen over MCP

PostQueen speaks MCP over streamable HTTP, so any MCP-compatible client connects to her with a single URL. Pick the client you work in below, or take the endpoint straight to your own config.

## Add her to your client

<Info>
  **Get your key first.** In [app.postqueen.ai](https://app.postqueen.ai), open **Settings ›
  Developers › Public API** and click **Reveal**. Swap it for `YOUR_API_KEY` below.
</Info>

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={"system"}
    claude mcp add --transport http postqueen https://api.postqueen.ai/mcp/YOUR_API_KEY
    ```

    Add `--scope user` to make her available in every project. Full options:
    [Claude Code](/mcp/clients/claude-code).
  </Tab>

  <Tab title="Cursor">
    ```json theme={"system"}
    {
      "mcpServers": {
        "postqueen": {
          "url": "https://api.postqueen.ai/mcp/YOUR_API_KEY"
        }
      }
    }
    ```

    Into `.cursor/mcp.json`, or use the Settings UI: [Cursor](/mcp/clients/cursor).
  </Tab>

  <Tab title="Codex">
    ```bash theme={"system"}
    codex mcp add postqueen --url https://api.postqueen.ai/mcp/YOUR_API_KEY
    ```

    Written to `~/.codex/config.toml`: [Codex](/mcp/clients/codex).
  </Tab>

  <Tab title="Gemini CLI">
    ```bash theme={"system"}
    gemini mcp add --transport http postqueen https://api.postqueen.ai/mcp/YOUR_API_KEY
    ```

    Add `--scope user` for every project: [Gemini CLI](/mcp/clients/gemini-cli).
  </Tab>

  <Tab title="Claude & ChatGPT">
    No file to edit. Both take the URL in their connector screen:

    ```
    https://api.postqueen.ai/mcp/YOUR_API_KEY
    ```

    Step by step: [Claude](/mcp/clients/claude), [ChatGPT](/mcp/clients/chatgpt).
  </Tab>

  <Tab title="Any other client">
    ```json theme={"system"}
    {
      "mcpServers": {
        "postqueen": {
          "serverUrl": "https://api.postqueen.ai/mcp",
          "headers": {
            "Authorization": "Bearer ${env:POSTQUEEN_API_KEY}"
          }
        }
      }
    }
    ```

    The header form keeps the key out of the file. Anything else:
    [Other clients](/mcp/clients/other-clients).
  </Tab>
</Tabs>

<Warning>
  The connector URL contains your API key, and that key can post to every channel you have connected. Treat it like a password. If the key leaks, regenerate it in **Settings > Developers > Public API** and update every client that uses it.
</Warning>

## Pick your client

<CardGroup cols={2}>
  <Card title="Claude Code" icon="https://mintcdn.com/forceplay/3MbWAJB4xKJ_Rxe0/images/brand/icon-claude-code.svg?fit=max&auto=format&n=3MbWAJB4xKJ_Rxe0&q=85&s=624b5ccf64e6c7059b2798bb3d9a5fbd" href="/mcp/clients/claude-code" width="30" height="30" data-path="images/brand/icon-claude-code.svg">
    Add PostQueen with one `claude mcp add` command
  </Card>

  <Card title="Claude" icon="https://mintcdn.com/forceplay/3MbWAJB4xKJ_Rxe0/images/brand/icon-claude.svg?fit=max&auto=format&n=3MbWAJB4xKJ_Rxe0&q=85&s=338fff2e8388bb38cbb3ac0173e1f7d4" href="/mcp/clients/claude" width="30" height="30" data-path="images/brand/icon-claude.svg">
    Connect through the desktop app on macOS or Windows
  </Card>

  <Card title="Claude Web & Mobile" icon="https://mintcdn.com/forceplay/3MbWAJB4xKJ_Rxe0/images/brand/icon-claude.svg?fit=max&auto=format&n=3MbWAJB4xKJ_Rxe0&q=85&s=338fff2e8388bb38cbb3ac0173e1f7d4" href="/mcp/clients/claude" width="30" height="30" data-path="images/brand/icon-claude.svg">
    Add PostQueen as a connector on claude.ai
  </Card>

  <Card title="ChatGPT" icon="https://mintcdn.com/forceplay/3MbWAJB4xKJ_Rxe0/images/brand/icon-chatgpt.svg?fit=max&auto=format&n=3MbWAJB4xKJ_Rxe0&q=85&s=2e4e28580778d19f3e5f8a885eca4603" href="/mcp/clients/chatgpt" width="30" height="30" data-path="images/brand/icon-chatgpt.svg">
    Turn on developer mode, then paste the URL as a connector
  </Card>

  <Card title="Cursor" icon="https://mintcdn.com/forceplay/3MbWAJB4xKJ_Rxe0/images/brand/icon-cursor.svg?fit=max&auto=format&n=3MbWAJB4xKJ_Rxe0&q=85&s=5c67bafd9e5b9681232c0ba784fac6d5" href="/mcp/clients/cursor" width="30" height="30" data-path="images/brand/icon-cursor.svg">
    One `.cursor/mcp.json` entry, or the Settings UI
  </Card>

  <Card title="Codex" icon="https://mintcdn.com/forceplay/3MbWAJB4xKJ_Rxe0/images/brand/icon-codex.svg?fit=max&auto=format&n=3MbWAJB4xKJ_Rxe0&q=85&s=7531906176cea7df45d5b6da9c1e8162" href="/mcp/clients/codex" width="30" height="30" data-path="images/brand/icon-codex.svg">
    One block in `~/.codex/config.toml`, key in or out
  </Card>

  <Card title="Gemini CLI" icon="https://mintcdn.com/forceplay/3MbWAJB4xKJ_Rxe0/images/brand/icon-gemini-cli.svg?fit=max&auto=format&n=3MbWAJB4xKJ_Rxe0&q=85&s=1a8e58041a86b8c765f3e545f9412eaf" href="/mcp/clients/gemini-cli" width="30" height="30" data-path="images/brand/icon-gemini-cli.svg">
    One `mcpServers` entry in your settings file
  </Card>

  <Card title="Other clients" icon="https://mintcdn.com/forceplay/MPQUZu1_FMpoCr-W/images/brand/icon-other-clients.svg?fit=max&auto=format&n=MPQUZu1_FMpoCr-W&q=85&s=ae713744a00edb7f6c20f7f898c78f8a" href="/mcp/clients/other-clients" width="30" height="30" data-path="images/brand/icon-other-clients.svg">
    The generic remote shape, for anything that speaks MCP
  </Card>
</CardGroup>

## Self-hosted

Replace `https://api.postqueen.ai` with whatever your `NEXT_PUBLIC_BACKEND_URL` is set to, then append `/mcp/YOUR_API_KEY`:

```
https://postqueen.example.com/api/mcp/YOUR_API_KEY
```

Most self-hosted setups serve the backend under `/api`, so the MCP path sits at `/api/mcp`.

<Warning>
  Your reverse proxy has to forward the `/mcp` paths and stream the response rather than buffering
  it. The configuration, and the Nginx setting that silently breaks this, are on
  [MCP on a self-hosted install](/mcp/self-hosting).
</Warning>

## Verify

Once connected, ask your AI agent:

> "List my connected social media accounts"

Your channel names come back, because the agent reached for her `integrationList` tool.

<Check>
  **Your assistant is connected.** It can see your channels and it can put a post on your calendar.
  Nothing else to install.
</Check>

## When nothing comes back

<AccordionGroup>
  <Accordion title="The client shows no tools at all">
    Read the status code before changing anything, because it says which endpoint form you are
    actually on:

    | Status                               | What it means                                                                                                                     |
    | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
    | `401 Missing Authorization header`   | You are on the Bearer form and the header is not arriving                                                                         |
    | `401 Invalid API Key or OAuth token` | Bearer form, and the token is wrong or revoked                                                                                    |
    | `400 Invalid API Key`                | You are on the URL form. Also what a `pos_` OAuth token gets here, because the path form only ever looks a value up as an API key |

    Responses on these routes are plain text rather than JSON, so some clients show them as a bare
    "server error" with the real message only in a log.
  </Accordion>

  <Accordion title="It connected, and then every call fails">
    Connecting proves less than it looks. Both forms answer the browser's preflight with a `200`
    and permissive CORS headers **before any key is checked**, so a client can report success
    while holding a key that does not work. The first real call is the honest one.
  </Accordion>

  <Accordion title="Self-hosted, and it just hangs">
    Almost always the reverse proxy buffering the response. MCP streams, and a proxy that holds
    the whole reply, or that talks HTTP/1.0 upstream, breaks it while leaving the rest of the app
    working. [MCP on a self-hosted install](/mcp/self-hosting) has the working blocks and a
    `curl` that isolates it.
  </Accordion>

  <Accordion title="It worked yesterday">
    Check whether the API key was regenerated. Rotating it in **Settings > Developers > Public
    API** takes the old one out immediately and every client still holding it stops mid
    conversation. PostQueen keys never rotate on their own.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Tools Reference" icon="screwdriver-wrench" href="/mcp/tools">
    Every parameter and every field the eleven tools send back
  </Card>

  <Card title="Examples" icon="lightbulb" href="/mcp/examples">
    Discord channels, video voices, and the flows that need a lookup first
  </Card>

  <Card title="Limits and troubleshooting" icon="gauge-high" href="/mcp/limits-and-troubleshooting">
    What MCP cannot reach, and what a bad key looks like
  </Card>

  <Card title="MCP on a self-hosted install" icon="server" href="/mcp/self-hosting">
    Your own URL, and the proxy setting that breaks the stream
  </Card>
</CardGroup>
