Skip to main content
Glama

4PDA MCP

无需浏览器即可访问 4PDA 论坛的 lofi(文本)版本。它使用 impit 来通过 Cloudflare 的 TLS 质询。

为什么用 lofi?

lofi/文本版本比完整页面小约 50 倍,并且标记稳定、简单,非常适合 LLM 消费。而完整页面(?act=idx、?showforum=、?showtopic=)重度依赖 JS,且受 Cloudflare 防护门槛限制。

Related MCP server: Reddit MCP Server

URL 约定(已探明)

4PDA 更改了 lofi 入口。lofiversion/index.php?index.html 现在返回 404。当前实际格式是:

  • lofiversion/index.php?f{forum_id}.html — 论坛页面(子论坛 + 主题列表)

  • lofiversion/index.php?t{topic_id}.html — 主题第 1 页

  • lofiversion/index.php?t{topic_id}-{offset}.html — 主题第 N 页,步长 20

  • index.php?act=idx — 完整索引,仅用于枚举顶级分类

置顶的头部帖会在每个主题页上重复出现;此服务器在页数 ≥ 2 时会将其丢弃。

工具

  • list_forums(forum_id?) — 当省略 forum_id 时返回顶级分类,否则将该论坛的子论坛(以及主题摘要)作为平面列表返回。它返回一个客户端可嵌套的树。

  • list_topics(forum_id) — 某个论坛中的主题:id、标题、回复数、is_important。

  • list_posts(topic_id, page=1) — 页面上的帖子:作者、日期、html(内部链接在可行的情况下改写为 lofi 形式)。在页数 ≥ 2 时丢弃置顶帖。

运行

pip install -e .
4pda-mcp            # stdio MCP server
# or: mcp run src/fourpda_mcp/server.py

无需浏览器,无需认证(只读公开内容)。impit 模拟 Chrome 以通过 Cloudflare。

速率限制

4PDA 使用 Cloudflare 作为 lofi 接口的前端;由于没有缓存,每次请求都会到达源服务器,并触发 Cloudflare 的速率限制。限制数值未公开,只能实测(2026 年 8 月):

请求速率

结果

1 请求 / 2 秒

正常(10/10)

1 请求 / 秒

正常(20/20)

2 请求 / 秒(间隔 0.5 秒)

正常(30/30)

5 请求 / 秒(间隔 0.2 秒)

第 ~20 个请求时出现 429,Retry-After: 3600(封禁 1 小时)

服务器通过强制设置最小请求间隔(FOURPDA_MIN_INTERVAL,默认 1.0——即 1 请求/秒,在确认安全的 2 请求/秒之下保留 2 倍余量)来保持在触达该阈值之下。如果仍然发生 429,服务器会记录 Retry-After 冷却时间,并在不再发送任何请求的情况下,从每个工具调用返回结构化的 rate_limited 负载:

{"rate_limited": true, "retry_after_seconds": 3600,
 "retry_at_utc": "2026-08-24T23:00:00Z",
 "hint": "4PDA is rate-limiting requests. Retry after 3600s."}

这将作为正常(非错误)结果返回,因此代理可以读取 Retry_Affer(即 retry_after_seconds)并等待刷新,而不是反复冲击被封锁的接口。冷却时间上限为 1 小时,这样异常的 Retry-After 就不会冻结进程。

Available Tools

3 tools
list_forumsA

List 4PDA forum categories/subforums. With no forum_id, returns the top-level categories (the forum tree roots). With a forum_id, returns that forum's subforums and a summary of its topics. IDs are 4PDA forum IDs.

On rate limit, returns a 'rate_limited' payload with retry_after_seconds and retry_at_utc instead of an error — wait that long before calling again.

ParametersJSON Schema
NameRequiredDescriptionDefault
forum_idNoForum ID. Omit to list top-level categories.

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden for behavioral disclosure. It goes beyond a simple 'list' by explaining the rate-limit behavior: a 'rate_limited' payload with retry_after_seconds and retry_at_utc is returned instead of an error, telling the agent exactly what to expect and how long to wait.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficient and front-loaded. The first paragraph states the core behavior, including the optional parameter's impact, and the second paragraph adds the rate-limit detail. No unnecessary words or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one optional parameter and no output schema, the description explains what the function returns, how the parameter changes behavior, and how rate limiting is handled. It avoids describing response field names, which could be considered a minor gap without an output schema, but nothing essential is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameter is already documented in the input schema. However, the description adds meaning by clarifying that omitting forum_id returns top-level categories (the forum tree roots) and that IDs are 4PDA forum IDs. This is useful context beyond the schema's terse 'Forum ID. Omit to list top-level categories.'

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists 4PDA forum categories/subforums, a specific verb and resource, and explains the two modes (with and without forum_id). This separates it from the sibling tools list_topics and list_posts, which deal with topics and posts rather than forum structure.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool returns in both modes but does not explicitly name alternatives or say when not to use it. The mention of 'a summary of its topics' implies list_topics might be used for full topic listings, but that guidance is left to inference rather than stated explicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_postsA

