chaturbate-mcp
Read-only MCP server exposing three Chaturbate APIs as tools, for use from Claude Code or any MCP client (e.g. lobehub):
| API | Endpoint | Tool | Data |
|---|---|---|---|
| Room/user stats | chaturbate.com/statsapi/ |
fetch_room_stats |
viewers, token balance, satisfaction score, broadcast status… (refreshes ~every 5 min) |
| Affiliate earnings | chaturbate.com/affiliates/apistats/ |
fetch_affiliate_stats |
per-program earnings tables (9 programs), totals, payout |
| Events feed | eventsapi.chaturbate.com/events/… |
fetch_events, build_events_feed_url, get_events_schema |
live long-poll stream: chat, tips, follows, media purchases, private messages… |
Built with the official Python MCP SDK (mcp ≥ 2.1, the release that renamed FastMCP →
MCPServer) and httpx2.
Requirements
- Python ≥ 3.10 (developed on 3.14)
- uv
Install
uv sync --dev
Configure
Copy .env.example to .env and fill in your Chaturbate account values:
cp .env.example .env # then edit
Credentials are read from the environment, with .env as a local convenience:
CHATURBATE_USERNAME— your Chaturbate accountCHATURBATE_STATS_TOKEN— Stats-API scope token. The same token authorizes both the room-stats and the affiliate-earnings endpoints.CHATURBATE_EVENTS_TOKEN— Events-API scope token for the live feed. A private scope exposes tips + private messages; a public scope omits them.
Create/manage tokens at https://chaturbate.com/statsapi/authtoken/.
.env is gitignored. Never commit a real token.
Run
Start the stdio server manually:
uv run chaturbate-mcp
For Claude Code, a project-scoped entry is committed in .mcp.json (launches via uv, no
secrets in the config — the server reads them from .env). Approve the chaturbate server
once under /mcp.
Tools
| Tool | Purpose |
|---|---|
config_status |
Which credential sets are configured (booleans, never values) |
fetch_room_stats |
One-shot stats snapshot (optionally override username/token) |
fetch_affiliate_stats |
9-program earnings report. Sends only username+token unless you supply start_date/end_date/breakdown (undocumented upstream — see note) |
fetch_events |
Stateless long-poll of the events feed; thread next_url to stream |
build_events_feed_url |
Return the base feed URL for explicit cursor control |
get_events_schema |
Reference table of the 12 event methods and their object shapes |
Streaming events
The events feed is cursor-based and stateless:
fetch_events(timeout=0)→ returns{events, next_url}(recent events + a cursor).- Pass that
next_urlback tofetch_events(next_url=…)to receive the next batch. events: []+ a validnext_urlmeans nothing new in the window — poll again.
timeout (0–90 s) is how long the server waits for new events before returning. Default to
0 for a quick peek; a long poll can exceed an MCP client's tool-call deadline.
The companion skill .claude/skills/chaturbate/ documents these workflows for Claude Code.
Tests
Offline unit tests (no network, no tokens):
uv run pytest -q
Live smoke test against the real API — it reads the account/tokens from
review/Stats Token Authorization - Chaturbate.html in memory (or CHATURBATE_* env) and
never prints or persists them:
uv run python scripts/smoke_test.py
Releasing (PyPI)
This package publishes to PyPI from GitHub Actions via a Trusted Publisher (OIDC) — no API tokens or passwords are used.
To cut a release:
- Bump
versioninpyproject.toml, commit, and push. - Tag and push the tag (must match the new version):
git tag v0.1.0 && git push origin v0.1.0 .github/workflows/publish-python.ymlruns the offline tests, builds the wheel + sdist, smoke-tests the install, then publishes tohttps://pypi.org/project/chaturbate-mcp.
The PyPI trusted publisher is registered once at https://pypi.org/manage/account/publishing/ with exactly these values (the workflow name and environment must match the file/job in this repo):
| Field | Value |
|---|---|
| PyPI Project Name | chaturbate-mcp |
| Owner | Heretek-AI |
| Repository | chaturbate-mcp |
| Workflow name | publish-python.yml |
| Environment | pypi |
Security notes
review/(a saved copy of your authtoken page — contains live tokens) andmitm_mcp_traffic.dbare gitignored and must never be committed. SeeCLAUDE.md.- Real tokens live only in
.env(gitignored) or the environment. - Events
next_urlvalues embed the events token. Treat tool output as sensitive: do not echo feed URLs verbatim into chat, logs, or files. - API error messages are redacted before they reach the client.
Caveats
- Stats are ~5 minutes stale upstream; don't treat a single snapshot as live.
- Affiliate date-range params are undocumented and unreliable — Chaturbate can answer rapid requests carrying them with HTTP 403 (throttling). The tool sends none by default.
- The affiliate/room-stats data refreshes once every ~5 minutes regardless of request rate.
- The events feed rate limit is 2000 requests/minute.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chaturbate_mcp-0.1.0.tar.gz.
File metadata
- Download URL: chaturbate_mcp-0.1.0.tar.gz
- Upload date:
- Size: 86.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2f21a731adeddcd589d32cd658c62bddeaa433caee0e5fe66cbb12ac7076335
|
|
| MD5 |
51c7f2773f10e305e50df10446aa9085
|
|
| BLAKE2b-256 |
38e3aff466e365eb4eea3d9a13eef9a6918409fd85990c80ed11f40df74f4f66
|
Provenance
The following attestation bundles were made for chaturbate_mcp-0.1.0.tar.gz:
Publisher:
publish-python.yml on Heretek-AI/chaturbate-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chaturbate_mcp-0.1.0.tar.gz -
Subject digest:
b2f21a731adeddcd589d32cd658c62bddeaa433caee0e5fe66cbb12ac7076335 - Sigstore transparency entry: 2694497289
- Sigstore integration time:
-
Permalink:
Heretek-AI/chaturbate-mcp@f01d991f597f541aca269e753f2e50ebd84cee2c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Heretek-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@f01d991f597f541aca269e753f2e50ebd84cee2c -
Trigger Event:
push
-
Statement type:
File details
Details for the file chaturbate_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chaturbate_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8da07a50a1ceed893f22dec772e858d7f814f21b87db9cc525b79b034d1ea18b
|
|
| MD5 |
0facae0211b135d6a2b6efb5c221baa4
|
|
| BLAKE2b-256 |
939d45a03f880a75b33a32dd1eed3f23035ac0922a6b616617af349d83b4b5e6
|
Provenance
The following attestation bundles were made for chaturbate_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish-python.yml on Heretek-AI/chaturbate-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chaturbate_mcp-0.1.0-py3-none-any.whl -
Subject digest:
8da07a50a1ceed893f22dec772e858d7f814f21b87db9cc525b79b034d1ea18b - Sigstore transparency entry: 2694497337
- Sigstore integration time:
-
Permalink:
Heretek-AI/chaturbate-mcp@f01d991f597f541aca269e753f2e50ebd84cee2c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Heretek-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@f01d991f597f541aca269e753f2e50ebd84cee2c -
Trigger Event:
push
-
Statement type: