Content
# onlyfanskit
Unofficial TypeScript toolkit for OnlyFans. Not affiliated with OnlyFans
or Fenix International Limited.
A small, typed client for the hosted onlyfanskit API. Use it to
connect OnlyFans accounts, drive the full SDK surface over REST, and
subscribe to realtime events.
## Packages
| package | description |
|---|---|
| [`onlyfanskit`](./packages/onlyfanskit) | TypeScript SDK — typed fetch + WebSocket client for the hosted API |
| [`onlyfanskit-mcp`](./packages/onlyfanskit-mcp) | Model Context Protocol server — lets agents drive the SDK |
| [`onlyfanskit-cli`](./packages/onlyfanskit-cli) | `onlyfanskit` command-line interface |
## Install
```bash
npm install onlyfanskit
```
## Hello world
```ts
import { OnlyFansKit } from "onlyfanskit";
const ofk = new OnlyFansKit({ apiKey: process.env.ONLYFANSKIT_API_KEY! });
const me = await ofk.me.get();
console.log(me);
// Connect an OnlyFans account. Pick the flow that fits:
// - cookie paste from a logged-in browser
// - cURL import from a browser Copy-as-cURL export
// - email + password (SMS 2FA, selfie verification)
const { account } = await ofk.connect.cookie({
cookie: "<your-cookie>",
xBc: "<your-x-bc>",
userId: "<numeric-user-id>",
});
// Drive any SDK method against the connected account.
const profile = await ofk.account(account.id).users.me();
const chats = await ofk.account(account.id).chats.list({ limit: 20 });
// Subscribe to realtime events.
const off = ofk.account(account.id).events.on("messageNew", (msg) => {
console.log("dm:", msg);
});
```
## Configuration
| env var | default | description |
|---|---|---|
| `ONLYFANSKIT_API_KEY` | _required_ | Bearer key issued by the hosted API |
| `ONLYFANSKIT_API_URL` | `https://api.onlyfanskit.dev` | Override for self-hosted or staging |
## Disclaimer
This project is independent and is not endorsed by, affiliated with,
or sponsored by OnlyFans, Fenix International Limited, or any related
entity. "OnlyFans" is a trademark of its respective owner.
## License
[MIT](./LICENSE)
Connection Info
You Might Also Like
Train-in-Silence
The first Task-Aware MCP server and automated VRAM calculator for LLM...
stacklit
108,000 lines of code. 4,000 tokens of index. One command makes any repo...
AppClaw
AI-powered mobile automation agent — describe what you want in plain...
pdf-mcp
Production-ready MCP server for PDF processing with intelligent caching....
kotadb
Local-only code intelligence API for AI developer workflows (Bun +...
gemini-api-docs-mcp
A remote HTTP MCP server for searching Google Gemini API documentation.