MCP for Flarum
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP for Flarumsearch for discussions about AI"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP for Flarum
A Model Context Protocol server for Flarum.
It gives any MCP-compatible AI client (Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Zed, and others) full access to a Flarum forum's API: read and search discussions and posts, create threads and replies, manage users, tags and groups, moderate content, change settings, and call any third-party extension endpoint.
Flarum's whole API is uniform JSON:API, so a small set of generic tools covers the entire surface, including extensions, rather than hundreds of hand-written ones.
Tools
Generic (full API coverage):
Tool | What it does |
| List/search any resource type with filters, includes, sort, pagination |
| Fetch one resource by type and id |
| Create any resource |
| Update any resource (also lock/sticky/approve for moderation) |
| Delete any resource |
| Raw escape hatch for any endpoint |
Convenience:
Tool | What it does |
| Forum info + the user the API key acts as |
| Full-text discussion search |
| Start a thread (title + content + optional tags) |
| Reply to a discussion |
Related MCP server: CustomGPT MCP Server
Configuration
Variable | Required | Description |
| yes | Your forum's base URL, e.g. |
| for writes / private data | A Flarum API key (from the |
| optional | Act as this user id when using a master API key |
| optional |
|
| optional | Request timeout in ms (default 30000) |
Getting an API key
Flarum has no admin UI for API keys yet. Create one directly in the database:
INSERT INTO api_keys (`key`, user_id, created_at)
VALUES (REPLACE(UUID(), '-', ''), 1, NOW());Use the resulting key as FLARUM_API_KEY. Setting user_id (or FLARUM_USER_ID) makes the key act as that user, so its permissions are exactly that user's permissions.
Install & run
Self-host it with the official Docker image, or build it from source. (It is intentionally not published to npm.)
Option 1: Docker (recommended)
For a local Claude client (stdio):
docker run -i --rm \
-e FLARUM_URL=https://discuss.example.com \
-e FLARUM_API_KEY=xxxxx \
ghcr.io/linkrobins/mcp-for-flarumClaude Code:
claude mcp add flarum -- docker run -i --rm -e FLARUM_URL=https://discuss.example.com -e FLARUM_API_KEY=xxxxx ghcr.io/linkrobins/mcp-for-flarumClaude Desktop / Cursor / Windsurf (JSON config):
{
"mcpServers": {
"flarum": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "FLARUM_URL", "-e", "FLARUM_API_KEY", "ghcr.io/linkrobins/mcp-for-flarum"],
"env": {
"FLARUM_URL": "https://discuss.example.com",
"FLARUM_API_KEY": "xxxxx"
}
}
}
}Option 2: From source (no Docker)
git clone https://github.com/linkrobins/mcp-for-flarum.git
cd mcp-for-flarum
npm install && npm run build
FLARUM_URL=https://discuss.example.com FLARUM_API_KEY=xxxxx node dist/index.jsThen point your client's command at node /absolute/path/to/mcp-for-flarum/dist/index.js.
Prefer not to run anything?
A managed, hosted version is offered by Link Robins, no install, no key management, and usable from web clients. See linkrobins.com.
Hosting (HTTP transport)
The same binary can run as a long-lived web service over Streamable HTTP, so you can host it instead of running it locally. This is what web-based clients (which can't spawn a local process) connect to.
Start in HTTP mode with --http (or MCP_TRANSPORT=http):
FLARUM_URL=https://discuss.example.com \
FLARUM_API_KEY=xxxxx \
MCP_AUTH_TOKEN=a-long-random-secret \
PORT=3000 \
node dist/index.js --httpIt serves:
POST /mcp— the MCP endpoint (Streamable HTTP, stateless)GET /health— health check for load balancers / uptime monitors
Hosting-specific configuration:
Variable | Default | Description |
|
| Set to |
|
| HTTP port |
|
| Bind address. Fails closed: it refuses to bind a non-localhost address unless |
| (none) | If set, requests must send |
Security: a hosted instance can read, write, and delete on the forum its key targets. Always run it behind TLS, set
MCP_AUTH_TOKEN(or front it with your own auth/OAuth proxy), and give the API key's user the least privilege it needs. The Flarum API key stays server-side and is never exposed to clients.
Docker (hosted mode)
docker run -p 3000:3000 \
-e MCP_TRANSPORT=http \
-e HOST=0.0.0.0 \
-e FLARUM_URL=https://discuss.example.com \
-e FLARUM_API_KEY=xxxxx \
-e MCP_AUTH_TOKEN=a-long-random-secret \
ghcr.io/linkrobins/mcp-for-flarumHOST=0.0.0.0 is needed so the published port is reachable; the server only allows it because MCP_AUTH_TOKEN is set.
Or use the included docker-compose.yml: set your values and docker compose up -d.
Development
npm install
npm run build
FLARUM_URL=... FLARUM_API_KEY=... node dist/index.jsLicense
Source-available and proprietary. Copyright (c) 2026 Link Robins. You may self-host and run it for your own use; you may not redistribute it or provide it to others as a hosted service. Link Robins is the only entity permitted to offer it as a hosted service. See LICENSE for the full terms.
Trademarks
Flarum is a trademark of the Flarum Foundation. This is an independent project that works with Flarum via its API; it is not affiliated with, endorsed by, or sponsored by the Flarum Foundation.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/linkrobins/mcp-for-flarum'
If you have feedback or need assistance with the MCP directory API, please join our Discord server