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

# Build with Grok

> Connect Grok and Grok Build to the Lumx docs MCP server so answers and code about the Lumx API come from the official documentation.

[Grok](https://grok.com) is xAI's assistant, and [Grok Build](https://docs.x.ai/build/features/mcp-servers) is its coding agent for the terminal. Connect either one to Lumx's [docs MCP server](https://docs.lumx.io/developer/mcp-server.md) at `https://docs.lumx.io/mcp`, and Grok looks up endpoints, fields, and examples in the Lumx docs instead of guessing them.

The docs MCP server only reads documentation. It doesn't call the Lumx API or move money.

## Prerequisites

* A [Grok](https://grok.com) account, or [Grok Build](https://docs.x.ai/build/features/mcp-servers) installed
* A [Lumx](https://dashboard.lumx.io) Sandbox API key, if Grok Build will write and run code. See [Authentication](https://docs.lumx.io/get-started/authentication.md).

## Add the connector in Grok

1. Go to [grok.com/connectors](https://grok.com/connectors).
2. Click **New Connector**, then select **Custom**.
3. Paste `https://docs.lumx.io/mcp` as the MCP server URL.

On Grok Business and Enterprise, an admin provisions the connector first. See xAI's [Connectors](https://docs.x.ai/grok/connectors) docs.

## Add the MCP server in Grok Build

Run the following command in your terminal:

```bash theme={null}
grok mcp add --transport http lumx-docs https://docs.lumx.io/mcp
```

Run `grok mcp list` to check that `lumx-docs` is configured.

> [!NOTE]
>
> Grok Build also loads MCP servers from `~/.claude.json`, `.cursor/mcp.json`, and `.mcp.json`. If you already added `lumx-docs` to [Claude Code](https://docs.lumx.io/guides/build-with-ai/claude-code.md) or [Cursor](https://docs.lumx.io/guides/build-with-ai/cursor.md), Grok Build picks it up.

## Use it

Ask Grok or Grok Build:

```text Grok prompt theme={null}
Use the Lumx docs MCP tools to explain how to create a customer, accept the
terms of service, and start a BRL on-ramp in the Lumx sandbox. Show each
request and the fields I need from each response.
```

In Grok Build, keep your API key in `LUMX_API_KEY` in your environment or an `.env` file that's gitignored, and never paste it into the chat. For full integration prompts, see the [Prompt library](https://docs.lumx.io/prompts/overview.md).

## Next steps

* [MCP server](https://docs.lumx.io/developer/mcp-server.md): the tools the docs server exposes
* [Sandbox quickstart prompt](https://docs.lumx.io/prompts/sandbox-quickstart.md): run your first sandbox flow with an agent
* [Create a customer](https://docs.lumx.io/guides/create-a-customer.md): the full customer payload


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