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

# Grok Build

> Add Spiral to Grok Build, xAI's coding CLI, as a remote MCP server: one command, sign in, no API key.

**1. Add the server**

```bash theme={null}
grok mcp add --transport http spiral https://api.spiral.ai/mcp
```

Add `--scope project` to add Spiral to the current repository only. No header and no client ID or secret: Grok
registers itself with Spiral.

**2. Sign in**

Start `grok` and run `/mcps`. Select Spiral and press `i`. Your browser opens: sign in to Spiral, pick the
organization and click **Authorize**. No API key.

If you skip this, Grok opens the same sign-in the first time it calls Spiral.

**3. Check it**

```bash theme={null}
grok mcp doctor spiral
```

**4. Try a starter prompt**

```text theme={null}
Find a text-to-image tool, tell me what one image costs, then generate a lighthouse at dawn.
```

> [accordion] With an API key instead
>
> Create a key in the [console](https://spiral.ai/start) under **API keys** and keep it in `SPIRAL_API_KEY`. The
> single quotes keep the variable in the config, and Grok reads it when it loads:
>
> ```bash theme={null}
> grok mcp add --transport http spiral https://api.spiral.ai/mcp \
>   --header 'Authorization: Bearer ${SPIRAL_API_KEY}'
> ```

If something does not work, see [Troubleshooting](/docs/mcp-server.md#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.