Discourse MCP
What it does
Discourse MCP CLI server (stdio) exposing Discourse tools via MCP
- Connects 在你的电脑上运行
- Account or key No key needed
- Category 开发者工具
安装
选择你使用的 AI 应用,然后复制设置。
通过 3/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月13日
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude,但需要先准备
需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
打开电脑版 Claude 应用的设置文件
SettingsDeveloperEdit Config
粘贴这些设置并保存文件
{ "mcpServers": { "discourse": { "command": "npx", "args": [ "-y", "@discourse/mcp" ] } } }退出 Claude 再重新打开
试一试
用 Discourse MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 Discourse MCP,或回答中出现 Discourse MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
ChatGPT 暂时无法连接 Discourse MCP
Discourse MCP 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器
你可以改用这些方式
A · 使用能连接 Discourse MCP 的应用
- 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
- 需要先在电脑上安装 Node.js(只需一次)
- 需要先在电脑上安装 Node.js(只需一次)
- 需要先在电脑上安装 Node.js(只需一次)
B · 开发者工具 类中能连接 ChatGPT 的其他服务器
从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的
- Sentry✓ ChatGPT
- Compiler Explorer✓ ChatGPT
- GitDiagram✓ ChatGPT
可连接 Claude Code,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
打开终端
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
粘贴这条命令并按 Enter
claude mcp add --scope user discourse -- npx -y @discourse/mcp在 Claude Code 中输入 /mcp
应能看到 Discourse MCP 在列表中并显示已连接
试一试
用 Discourse MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 Discourse MCP,或回答中出现 Discourse MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
在 Cursor 中以 Agent 模式打开 AI 聊天
试一试
用 Discourse MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 Discourse MCP,或回答中出现 Discourse MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
在 VS Code 中以 Agent 模式打开 AI 聊天
试一试
用 Discourse MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 Discourse MCP,或回答中出现 Discourse MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
开发者专用:终端命令和 JSON 设置
安装在电脑上
Claude Code
claude mcp add --scope user discourse -- npx -y @discourse/mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"discourse": {
"command": "npx",
"args": [
"-y",
"@discourse/mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"discourse": {
"command": "npx",
"args": [
"-y",
"@discourse/mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"discourse": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@discourse/mcp"
]
}
}
}这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
一览
哪些应用可以使用它
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
在你的电脑上运行,适用于
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月13日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 discourse 验证,该账户拥有此仓库
- ✓ 通过
仍在维护
代码最后更新于前天
- ✓ 通过
有许可证
使用 MIT
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
讨论
提问、分享技巧或报告无法使用。按“有帮助”数量排序。
用户评价
还没有评价
与“开发者工具”中的其他服务器比较i
- 星标数多于此分类中其他 5834 个服务器的 96%
- 发布到注册中心的时间比此分类中其他 5834 个服务器的 30% 更新
- 基础检查结果等于或优于此分类中其他 5834 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Discourse MCP 安全吗?
它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于前天,最新版本(0.3.1)于3个月前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
同类别的其他选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Serena MCP: the IDE for your agent
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Discourse MCP
A Model Context Protocol (MCP) stdio server that exposes Discourse forum capabilities as tools and resources for AI agents.
- Entry point:
src/index.ts→ compiled todist/index.js(binary name:discourse-mcp) - SDK:
@modelcontextprotocol/sdk - Node: >= 24
- Version: 0.3.1 (simplifies write opt-in so
--allow_writesis sufficient and deprecatesread_only=false; 0.3.0 added operator-selectable toolsets, structured directory output, and expanded opt-in administration capabilities; 0.2.x introduced breaking changes from 0.1.x, including JSON-only tool output; category/group resources remain deprecated compatibility surfaces alongside canonical list tools)
Quick start (release)
- Run (read‑only, recommended to start)
npx -y @discourse/mcp@latest
Then, in your MCP client, either:
- Call the
discourse_select_sitetool with{ "site": "https://try.discourse.org" }to choose a site, or - Start the server tethered to a site using
--site https://try.discourse.org(in which casediscourse_select_siteis hidden).
- Enable writes (opt‑in, safe‑guarded)
npx -y @discourse/mcp@latest --allow_writes --auth_pairs '[{"site":"https://try.discourse.org","api_key":"'$DISCOURSE_API_KEY'","api_username":"system"}]'
- Run with only Data Explorer built-in tools
npx -y @discourse/mcp@latest --toolsets data_explorer --tools_mode discourse_api_only
This exposes discourse_select_site plus the read-only Data Explorer tools. Add --site, authentication, and the write flags as needed; see Built-in toolsets.
- Use in an MCP client (example: Claude Desktop) — via npx
{
"mcpServers": { "discourse": { "command": "npx", "args": ["-y", "@discourse/mcp@latest"], "env": {} } } }
Alternative: if you prefer a global binary after install, the package exposes
discourse-mcp.
`json
{
"mcpServers": {
"discourse": { "command": "discourse-mcp", "args": [] }
}
}
`
Configuration
The server registers tools under the MCP server name @discourse/mcp. Choose a target Discourse site either by:
- Using the
discourse_select_sitetool at runtime (validates via/about.json), or - Supplying
--siteto tether the server to a single site at startup (validates via/about.jsonand hidesdiscourse_select_site).
- Auth
- None by default.
- Admin API Keys (require admin permissions): `--auth_pairs '[{"site":"https://example.com","api_key":"...","api_username":"system"}]'`
- User API Keys (any user can generate): `--auth_pairs '[{"site":"https://example.com","user_api_key":"...","user_api_client_id":"..."}]'`
- HTTP Basic Auth (for sites behind a reverse proxy): Add
http_basic_userandhttp_basic_passto anyauth_pairsentry. This is useful for Discourse sites protected by HTTP Basic Authentication at the reverse proxy level. - You can include multiple entries in
auth_pairs; the matching entry is used for the selected site. If bothuser_api_keyandapi_keyare provided for the same site,user_api_keytakes precedence.
- Write safety
- Writes are disabled by default.
- Built-in write tools are only registered when
--allow_writesis enabled. This includes post, topic, private-message, category, user, upload, draft, and saved Data Explorer query mutations. - Private-message listing and reading also require a matching authenticated site because PM data is never public.
- Toolset selection does not bypass write safety. A selected write tool remains absent unless writes are enabled.
- Write tools require a matching
auth_pairsentry for the selected site; otherwise they return an error. - A ~1 req/sec rate limit is enforced for write actions.
- Flags & defaults
--help,-h, or positionalhelp: print current CLI help and exit successfully before loading profiles or starting a transport.--version,-v, or positionalversion: print one package-version line and exit successfully.-vmeans version; logging verbosity uses--log_level.
--allow_writes(default: false): enable mutation tools. This single explicit opt-in is sufficient.--read_only: deprecated compatibility setting.trueis an explicit read-only override and conflicts with--allow_writes;falsehas no effect and should be removed from commands and profiles.--timeout_ms(default: 15000)--concurrency(default: 4)--log_level(default: info)debug: Shows HTTP request URLs, statuses, and detailed network/retry information (response bodies are never logged because admin APIs may echo sensitive content)info: Shows retry attempts and general operational messageserror: Shows only errorssilent: No logging output--show_emails(default: false). includes emails in user tools. Requires admin access--tools_mode(default: auto)--toolsets: Expose selected built-in domains. Omit for the compact default catalog (all non-opt-in domains); use--toolsets allto include opt-in category/group/tag-group, moderation, workflow, and AI administration domains. See Built-in toolsets.--site: Tether MCP to a single site and hidediscourse_select_site.--default-search: Unconditionally prefix every search query (e.g.,tag:ai order:latest).--max-read-length: Maximum characters returned for post content (default 50000). Applies todiscourse_read_postand per-post content indiscourse_read_topicanddiscourse_read_private_message. The tools preferrawcontent by requestinginclude_raw=true.--allowed_upload_paths: Comma-separated list or JSON array of directories allowed for local file uploads. Required to enable local file uploads indiscourse_upload_file. Example:--allowed_upload_paths "/home/user/images,/tmp/uploads"or--allowed_upload_paths '["/home/user/images"]'. These security-sensitive paths do not receive~expansion.--transport(default: stdio): Use standard input/output by default, or loopback-only Streamable HTTP with JSON responses. HTTP explicitly supports one stateful MCP client/session per process. Every post-initialize request must carry the returnedMcp-Session-Id; a second initialize is rejected. After session DELETE/close, restart the process before connecting another client./healthreturns503 restart_requiredin that closed state. Request bodies are bounded to 4 MiB.--port(default: 3000): Port to listen on when using HTTP transport.--cache_dir(reserved)--profile(see below)
- Profile file (keep secrets off the command line)
{
"auth_pairs": [ { "site": "https://try.discourse.org", "api_key": " ", "api_username": "system" }, { "site": "https://example.com", "user_api_key": " ", "user_api_client_id": " " }, { "site": "https://protected.example.com", "api_key": " ", "api_username": "system", "http_basic_user": "username", "http_basic_pass": "password" } ], "allow_writes": true, "show_emails": true, "log_level": "info", "tools_mode": "auto", "site": "https://try.discourse.org", "default_search": "tag:ai order:latest", "max_read_length": 50000, "transport": "stdio", "port": 3000, "allowed_upload_paths": ["/home/user/images", "/tmp/uploads"] }
Run with:
node dist/index.js --profile /absolute/path/to/profile.json
Current-user home expansion is also supported:
node dist/index.js --profile ~/discourse-mcp-profile.json
Flags still override values from the profile. A leading current-user ~, ~/, or ~\ in the profile path expands to the current home directory; ~otheruser, shell-style expansion elsewhere, and upload-allowlist expansion are intentionally unsupported.
Built-in toolsets
Toolsets let an operator expose only the built-in domains needed by an MCP client. They are optional: when --toolsets and the profile field are both omitted, the server registers the default catalog (including search, discourse_search, and discourse_filter_topics). Administrative and specialized domains marked *(opt-in)* below—including themes—must be selected explicitly. Use --toolsets all only when every built-in domain is deliberately required.
Pass one name or a comma-separated union:
# Data Explorer reads, plus the site-selection bootstrap tool
npx -y @discourse/mcp@latest \ --toolsets data_explorer \ --tools_mode discourse_api_only
Search and topic tools, retaining canonical registration order
npx -y @discourse/mcp@latest \ --toolsets search,topics \ --tools_mode discourse_api_only
Every built-in domain, including opt-in workflows
npx -y @discourse/mcp@latest \ --toolsets all \ --tools_mode discourse_api_only
Author, test, and run workflows (admin key required)
npx -y @discourse/mcp@latest \ --toolsets workflows \ --site https://forum.example.com \ --auth_pairs '[{"site":"https://forum.example.com","api_key":"...","api_username":"system"}]' \ --allow_writes \ --tools_mode discourse_api_only
Profiles use an array (a comma-separated string is also accepted):
{
"toolsets": ["users", "uploads"] }
Available toolsets are:
| Toolset | Built-in tools |
|---|---|
site | discourse_select_site (also retained implicitly as bootstrap for any untethered subset) |
search | Topic-level search/filtering plus post-level keyword evidence |
topics | Core topic/post reads, exact stream selection, post search, user-post activity, and mutations |
users | User lookup/listing, user-post activity, and user mutations |
chat | Chat message retrieval |
drafts | Draft retrieval, save, and deletion |
uploads | File upload |
data_explorer | Query retrieval, execution, creation, update, and deletion |
private_messages | Authenticated personal/group PM listing and reading, plus write-gated creation, replies, and participant invitations |
activity *(opt-in)* | Reply relationships, site-wide post activity, topic view history, user activity summaries and timelines, and directory/cohort metrics |
administration *(opt-in)* | Category discovery, admin-visible site settings, and explicitly confirmed user activation/approval state changes |
site_settings *(opt-in, admin-sensitive)* | Masked site-setting inspection plus write-gated, preflighted updates of ordinary non-secret settings |
webhooks *(opt-in, admin-sensitive)* | Safe webhook and delivery-history inspection plus write-gated lifecycle, ping, and single-event redelivery operations |
themes *(opt-in, admin-sensitive)* | Theme/component inspection plus write-gated local creation, editing, installation, remote synchronization, asset upload, and guarded deletion |
groups *(opt-in)* | Exhaustive empty-input group directory listing, explicit page/filter compatibility mode, complete group CRUD and membership operations, and fixed-page group-authored post evidence |
tag_groups *(opt-in, staff-sensitive)* | Public visibility-filtered search plus staff inventory/detail and write-gated, preflighted create/update/delete lifecycle |
moderation *(opt-in)* | Authenticated review queue triage, user behavioral counters, bounded post revisions, and one freshly preflighted reviewable action |
workflows *(opt-in)* | Admin-only workflow discovery, graph authoring, expression evaluation, pin-data, draft runs, step runs, executions, and version management |
| ai_agents *(opt-in)* | Admin-only AI agent discovery, typed lifecycle, bot-user creation, and portabl