> ## 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.

# Grok Build

> Connect Grok Build, the xAI terminal coding agent, to PostQueen over MCP

Grok Build is xAI's terminal coding agent. It is not Grok chat at grok.com, and it is not [Grok Bot](/mcp/clients/grok-bot). Same pairing as Claude Code vs Claude.

Official install is one command. It writes `~/.grok/config.toml`. A custom connector at [grok.com/connectors](https://grok.com/connectors) does not register this product.

<Info>
  You need your PostQueen API key first. In [app.postqueen.ai](https://app.postqueen.ai), open **Settings → API Keys** and click **Reveal**.
</Info>

## Add via CLI

```bash theme={"system"}
grok mcp add --transport http postqueen https://api.postqueen.ai/mcp/YOUR_API_KEY
```

Replace `YOUR_API_KEY` with your actual key. `grok mcp list` shows the `postqueen` server. `grok mcp doctor postqueen` diagnoses connectivity.

## The two forms

<Tabs>
  <Tab title="Key in the URL">
    The same registration `grok mcp add` writes, done by hand:

    ```toml ~/.grok/config.toml theme={"system"}
    [mcp_servers.postqueen]
    url = "https://api.postqueen.ai/mcp/YOUR_API_KEY"
    ```
  </Tab>

  <Tab title="Bearer token">
    Keep the key out of the URL:

    ```bash theme={"system"}
    grok mcp add --transport http postqueen https://api.postqueen.ai/mcp --header "Authorization: Bearer YOUR_API_KEY"
    ```

    Or in the file, with `${VAR}` expansion:

    ```toml ~/.grok/config.toml theme={"system"}
    [mcp_servers.postqueen]
    url = "https://api.postqueen.ai/mcp"
    headers = { Authorization = "Bearer ${POSTQUEEN_API_KEY}" }
    ```
  </Tab>
</Tabs>

<Note>
  Syntax per the official [xAI MCP servers](https://docs.x.ai/build/features/mcp-servers) page. Pass `--scope project` to write `.grok/config.toml` in the current repo. Grok Build also loads `~/.claude.json` and Cursor `mcp.json` at lower priority. Disable that with `[compat.cursor] mcps = false` if you only want the grok command.
</Note>

<Warning>
  Your API key grants full access to your PostQueen workspace: treat it like a password. `~/.grok/config.toml` is plain text. If the key leaks, regenerate it in **Settings → API Keys** and update every client that uses it.
</Warning>

## Self-hosted

On a self-hosted instance, replace `https://api.postqueen.ai` with your `NEXT_PUBLIC_BACKEND_URL`, for example `https://postqueen.example.com/api/mcp/YOUR_API_KEY`. Most self-hosted setups serve the backend under `/api`.

<Info>
  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).
</Info>

## Verify

Run `grok mcp list`, then ask Grok Build:

> "List my connected social media accounts"

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

## Next steps

<CardGroup cols={2}>
  <Card title="Grok Build as an agent" icon="terminal" href="/agents/grok-build">
    Skill plus CLI in the same terminal session
  </Card>

  <Card title="Grok chat" icon="https://mintcdn.com/forceplay/lYbPBM3tqu53QzpP/images/brand/icon-grok.svg?fit=max&auto=format&n=lYbPBM3tqu53QzpP&q=85&s=7fe4ed59fc811cfa495db4fffc9def7d" href="/mcp/clients/grok" width="30" height="30" data-path="images/brand/icon-grok.svg">
    Custom connector at grok.com/connectors, not this product
  </Card>

  <Card title="Grok Bot" icon="https://mintcdn.com/forceplay/lYbPBM3tqu53QzpP/images/brand/icon-grok.svg?fit=max&auto=format&n=lYbPBM3tqu53QzpP&q=85&s=7fe4ed59fc811cfa495db4fffc9def7d" href="/mcp/clients/grok-bot" width="30" height="30" data-path="images/brand/icon-grok.svg">
    Cloud agent. Add the server in the Bot chat.
  </Card>

  <Card title="MCP tools" icon="wrench" href="/mcp/tools">
    All 14 tools, with every parameter
  </Card>
</CardGroup>
