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

# Connect Grok Build CLI to ConnectKey

> Add ConnectKey to the Grok Build CLI with the documented grok mcp commands and config.toml keys, and see which steps remain untested.

> [!WARNING]
>
> **Not yet verified on staging:** This applies to every step here that needs a signed-in account or a live ConnectKey connection, including setup, workspace consent, tool discovery, calls, and disconnecting or restoring access. No tool is confirmed available in this client.
>
> **Untested.** None of the Grok Build commands, configuration files or TUI actions below have been run. Adding a server, signing in to ConnectKey, choosing a workspace, allowing access, listing or calling tools, and removing access have not been verified in Grok Build CLI. When probed on 2026-11-25, the staging `/mcp`, `/.well-known/oauth-protected-resource`, and `/.well-known/oauth-authorization-server` endpoints returned `404` and the production MCP host did not resolve. This page does not say Grok Build is supported or that setup works.

xAI's public MCP page, last updated 2026-07-02, describes the `grok mcp` commands, the `config.toml` paths and the `/mcps` keys below. The endpoint results above come from public HTTP probes and hostname lookups. Neither source check ran a Grok Build CLI command.

1. Add `https://mcp.connectkey.ai/mcp` to your client.
2. Sign in to ConnectKey.
3. Pick a workspace.
4. Allow access to that workspace.

```text Copy the MCP URL for Grok Build CLI theme={null}
https://mcp.connectkey.ai/mcp
```

## Prerequisites

* Grok Build CLI installed.
* A ConnectKey account.

## Steps

1. xAI's documented command (not tested in Grok Build CLI): run `grok mcp add --transport http connectkey https://mcp.connectkey.ai/mcp`. xAI documents this form for a remote server and says OAuth is handled automatically.
2. Add `--scope project` to write `.grok/config.toml` in the current directory instead of your user configuration.
3. Alternatively declare the server in `~/.grok/config.toml` under `[mcp_servers.connectkey]` with `url` set to `https://mcp.connectkey.ai/mcp`.
4. On first use Grok opens a browser for OAuth: sign in to ConnectKey, pick a workspace and allow access (Untested: requires sign-in and a serving `/mcp` endpoint). xAI says tokens are stored under `~/.grok/mcp_credentials.json`.

## What to check

* `grok mcp list` shows the `connectkey` server (`--json` outputs machine-readable data).
* Inside the CLI, `/mcps` opens the MCP tab where you can see the server, toggle it with `Space`, refresh with `r`, and authenticate OAuth servers with `i` (Untested: a listed server is not a tested connection).

## If it fails

* Run `grok mcp doctor connectkey` (or `grok mcp doctor connectkey --json`) to diagnose configuration and connectivity.
* `grok inspect` shows every loaded server and where it came from; Grok also loads servers from `~/.claude.json`, `.cursor/mcp.json` and project `.mcp.json` files.
* Probed 2026-11-25: on the staging MCP host, `/healthz` and `/readyz` returned 200 while `/mcp`, `/.well-known/oauth-protected-resource`, and `/.well-known/oauth-authorization-server` returned 404, and the production MCP host did not resolve, so connection attempts fail until `/mcp` serves.

## Does the Grok Build guide apply to Grok chat or the xAI API?

No. xAI documents these MCP features for the Grok Build CLI. They do not establish how Grok chat, Grok Bot or the xAI API handles the same server. ConnectKey has not been tested in Grok Build.

## Does Grok Build need a chat prompt to register a remote server?

xAI documents a CLI command, `grok mcp add`, with an HTTP transport option. Its guide does not establish that a prompt in chat will configure ConnectKey.

## Where does Grok Build save a project-scoped server?

Grok Build writes project-scoped settings to .grok/config.toml. That file identifies the configuration for the project, rather than for every project on the machine.

## How can I tell whether Grok Build imported a server?

xAI says `grok inspect` shows every loaded server and its origin. A matching server name alone does not tell you where the entry came from.

## Where does Grok Build show MCP management and sign-in options?

xAI documents `/mcps` inside the CLI for managing servers and authentication (including `i` to authenticate OAuth servers). The management view is distinct from the command that adds a server.

## When does Grok Build open a browser for remote OAuth?

xAI says the browser flow starts on first use. Adding a server entry is not the same as completing sign-in, and no ConnectKey authorization has been verified in this CLI.

## Evidence

* Status: documented
* Vendor documentation retrieved: 2026-11-25
* Real-client result: None recorded for Grok Build CLI. xAI's public MCP page, last updated 2026-07-02, describes the commands, configuration paths and TUI keys; the public endpoint probes on 2026-11-25 only check HTTP responses (staging `/mcp`, `/.well-known/oauth-protected-resource`, and `/.well-known/oauth-authorization-server` returned 404) and hostname resolution (the production MCP host did not resolve). None of these checks verify adding a server, signing in, listing or calling tools, or removing access in Grok Build.
* [xAI: MCP servers in Grok Build](https://docs.x.ai/build/features/mcp-servers)


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