home / mcp / discourse mcp server
Provides a Discourse search MCP server that queries posts via MCP tool `search_posts` using a live Discourse API.
Configuration
View docs{
"mcpServers": {
"ashdevfr-discourse-mcp-server": {
"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"
],
"env": {
"DISCOURSE_API_KEY": "1234",
"DISCOURSE_API_URL": "https://try.discourse.org",
"DISCOURSE_API_USERNAME": "ash"
}
}
}
}This MCP server lets you search posts on a Discourse forum using the Model Context Protocol. It exposes a simple tool that you can query from your MCP client to retrieve and filter posts, making it easy to build search-driven experiences over Discourse data.
You can access the Discourse search capability from your MCP client by starting the server (via Docker or NPX) and then using the search_posts tool to query posts. The server accepts a query string and returns matching post objects you can display or process in your application. Start the server once, then keep querying it to explore the forum’s content through MCP.
Prerequisites you need before starting:
- Docker (for the Docker-based start) or Node.js with NPM/Yarn (for the NPX-based start).
- Access to a Discourse instance through the API URL and a valid API key and username.Option 1 — Run with Docker Follow this exact command to start the MCP server in a Docker container. It sets the required environment values for connecting to Discourse.
{
"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"
]
}
}
}When using NPX, run this configuration snippet exactly as shown.
{
"mcpServers": {
"discourse": {
"command": "npx",
"args": [
"-y",
"@ashdev/discourse-mcp-server"
],
"env": {
"DISCOURSE_API_URL": "https://try.discourse.org",
"DISCOURSE_API_KEY": "1234",
"DISCOURSE_API_USERNAME": "ash"
}
}
}
}Search posts on a Discourse forum. Input: query string. Returns an array of post objects.