DD

discourse/discourse-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

79 stars 47 forks Качество 84 Тренд 34MIT

discourse/discourse-mcp - это MCP-серверный кандидат, импортированный из https://github.com/discourse/discourse-mcp.

Обзор

discourse/discourse-mcp - это MCP-серверный кандидат, импортированный из https://github.com/discourse/discourse-mcp.

Обзор (машинный перевод)

Дискурс MCP

Стио-сервер Model Context Protocol (MCP), который раскрывает возможности форума Discourse в качестве инструментов и ресурсов для агентов ИИ.

  • ** Точка входа**: src/index.ts → скомпилирована в dist/index.js (двоичное название: discourse-mcp) SDK: @modelcontextprotocol/sdk Узел: >= 24
  • Версия: 0.3.1 (упрощает запись opt-in, поэтому --allow_writes является достаточным и обесценивает read_only=false; 0.3.0 добавлены наборы инструментов, выбираемые оператором, структурированный вывод каталога и расширенные возможности администрирования opt-in; 0.2.x введены прорывные изменения от 0,1.x, включая выход инструмента только для JSON; ресурсы категории / группы остаются обесцененными поверхностями совместимости наряду с инструментами канонического списка)

Быстрый старт (выпуск)

Беги (только для чтения, рекомендуется начать)

В случае с клиентом MCP:

Позвоните в discourse_select_site инструмент { "site": "https://try.discourse.org" }, чтобы выбрать сайт, или Запустите сервер, привязанный к сайту, используя --site https://try.discourse.org (в этом случае discourse_select_site скрыт).

Возможна запись (опция, охраняется)

** Запустите только встроенные инструменты Data Explorer**

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

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 to dist/index.js (binary name: discourse-mcp)
  • SDK: @modelcontextprotocol/sdk
  • Node: >= 24
  • Version: 0.3.1 (simplifies write opt-in so --allow_writes is sufficient and deprecates read_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_site tool 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 case discourse_select_site is 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.

{
  "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_site tool at runtime (validates via /about.json), or

  • Supplying --site to tether the server to a single site at startup (validates via /about.json and hides discourse_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_user and http_basic_pass to any auth_pairs entry. This is useful for Discourse sites protected by HTTP Basic Authentication at the reverse proxy level.
Открыть полный README на GitHub

Установка

npx -y @discourse/mcp@latest
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "discourse": { "command": "npx", "args": ["-y", "@discourse/mcp@latest"], "env": {} } } }