Discourse Mcp Server
About
A Model Context Protocol (MCP) stdio server that exposes Discourse forum capabilities as tools for AI agents. Works with all deployments of discourse.org, self hosted or cloud hosted. just generate an API key to connect.
Details
- Author
- discourse
- Downloads
- 318
- Categories
- Other
Jump to
- Read‑only by default; writes are opt‑in and guarded.
- Built‑in tools: search, read topics/posts, list categories/tags, filter topics.
- Write tools: create posts, topics, categories, and users (when enabled).
- Supports Admin API Keys and User API Keys for authentication.
- Rate‑limited writes (~1 req/sec) with retries on 429/5xx.
- Remote Tool Execution API for additional dynamic tools.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Discourse Mcp ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Run with npx -y @discourse/mcp@latest (or globally via the discourse-mcp binary). Select a site at runtime via the discourse_select_site tool or tether to one using --site <url>. Enable writes with --allow_writes and --read_only=false, providing an API key via --auth_pairs. Configuration can also be stored in a JSON profile file.
discourse_select_site
Validate and select a Discourse site. Returns JSON with site URL and title.
discourse_search
Search site content. Returns JSON object with results array of matching topics (id, slug, title) and meta (total, has_more).
discourse_filter_topics
Filter topics with a concise query language. Returns JSON object with results array (id, slug, title) and meta (page, limit, has_more). Query syntax: category/categories (comma=OR, '=category'=without subcats, '-'=exclude), tag/tags (comma=OR, '+'=AND), status:(open|closed|archived|listed|unlisted|public), in:(bookmarked|watching|tracking|muted|pinned), dates: created/activity-(before|after) YYYY-MM-DD or N days, order: activity|created|latest-post|likes|views with optional -asc.
discourse_read_topic
Read topic metadata and posts. Returns JSON with id, title, slug, category_id, tags, and posts array.
discourse_read_post
Read a specific post. Returns JSON with id, topic_id, post_number, username, created_at, and raw content.
discourse_get_user
Get user info. Returns JSON with id, username, name, trust_level, created_at, bio, admin, and moderator.
discourse_list_user_posts
Get paginated list of user posts/replies. Returns JSON object with posts array (id, topic_id, post_number, slug, title, created_at, excerpt, category_id) and meta (page, limit, has_more).
discourse_list_users
List users via admin API. Requires admin API key. Returns ~100 users per page (Discourse's fixed page size). Returns JSON with users array and pagination meta.
discourse_get_chat_messages
Get messages from a chat channel. Returns JSON object with channel_id, messages array (id, username, created_at, message, edited, thread_id, in_reply_to_id), and meta.
discourse_get_draft
Retrieve a specific draft by key. Returns JSON with draft_key, sequence, and parsed data (title, reply, categoryId, tags, action).
discourse_get_query
Get full details of a Data Explorer query including SQL and parameters. Requires admin API key.
discourse_run_query
Execute a Data Explorer query with parameters. Returns columns, rows, result_count, duration_ms. Queries run in read-only transactions with 10-second timeout. Requires admin API key.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"discourse mcp server": {
"discourse": {
"command": "npx",
"args": [
"-y",
"@discourse/mcp@latest"
],
"env": []
}
}
}
}
McpServers
{
"discourse": {
"command": "npx",
"args": [
"-y",
"@discourse/mcp@latest"
],
"env": []
}
}
Discourse MCP
A Model Context Protocol (MCP) stdio server that exposes Discourse forum capabilities as tools for AI agents.
- Entry point: src/index.ts → compiled to dist/index.js (binary name: discourse-mcp)
- SDK: @modelcontextprotocol/sdk
- Node: >= 18
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 --read_only=false --auth_pairs '[{"site":"https://try.discourse.org","api_key":"'$DISCOURSE_API_KEY'","api_username":"system"}]'
- 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": [] }
> }
> }
> Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



