# Connect OnlyFans and Fansly to Grok

Connect Grok to your OnlyFans and Fansly accounts. Review chats and earnings on the web, or call Fans API tools through the xAI Responses API.

[Start for Free](https://app.fansapi.com/team/your-team/integrations) · [Grok setup guide](https://docs.fansapi.com/onlyfans-ai/mcp/grok)

## What do I need to connect Grok?

For the web setup, sign in to Grok and Fans API and connect a creator account. API developers also need an xAI key and a Fans API key.

## How do I connect Fans API to Grok?

1. Sign in to Fans API and open grok.com/connectors. Choose New Connector, then Custom. For a team workspace, an admin adds the connector before members connect.
2. Give the connector a name and enter the MCP server URL: https://app.fansapi.com/mcp/onlyfans-mcp
3. Authorize access with your own Fans API account. Open a new Grok conversation and ask which connected accounts you can access.

## 10 questions to ask Grok about your accounts

- Which OnlyFans accounts can I access with this connection? Find the account to use for your first query.
- List the Fansly accounts available to this connection. Check which Fansly accounts are in scope.
- Show today’s PPV revenue for each connected OnlyFans creator. Get a creator-by-creator revenue breakdown.
- Compare this month’s earnings on OnlyFans and Fansly for this creator. See both platform totals for the same period.
- Which conversations have been waiting more than a day for our reply? Put the oldest unanswered chats first.
- Who spent the most this week, and when did each fan last message? Review recent activity alongside spending.
- Which high-spending fans have been quiet for two weeks? Identify conversations worth revisiting.
- Draft a check-in for a high-spending fan who has been quiet for two weeks. Leave it unsent. Give the team a draft to review.
- Write a renewal reminder for fans whose subscriptions expire this week. Leave it unsent. Prepare a reminder for the next review.
- Which creator had the largest change in earnings compared with last week? Use the same seven-day window for each creator.

## Grok MCP setup questions

### How do I use Grok with the xAI Responses API?

Send a request to the xAI Responses API with a remote MCP tool pointing to Fans API. Use your xAI key for the request and your Fans API key for the tool. The example below asks for the accounts this connection can access.

```js
const mcpEndpoint = 'https://app.fansapi.com/mcp/onlyfans-mcp'
const requestBody = {
  model: process.env.XAI_MODEL,
  input: 'List the OnlyFans and Fansly accounts I can access.',
  tools: [
    {
      type: 'mcp',
      server_label: 'fans_api',
      server_url: mcpEndpoint,
      authorization: process.env.FANS_API_KEY,
      allowed_tools: ['listAccounts', 'fansly_listAccounts'],
    },
  ],
}

const response = await fetch('https://api.x.ai/v1/responses', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.XAI_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(requestBody),
})
if (!response.ok) throw new Error(`xAI returned HTTP ${response.status}`)
console.log((await response.json()).output)
```

### Who connects the account in a Grok Business workspace?

A team admin adds the connector in the cloud console. Each member then opens Connectors in Grok and authorizes their own Fans API account.

### Do I need a Fans API key to connect on grok.com?

On grok.com, sign in to Fans API and authorize the connector through OAuth. When you build with the xAI API, put your Fans API key in the MCP tool’s authorization field.

### How do I limit which tools Grok loads?

List the tool names your request needs in allowed_tools. For example, listAccounts lists OnlyFans accounts. To limit the catalog to one platform, add ?platforms=onlyfans or ?platforms=fansly to the server URL.

### Why did the authorization flow return me to the dashboard?

If your Fans API session has expired, sign in to Fans API in a separate tab. Then reopen the connector in Grok and start authorization again.