Discourse MCP Server

Node.js server implementing Model Context Protocol (MCP) for Discourse search operation.

Local serverstdio

What is the Discourse MCP server?

Node.js server implementing Model Context Protocol (MCP) for Discourse search operation. The discourse mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 3 defined tools rather than through you.

What it actually does

  • Search Posts on a Discourse forum using MCP protocol

Its toolset

Everything the assistant can do here goes through one of these:

  • search_posts — Search posts on a Discourse forum
  • Input — query (string)
  • Tools — The Tools tool exposed by this server

Configuration

You will need 3 environment variables: DISCOURSE_API_URL, DISCOURSE_API_KEY, DISCOURSE_API_USERNAME. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

When to reach for it

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Discourse's toolset — search_posts, Input, Tools — is a fair guide to whether it matches your workflow. It is maintained by AshDevFr; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Discourse's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the discourse mcp server does with a few real requests.

Available tools

ToolWhat it does
search_postsSearch posts on a Discourse forum
Inputquery (string)
ToolsThe Tools tool exposed by this server.

How to install the Discourse MCP server

{
  "mcpServers": {
    "discourse": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "DISCOURSE_API_URL=https://try.discourse.org",
        "-e", "DISCOURSE_API_KEY=1234",
        "-e", "DISCOURSE_API_USERNAME=ash",
        "ashdev/discourse-mcp-server"
      ]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
DISCOURSE_API_URLEndpoint or connection string the server talks to.Yes
DISCOURSE_API_KEYCredential the server authenticates with.Yes
DISCOURSE_API_USERNAMEConfiguration value read at startup.Optional

Example prompts to try

  • Use Discourse to search posts.
  • Use Discourse to Input.
  • Use Discourse to Tools.

Frequently asked questions

It connects Discourse to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (search_posts, Input, Tools) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Discourse directly.