> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.promo.ly/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Connect Grok Build

These steps connect Grok Build to your Promoly account. Last tested on **October 2, 2026** with Grok Build 1.0.40.

Connected agents are in an invite-only beta. See [Connect an AI coding agent](https://support.promo.ly/en/article/connect-an-ai-coding-agent-1udge2h/) for what an agent can and can't do.

## Add the Promoly server

Open `~/.grok/config.toml` and add:

```toml
[mcp_servers.promoly]
url = "https://api.promo.ly/mcp"

[mcp_servers.promoly.oauth]
clientId = "promoly-grok-build"
callbackPort = 18433
scopes = ["campaigns:read", "campaigns:draft"]
```

Keep the `oauth` block exactly as shown, including `scopes`. Without `scopes`, Grok doesn't ask Promoly for any access and the sign-in fails. Use this block rather than the single-line `oauth_client_id` setting, which ignores the callback port.

## Sign in

Grok Build signs in to servers from its interactive screen:

1. Start `grok`.
2. Type `/mcps` and press Enter.
3. Move down to **promoly**, which shows **needs auth**, and press `i`.

Your browser opens Promoly. Sign in, choose the account, decide whether to allow drafts, and click **Allow access**. Back in Grok, promoly changes to **ready**.

## Check the connection

Paste this into Grok:

```text
Use the promoly tools to show which Promoly account you're connected to, then list my five most recent campaigns.
```

## Sign out or remove it

Grok doesn't have a sign-out command for a single server. To remove the server and the sign-in Grok stored for it, run:

```sh
grok mcp remove promoly
```

Removing it on your computer doesn't end the connection on Promoly's side. To do that, disconnect it under **Profile** → **Manage connected apps** in the dashboard.

## If something goes wrong

- **Port 18433 is busy.** Another app is using it. Close that app, then press `i` on promoly in `/mcps` again.
- **promoly shows needs auth again after a disconnect or after 30 days.** Open `/mcps`, select promoly and press `i` to sign in again.
- **You put the server in a project's `.grok/config.toml` and Grok ignores it.** Grok only loads project servers in folders you've trusted. Trust the folder when Grok asks, or use `~/.grok/config.toml` instead.