List posts on a page of a 4PDA topic (lofi version), with author, date and HTML body. Internal links to the full version are rewritten to their lofi equivalent where one exists. The pinned header post repeats on every page on the site; it is dropped on page >= 2. Pages are 1-indexed; each page has 20 posts.

On rate limit, returns a 'rate_limited' payload with retry_after_seconds and retry_at_utc instead of an error — wait that long before calling again.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo1-indexed page number (default 1).
topic_idYes4PDA topic ID.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does well. It discloses rate-limit behavior with retry fields, internal link rewriting, and the pinned-header behavior across pages. These are meaningful behavioral traits beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: it front-loads the core purpose, then adds pagination details, and ends with a separate rate-limit notice. Every sentence contributes distinct information without unnecessary filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple paginated read tool, the description covers output content, pagination semantics, page size, and exceptional rate-limit response. No output schema exists, but the description sufficiently describes what the caller receives and how to handle retries.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents both parameters. The description adds extra interpretative value: pages are 1-indexed, each page has 20 posts, and rate-limit retry behaviors are tied to calling again. This goes beyond basic type hints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'List posts on a page of a 4PDA topic (lofi version)', and it specifies the returned content: author, date, and HTML body. This makes it clearly distinct from the sibling tools list_forums and list_topics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear operational context: pages are 1-indexed, each page has 20 posts, and the pinned header is dropped on later pages. It doesn't explicitly say 'use list_topics instead' or 'don't use for forums', but the scope is concrete enough that an agent can decide when to invoke it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_topicsA

List topics in a 4PDA forum (lofi version): id, title, reply count, is_important (pinned/important topics are prefixed with (!) on the site).

On rate limit, returns a 'rate_limited' payload with retry_after_seconds and retry_at_utc instead of an error — wait that long before calling again.

ParametersJSON Schema
NameRequiredDescriptionDefault
forum_idYes4PDA forum ID.

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses meaningful behaviors: it is a 'lofi version' returning a specific lightweight set of fields, it uses a '(!)' prefix convention for important topics, and it returns a 'rate_limited' payload with retry_after_seconds and retry_at_utc instead of erroring on rate limits. It could mention pagination or ordering, but the provided detail is useful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: the core listing action and output fields appear first, followed by the rate-limit exception. The phrase 'lofi version' is slightly ambiguous but does not distract from the main purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a simple one-parameter tool, the description covers the core semantic (list topics), the return fields, and the only exceptional behavior (rate limiting). It does not mention pagination or ordering, but nothing in the provided schema or complexity suggests those are required for correct basic invocations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The sole parameter forum_id is 100% covered by its schema description ('4PDA forum ID.'). The description adds some context by specifying the tool lists topics within that forum, but that is already implied, so there is no significant extra semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('List'), resource ('topics in a 4PDA forum'), and the returned fields (id, title, reply count, is_important). It does not explicitly name siblings list_forums or list_posts, but the distinction is evident from the resource term itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this is the tool for listing topics for a given forum_id, and gives conditional guidance for rate-limit handling ('wait that long before calling again'). However, it does not explicitly state when to choose this over sister tools like list_forums or list_posts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedlist_forums
    • First observedlist_posts
    • First observedlist_topics

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation4/5

Each tool maps clearly to a different level of the forum hierarchy: forums, topics, and posts. There is minor overlap between list_forums with a forum_id and list_topics, since the former includes a topic summary, but the descriptions make the intended roles distinguishable.

Naming Consistency5/5

All three tools follow the exact same list_<resource> pattern: list_forums, list_topics, list_posts. This is completely predictable and makes the toolset easy to navigate.

Tool Count5/5

Three tools is an appropriate, lean size for a read-only forum browsing server. Each tool corresponds to a necessary step in the navigation flow: pick a forum, pick a topic, read posts.

Completeness4/5

The core forum traversal path is complete: forums lead to topics, and topics lead to posts. The main gap is the lack of a search tool or topic detail view, but these are reasonable omissions for a minimal browsing-focused server.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Reddit MCP Server — No API Keys Required. Browse, post, comment, vote, and manage your Reddit account from any MCP client.
    20
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides read-only access to Reddit through 8 tools for searching, browsing, and retrieving posts, comments, and user data, compatible with any MCP client.
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Provides MCP-compatible AI clients with full access to a Flarum forum's API, enabling reading, searching, creating discussions, replying, moderation, and management of users, tags, and groups.
    15
    2
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    MCP server for the SP-Tarkov Forge API. Exposes Forge endpoints as MCP tools over stdio, letting LLMs search mods, check updates, resolve dependencies, browse addons, and list SPT versions.
    13
    -