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

# Grok Integration

> Connect OnlyTraffic Studio MCP to Grok: the chat at grok.com or the Grok Bot app.

xAI has two products that work with MCP servers, and each adds a server in its own way. Grok, the chat at grok.com, has a Connectors page. Grok Bot has no form for a server address: you ask the bot to add it.

## Grok (grok.com)

**1. Open Connectors**

Go to [grok.com/connectors](https://grok.com/connectors).

**2. Add a custom connector**

Click **New Connector**, pick **Custom** and enter the server URL:

```text theme={null}
https://studio-api.onlytraffic.com/mcp
```

**3. Authorize**

Grok opens the OnlyTraffic authorize page. Paste your **Studio API key** ([create one here](https://studio.onlytraffic.com/api)) and click **Authorize**.

Grok then reads what it can do in your account, and the connector is ready.

**4. Try it**

Start a new chat and ask, for example:

> Show me my last 7 days of CPL campaigns, grouped by status.

Grok will figure out how to answer from your Studio data.

> [!NOTE]
>
> On Grok Business and Enterprise a team admin adds the connector first: [console.x.ai](https://console.x.ai) → **Grok Business** → **Connectors** → **+ Add Connector** → **Other**, with the same URL. After that each member connects at grok.com/connectors with their own Studio API key.

## Grok Bot

**1. Ask the bot to add the server**

Send your bot a message:

> Add a custom MCP server called OnlyTraffic at [https://studio-api.onlytraffic.com/mcp](https://studio-api.onlytraffic.com/mcp)

Keep the words "custom MCP server" in the message, otherwise the bot may look for a ready-made plugin instead. The bot shows the name and the address and asks you to confirm.

**2. Connect**

The bot adds the server and offers to sign in. The connector also appears in your list of plugins with a **Connect** button. Either way the OnlyTraffic authorize page opens in your browser.

Paste your **Studio API key** ([create one here](https://studio.onlytraffic.com/api)) and click **Authorize**. The connector status changes to **Connected**.

**3. Try it**

Ask the bot, for example:

> List my OnlyFans accounts and their last subscriber counts.

The bot will pull the answer from your Studio data.

## Revoking access

To disconnect Grok from your Studio account:

1. Go to [Studio → API](https://studio.onlytraffic.com/api).
2. Revoke the API key Grok is using. Every Grok session tied to that key stops working immediately.

You can also remove the connector in Grok. That disconnects only this client and keeps the key for your other clients.

## Troubleshooting

> [accordion] Grok shows 'Redirect URI not allowed'
>
> Your Grok app signs in through an address we have not approved yet. Send the full error text to support and we will add it.

> [accordion] The authorize page says 'Invalid or inactive API key'
>
> Check the key in [Studio → API](https://studio.onlytraffic.com/api). A revoked or expired key does not pass. Create a new key and connect again.

> [accordion] Grok cannot reach the server
>
> Check the address: it must be exactly `https://studio-api.onlytraffic.com/mcp`, with `https` and without anything after `/mcp`.


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