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

# OnlyFans over MCP (/onlyfans-ai/mcp/onlyfans)

import { Accordion, Accordions } from "fumadocs-ui/components/accordion";

## The OnlyFans half of the server

The MCP server covers both creator platforms. OnlyFans is by far the larger half — **290+ of the 350+ tools** — and its tools are **unprefixed**:

```
listChats · sendMessage · sendMassMessage · listAllFans · getEarningStatistics
```

Fansly tools sit alongside them under a `fansly_` prefix. If you only work with OnlyFans, see [scoping](#scoping-to-onlyfans-only) below to drop them from your agent's context.

Every documented OnlyFans endpoint maps one-to-one to a tool, so the [OnlyFans API reference](/api-reference/overview) is the current list — or just ask your client for `tools/list`.

<Callout>
  New to MCP entirely? Start with the [overview](/onlyfans-ai/mcp), then pick an install guide: [Claude](/onlyfans-ai/mcp/claude), [ChatGPT](/onlyfans-ai/mcp/chatgpt), or [Manus](/onlyfans-ai/mcp/manus).
</Callout>

## Prerequisites

* An [OnlyFans API account](https://app.onlyfansapi.com) and an API key
* At least one [connected OnlyFans account](/introduction/guides/connect-onlyfans-account)

Your agent can do the connecting itself: `startAuthentication`, then `submit2FA` if a code is required, polling `pollAuthenticationStatus` in between.

## Account IDs

**The large majority of tools are account-scoped.** They take an `account` parameter in the form `acct_XXXXXXXXXXXXXXX`.

* `listAccounts` — every OnlyFans account on your team. Usually your agent's first call.
* `whoami` — the team behind the API key. Needs no `account` at all.

If your agent works on one creator, pin it in the system prompt so it stops asking:

```
Use account acct_XXXXXXXXXXXXXXX for all tool calls unless told otherwise.
```

<Callout type="warn">
  `acct_…` IDs work on OnlyFans tools only. Passing one to a `fansly_…` tool — or a `fansly_acct_…` ID to an unprefixed tool — fails. If a call 403s on an account you know exists, check that the tool prefix matches the account prefix.
</Callout>

## Scoping to OnlyFans only

350+ tools is a lot of context, and some clients cap how many they will load. If you never touch Fansly, append `?platforms=onlyfans` to the MCP URL:

```
https://app.onlyfansapi.com/mcp/onlyfans-mcp?platforms=onlyfans
```

The server then registers only the OnlyFans tools. The filter applies to tool **execution** as well as listing, so a scoped connection cannot call a Fansly tool even if the model guesses the name.

<Callout>
  An unrecognised value (a typo like `?platforms=onlyfan`) falls back to loading every tool rather than none, so a bad config never leaves you with an empty server.
</Callout>

## Things to tell your agent

Three behaviours an agent cannot infer from the tool schema alone.

### Media upload is URL-based over MCP

`uploadMediaToTheOnlyFansCDN` accepts a raw `file` or a `file_url`. **Binary file parameters are stripped from MCP tool schemas** — they can't travel as JSON — so over MCP you always pass `file_url`.

For large files and videos, set `async: true`. The call returns a `polling_url`; poll `getUploadStatus` until it completes, then attach the resulting `ofapi_media_…` ID.

<Callout>
  Direct binary uploads still work over plain HTTP — this only affects the MCP tool surface. See [Upload media](/api-reference/media/upload-media-to-the-only-fans-cdn).
</Callout>

### Prices are plain USD, with a floor

On `sendMessage` and `sendMassMessage`, `price` is in **US dollars** — `12` means $12.00. OnlyFans accepts `0` or a value **between 3 and 200**; anything in between 0 and 3 is rejected.

<Callout type="warn">
  This is the opposite convention to Fansly, where `1000` = $1.00. If your agent drives both platforms, state the unit per platform in your system prompt — a model that carries the Fansly habit across will try to charge $1,200.
</Callout>

Setting a non-zero `price` requires `mediaFiles`, and locks that media behind the paywall.

### Media can be attached three ways

`mediaFiles` on messages and posts accepts **`ofapi_media_…` upload IDs, OnlyFans vault IDs, or direct uploads**. Over MCP you'll use the first two — upload via `file_url` and pass the returned ID, or reference something already in the vault via `listVaultMedia`.

`previews` works the same way, and also accepts integer indices pointing at entries in `mediaFiles`.

## Example prompts

Drop these into a chat with the connector enabled:

### Reporting & analytics

* *"Summarize today's PPV revenue per creator."*
* *"List my top 20 spenders this week with their last message timestamp."*
* *"Pull last quarter's chargebacks and group them by reason."*

### Fan & chat ops

* *"Find every chat with no reply in 24h and surface them."*
* *"Tag whales spending over $500 with the `vip` label."*
* *"Identify whales who haven't messaged in 14 days — draft a re-engagement DM."*

### Mass messaging & monetization

* *"Mass-message expired subs with a 50% reactivation offer. Draft it, don't send."*
* *"Upload `https://example.com/promo.jpg` and send it as a $15 PPV to my VIP list."*

## Troubleshooting

<Accordions type="single">
  <Accordion title="The agent asks which account to use on every call">
    Most tools are account-scoped. Pin the account in your system prompt, or tell the agent to call `listAccounts` once and reuse the result.
  </Accordion>

  <Accordion title="&#x22;Price must be 0 or between 3 and 200&#x22;">
    OnlyFans rejects prices between $0.01 and $2.99. Either make the content free (`price: 0`) or charge at least $3.
  </Accordion>

  <Accordion title="The agent tries to attach a media URL directly to a message">
    `mediaFiles` takes `ofapi_media_…` IDs or OnlyFans vault IDs, not URLs. Have it call `uploadMediaToTheOnlyFansCDN` with `file_url` first, then pass the returned ID.
  </Accordion>

  <Accordion title="Too many tools / the client refuses to load them all">
    Scope the connection with `?platforms=onlyfans` on the MCP URL to drop the Fansly tools. If that's still too many, prune client-side — see [Embed in your app](/onlyfans-ai/mcp/embed#scoping-to-one-platform).
  </Accordion>

  <Accordion title="Tool calls return 429 Too Many Requests">
    MCP calls are rate-limited to **120 requests/minute** per API key. A single agent turn can be many tool calls. Back off, or split work across multiple keys.
  </Accordion>
</Accordions>

## Sending safely

<Callout type="warn">
  Don't let an autonomous agent blind-retry a send. If `sendMessage` or `sendMassMessage` times out, the message may already have gone through. Have the agent confirm with `listChatMessages` before resending, and prefer draft-then-approve for mass messages.
</Callout>

Scoped API keys, per-account permissions, and a full audit log of every call your agent makes all apply here — see [Control & safety](/onlyfans-ai/mcp#control--safety).

## See also

* [MCP overview](/onlyfans-ai/mcp) — what MCP is, the server URL, and supported clients
* [Fansly over MCP](/onlyfans-ai/mcp/fansly) — the other half of the server
* [Claude](/onlyfans-ai/mcp/claude) · [ChatGPT](/onlyfans-ai/mcp/chatgpt) · [Manus](/onlyfans-ai/mcp/manus) — install guides
* [Embed in your app](/onlyfans-ai/mcp/embed) — backend integration with your own API key
* [OnlyFans API reference](/api-reference/overview) — every endpoint exposed as a tool
* [Connect an OnlyFans account](/introduction/guides/connect-onlyfans-account) — prerequisite for account-scoped calls