linuxdo-mcp
Provides tools for searching and reading a Discourse forum, including topics, categories, tags, user profiles, and user activity on linux.do.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@linuxdo-mcp search for latest discussions on MCP servers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
linuxdo-mcp
本帖使用社区公益推广,符合推广要求。我申明并遵循社区要求的以下内容:
我的项目是免费使用的,无收费(变相收费、赞助)部分: 是
我的帖子已经打上 #公益推广 标签: 是
我的项目属于个人项目,与公司或商业机构无关: 是
我的项目不存在QQ、TG等群组引流: 是
我的项目不存在非运营必要的网站引流: 是
我的项目不存在为他人推广、AFF: 是
我的项目无关联的商业项目: 是
我的站点存在登录,并已接入 LINUX DO Connect: 否
我帖子内的项目介绍,AI生成、润色内容部分已截图发出: 是
以上选择我承诺是永久有效的,接受社区和佬友监督: 是
搜索 / 阅读 linux.do(Discourse 论坛)的 MCP 服务器。 用 curl_cffi 模拟 Chrome TLS 指纹绕过 Cloudflare, 凭登录 cookie 访问受信任等级限制的内容。
工具
工具 | 返回 | 说明 |
| JSON | 当前 cookie 对应的登录用户与信任等级 |
| JSON | 全量搜索, |
| JSON | 话题详情 + 前 N 楼正文 |
| JSON | 所有板块,含各自话题数 |
| JSON | 指定类别下的话题列表(每页约 30),含该类别总话题数 |
| JSON | 所有标签及各自话题数 |
| JSON | 指定标签下的话题列表 |
| JSON | 用户资料:信任等级、头衔、发帖数、获赞数、注册/在线时间 |
| JSON | 首页「最新」话题 |
| JSON | 「热门」话题,period: daily/weekly/monthly/quarterly/yearly/all |
| JSON | 某用户的发帖/回复活动(含摘要与链接) |
| Markdown | 同 search,直接返回成品 Markdown(标题+URL+摘要) |
| Markdown | 同 get_topic,直接返回成品 Markdown(出处头+逐楼表格) |
format_*工具返回拼好的 Markdown 字符串,客户端可原样展示;其余返回结构化 JSON。get_topic/format_topic的topic_id可直接传话题 URL(如https://linux.do/t/xxx/2885565),自动解析出 id。搜索高级语法:
order:latest、#分类、@用户、tags:标签、after:2025-01-01、in:title等。
Related MCP server: USCardForum MCP Server
前置
安装 uv(提供
uvx)。准备一个 linux.do 的登录 cookie(
_t),给法见下方「登录配置」。只需_t,不需要cf_clearance。
配置(复制到你的 MCP 客户端)
uvx 会自动拉取并运行,无需下载代码。基础配置:
{
"mcpServers": {
"linuxdo": {
"command": "uvx",
"args": ["--from", "git+https://github.com/mrsxs/linuxdo-mcp", "linuxdo-mcp"]
}
}
}再按下面「登录配置」二选一填 env。
Claude Code:
claude mcp add-json linuxdo '<上面的内容>',或写进.mcp.json/ 设置。Cursor / Claude Desktop / Cline:粘进各自的 MCP 配置文件即可。
登录配置(两种方式,二选一)
为什么不直接读你平时用的浏览器?因为工具和主浏览器共用同一个
_t时, Discourse 的 token 轮换会判定异常、把会话作废,导致主浏览器被顶下线。 所以默认LINUXDO_READ_BROWSER=0(不读浏览器),请用下面任一「独立身份」。
方式一:独立 token(任何平台通用,最省心)
在隐身窗口或另一个浏览器登录 linux.do,F12 → Application → Cookies → https://linux.do
→ 复制 _t 的值,填进 env:
"env": { "LINUXDO_COOKIE": "_t=你复制的值" }只需填一次:工具之后自动接收 Discourse 轮换、写回缓存自续期,长期免维护,且与主浏览器互不影响。
方式二:专用 Chrome profile 自动读(macOS/Linux,免手工复制)
在 Chrome 右上角头像 →「添加」新建一个 profile(例:显示名 linuxdo),在其中登录 linux.do,然后:
"env": {
"LINUXDO_READ_BROWSER": "1",
"LINUXDO_CHROME_PROFILE": "linuxdo"
}LINUXDO_CHROME_PROFILE 可填显示名(Chrome 菜单里看到的,如 linuxdo)或目录名(如 Profile 1);
填错会列出所有可用 profile 供对照。工具首次自动读该 profile 做 bootstrap,之后同样走缓存自续期。
你日常用的主 profile(Default)完全不受影响——只要不在这个专用 profile 里刷 linux.do 就永不冲突。
cookie 获取顺序与续期
缓存文件
~/.cache/linuxdo-mcp/cookie.json(权限 600,工具自维护、含轮换续期,最新);环境变量
LINUXDO_COOKIE(方式一,首次 bootstrap 后写入缓存);浏览器 cookie 库(方式二,仅当
LINUXDO_READ_BROWSER=1)。
_t 是 Discourse 的滚动 token,工具每次请求都会接收服务器轮换回来的新值写回缓存,
所以配一次通常长期有效;遇 401/403 会清缓存并提示更新。
方式二各平台授权差异:
平台 | Chrome/Chromium/Brave | Firefox |
macOS | 首次弹一次钥匙串授权框,选「始终允许」;uv 缓存重建致解释器路径变化时会再弹一次 | 免授权 |
Linux | 一般免授权(cookie 若在已上锁的 gnome-keyring/kwallet 则需解锁) | 免授权 |
Windows | 不支持(pycookiecheat 只支持 macOS/Linux),请用方式一或 | 免授权 |
环境变量一览
变量 | 说明 |
| 方式一:手工指定 cookie,形如 |
| 方式二:置 |
| 方式二:Chrome 系 profile 的显示名或目录名(如 |
|
|
| 缓存有效期秒数,默认 |
| 缓存目录,默认 |
| TLS 指纹,默认 |
⚠️
_t等于你的 linux.do 登录凭证,只填进自己的本地配置,切勿分享给他人。
本地运行(开发)
uvx --from . linuxdo-mcp # 或 uv run src/linuxdo_mcp/server.py备注
cookie 过期返回 401/403 时会清缓存并提示更新;按你选的方式重配一次即可(方式二一般不会到期,浏览器保持登录时会自动续期)。
读取浏览器 cookie 依赖 pycookiecheat,只读取 linux.do 一个域名下的 cookie。
偶发被 Cloudflare 拦截时会自动重试 3 次;仍失败可设
LINUXDO_IMPERSONATE=chrome131(或chrome124)换指纹。所有请求为只读 GET,不做任何写操作。
Available Tools
13 toolscategory_topicsA
列出指定类别下的话题(每页约 30 条)。返回含该类别总话题数 topic_count、 本页话题列表与是否有下一页。category_id 用 list_categories 查询。每条话题已含 category、min_trust_level。展示约定同 latest_topics(Markdown 表格、完整标题、 纯文字表头禁用 emoji)。
Inputs: category_id (required), page.
format_searchA
同 search,但直接返回拼好的 Markdown(标题+URL+摘要列表),客户端可原样展示。
Inputs: query (required), page, pages. Returns: result
format_topicA
同 get_topic,但直接返回拼好的 Markdown(出处头 + 逐楼表格),客户端可原样展示。 topic_id 可传数字 id 或 linux.do 话题 URL(自动解析)。posts=楼层数, start=起始楼层(1-based,翻页用,如 start=21)。
Inputs: topic_id (required), posts, start. Returns: result
get_topicB
读取指定话题的详情与楼层正文。topic_id 可传数字 id,也可直接传 linux.do 话题 URL(如 https://linux.do/t/xxx/2885565/1,会自动取出 id)。posts=返回楼层数, start=起始楼层(1-based,用于翻页,如 start=21 取第 21 楼起)。返回含 total_posts(总楼数)。
Inputs: topic_id (required), posts, start.
latest_topicsA
获取首页「最新」话题列表(每页约 30 条)。每条已含 category(分类名)、 min_trust_level(最低等级要求,null=无限制),无需再逐条 get_topic 查分类。
展示约定:用 Markdown 表格,列依次为 标题(完整勿截断) | 分类 | 等级 | 回复 | 点赞 | 链接;表头与单元格一律纯文字,禁用 emoji(多字节 emoji 在生成时可能 碎成「����」乱码)。等级按 min_trust_level 显示「Lv0/1/2/3」,null 显示「—」。
Inputs: page.
list_categoriesA
列出所有板块/类别,含每个类别的话题数(topic_count)与帖子数(post_count)。
Inputs: no named parameters.
list_tagsA
列出所有标签及各自的话题数(count)。
Inputs: no named parameters.
searchA
全量搜索 linux.do。query 支持 Discourse 高级语法(order:latest、#分类、@用户、 tags:标签、after:2025-01-01、in:title 等)。pages 为连续抓取的页数(每页约 50 条)。 展示约定:Markdown 表格或列表,标题完整勿截断,纯文字勿用 emoji(易乱码)。
Inputs: query (required), page, pages.
tag_topicsA
列出指定标签下的话题(每页约 30 条)。tag 用标签名(如「人工智能」)。每条话题 已含 category、min_trust_level。展示约定同 latest_topics(Markdown 表格、完整 标题、纯文字表头禁用 emoji)。
Inputs: tag (required), page.
top_topicsA
获取「热门」话题列表。period 取 daily/weekly/monthly/quarterly/yearly/all。 每条已含 category、min_trust_level。展示约定同 latest_topics(Markdown 表格、 完整标题、纯文字表头禁用 emoji)。
Inputs: page, period.
user_actionsC
获取某用户的发帖/回复活动(含摘要与跳转链接)。
Inputs: username (required), limit.
user_infoB
查询用户资料:信任等级、注册/最后在线时间、发帖数、获赞数等。
Inputs: username (required).
whoamiA
查看当前 cookie 对应的 linux.do 登录用户与信任等级。
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools map to distinct resources or filters, but search/format_search and get_topic/format_topic are essentially the same operations differing only in output formatting. The descriptions make the distinction explicit, so confusion is possible but not severe.
Names mix bare verbs (search), verb_noun patterns (get_topic, list_categories), noun_topics forms (category_topics, latest_topics), and standalone words (whoami). All names are lowercase snake_case and readable, but they do not follow a single predictable convention.
At 13 tools the count is within a reasonable range for a forum reader, but format_search and format_topic are redundant with search and get_topic, slightly padding the surface. The remaining tools each contribute meaningfully to searching and browsing the forum.
For a read-oriented forum browsing/searching server, the coverage is solid: search, topic detail, categories, tags, users, and topic feeds are all present. Obvious gaps like posting or replying would matter only if write access was expected, which is not suggested by the tool set.
Related MCP Connectors
Search or monitor any Flarum-powered forum for discussions, replies, participants, dates, and…
Read forums, threads and comments; approve, spam or delete comments and close threads in Disqus.
Search Stack Exchange questions, fetch Q&A threads as markdown, look up tag FAQs and user profiles.
Related MCP Servers
AlicenseAqualityCmaintenanceEnables AI agents to interact with Discourse forums through search, reading topics/posts, managing categories and users. Supports secure authentication and optional write operations with rate limiting.1411,259 npm79MIT- AlicenseAqualityNot gradedmaintenanceEnables interaction with USCardForum, a Discourse-based community for US credit cards and points. Supports topic discovery, content reading, user research, forum search, and authenticated actions like notifications and bookmarks.22MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with USCardForum, a Discourse-based community focused on US credit cards and points, providing access to topics, user profiles, search, and authenticated actions like notifications and bookmarks.22MIT
- AlicenseAqualityDmaintenanceEnables AI agents to interact with Discourse forums through search, reading topics/posts, managing categories and tags, chat channels, and optionally creating content with safeguarded write operations.1511,259 npmMIT