4PDA MCP
MCP server exposing the 4PDA forum lofi (text) version without a
browser. Uses impit to pass Cloudflare's TLS
challenge.
Why lofi?
The lofi/text version is ~50x smaller than the full page and has stable, simple
markup — ideal for LLM consumption. The full version (?act=idx, ?showforum=,
?showtopic=) is JS-heavy and Cloudflare-gated.
URL conventions (discovered)
4PDA changed the lofi entry. lofiversion/index.php?index.html now 404s. The
live format is:
lofiversion/index.php?f{forum_id}.html— a forum page (subforums + topics list)lofiversion/index.php?t{topic_id}.html— topic page 1lofiversion/index.php?t{topic_id}-{offset}.html— topic page N, step 20index.php?act=idx— full index, used only to enumerate top categories
The pinned header post repeats on every topic page; this server drops it on page ≥ 2.
Tools
list_forums(forum_id?)— top categories whenforum_idomitted, else the subforums (and topics summary) of a forum as a flat list. Returns a tree the client can nest.list_topics(forum_id)— topics in a forum: id, title, replies, is_important.list_posts(topic_id, page=1)— posts on a page: author, date, html (with internal links rewritten to lofi where possible). Header post dropped on page ≥ 2.
Run
pip install -e .
4pda-mcp # stdio MCP server
# or: mcp run src/fourpda_mcp/server.py
No browser, no auth needed (read-only public content). impit impersonates Chrome to clear Cloudflare.
Rate limiting
4PDA fronts the lofi endpoint with Cloudflare; it is uncached, so every request hits origin and Cloudflare rate-limits it. The limit is not published; measured empirically (Aug 2026):
| Request rate | Result |
|---|---|
| 1 req / 2s | clean (10/10) |
| 1 req / s | clean (20/20) |
| 2 req / s (0.5s gap) | clean (30/30) |
| 5 req / s (0.2s gap) | 429 on ~20th request, Retry-After: 3600 (1h block) |
The server stays well below the trip point by enforcing a minimum interval
between requests (FOURPDA_MIN_INTERVAL, default 1.0 — i.e. 1 req/s, a 2x
margin under the confirmed-safe 2 req/s). If a 429 still occurs, the server
records the Retry-After cooldown and, without sending further requests,
returns a structured rate_limited payload from every tool call:
{"rate_limited": true, "retry_after_seconds": 3600,
"retry_at_utc": "2026-08-24T23:00:00Z",
"hint": "4PDA is rate-limiting requests. Retry after 3600s."}
This is returned as a normal (non-error) result, so the agent can read
retry_after_seconds and wait rather than hammering a blocked endpoint. The
cooldown is capped at one hour so an anomalous Retry-After can't freeze the
process.
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 4pda_mcp-0.2.1.tar.gz.
File metadata
- Download URL: 4pda_mcp-0.2.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc1bef45198eb8b73afa6f1be9301dcaf51b84844a0632b04d1625fdda99bb77
|
|
| MD5 |
32a67b4d621838cb912a6502e5c6d471
|
|
| BLAKE2b-256 |
3c869083a2c614682e15aafb595647effeb41c876d3815ac7507e0fe1dd59e91
|
Provenance
The following attestation bundles were made for 4pda_mcp-0.2.1.tar.gz:
Publisher:
publish.yml on mishannn/4pda-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
4pda_mcp-0.2.1.tar.gz -
Subject digest:
fc1bef45198eb8b73afa6f1be9301dcaf51b84844a0632b04d1625fdda99bb77 - Sigstore transparency entry: 2582981419
- Sigstore integration time:
-
Permalink:
mishannn/4pda-mcp@9bb6295d9160206b26ee5dee80cc74bc5aefd855 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/mishannn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9bb6295d9160206b26ee5dee80cc74bc5aefd855 -
Trigger Event:
push
-
Statement type:
File details
Details for the file 4pda_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: 4pda_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.3 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 |
c4052c1322244ac83bc32e73076e10077dc00c7b115f431dca62f00c04de4b74
|
|
| MD5 |
a1b32485ba49e006457f9b15645250cc
|
|
| BLAKE2b-256 |
643c12e467955b08a6c172a542a58ac310547e6ddd2178a636688c88d0ee443c
|
Provenance
The following attestation bundles were made for 4pda_mcp-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on mishannn/4pda-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
4pda_mcp-0.2.1-py3-none-any.whl -
Subject digest:
c4052c1322244ac83bc32e73076e10077dc00c7b115f431dca62f00c04de4b74 - Sigstore transparency entry: 2582981428
- Sigstore integration time:
-
Permalink:
mishannn/4pda-mcp@9bb6295d9160206b26ee5dee80cc74bc5aefd855 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/mishannn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9bb6295d9160206b26ee5dee80cc74bc5aefd855 -
Trigger Event:
push
-
Statement type: