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

# Grok Build

> Connect xAI's Grok Build CLI to Automate It over remote MCP

Add the server with one command:

```bash theme={null}
grok mcp add --transport http automate-it https://api.automate.it.com/mcp
```

The first time Grok Build uses it, it opens your browser to sign in to Automate It over OAuth. There's no key to paste or rotate. Grok Build keeps the token in `~/.grok/mcp_credentials.json`. Run `grok mcp list` to confirm the server is there, or `grok mcp doctor` if it isn't connecting.

Add `--scope project` to write the entry to `./.grok/config.toml` and share it with everyone in the repo instead of only your user config (`~/.grok/config.toml`).

## Try it

Grok Build already has your session in context, so a good first task is turning that into content:

```text wrap theme={null}
> use automate-it to list my workspaces
> take what we built in this session, write it up as a blog post, and create
  an Automate It task (platform rss) so it publishes to our Main Feed
```

The draft lands in your [review queue](https://docs.automate.it.com/workflow/review.md); approve it and it publishes to the **Main Feed**, your workspace's default RSS feed. See [Worker mode](https://docs.automate.it.com/guides/worker-mode.md) for the full loop.

## Authenticate with an API key instead

For CI or a headless run with no browser, create a key in the web app under **Profile → Developer API Keys → Create Key** with `tasks:read`, `tasks:write`, `content:write`, and `skills:read` (see [API keys & scopes](https://docs.automate.it.com/api-keys.md)), and pass it as a header:

```bash theme={null}
grok mcp add --transport http automate-it https://api.automate.it.com/mcp \
  --header 'Authorization: Bearer ${AUTOMATE_IT_API_KEY}'
```

Or in `~/.grok/config.toml`:

```toml theme={null}
[mcp_servers.automate-it]
url = "https://api.automate.it.com/mcp"
headers = { Authorization = "Bearer ${AUTOMATE_IT_API_KEY}" }
```

Grok Build expands `${VAR}` (and `${VAR:-default}`) in headers, so the `ak_…` value stays in the environment and out of the config file. Load it from a mode-`600` env file (`set -a; . ~/.automate-it.env; set +a`) in the shell that starts `grok`.


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