Skip to content

Commit cc796e7

Browse files
committed
Document flarum_troubleshoot and the prompts; welcome commercial use
Auditing the README against the source turned up features that ship enabled by default but appear nowhere in it: the flarum_troubleshoot tool, its FLARUM_TROUBLESHOOT switch, and all four prompts. Someone reading the README had no way to know they existed. Also build the image for arm64, not just amd64. Apple Silicon is a large share of the machines these clients run on, and they were falling back to emulation with a platform-mismatch warning. The licence section now says plainly that commercial and hosted use need no permission, since MIT allowing it isn't obvious to everyone reading a repo that until today advertised a paid managed tier.
1 parent 6a11f15 commit cc796e7

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/docker-publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
packages: write
1616
steps:
1717
- uses: actions/checkout@v5
18+
# Emulation for the arm64 build. Apple Silicon is a large share of the
19+
# machines these MCP clients run on, and an amd64-only image leaves them
20+
# emulating with a platform-mismatch warning.
21+
- uses: docker/setup-qemu-action@v3
1822
- uses: docker/setup-buildx-action@v4
1923
- uses: docker/login-action@v4
2024
with:
@@ -32,6 +36,7 @@ jobs:
3236
with:
3337
context: .
3438
push: true
39+
platforms: linux/amd64,linux/arm64
3540
tags: ${{ steps.meta.outputs.tags }}
3641
labels: ${{ steps.meta.outputs.labels }}
3742

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ A development reference for building or reviewing a Flarum 2.0 extension: scaffo
4949
| --- | --- |
5050
| `flarum_dev` | Returns the extension-development reference; optional `topic` (scaffold, composer, frontend, backend, i18n, testing, quality-ci, release) to narrow it |
5151

52+
**Troubleshooting (on by default):**
53+
54+
Plain-language help for a broken or misbehaving forum, aimed at admins rather than developers: safe first-aid fixes, how to run `php flarum info` and find your logs on typical hosting, what the common errors actually mean, and how to write a redacted support request. Static knowledge that needs no server access, so it works in any mode, including read-only and with no API key. Turn it off with `FLARUM_TROUBLESHOOT=0`.
55+
56+
| Tool | What it does |
57+
| --- | --- |
58+
| `flarum_troubleshoot` | Returns the troubleshooting guide; optional `topic` (first-aid, info, logs, common, report) to narrow it |
59+
5260
**Extension management (opt-in, off by default):**
5361

5462
Registered only when `FLARUM_EXTENSIONS=1` and the forum has the official [`flarum/extension-manager`](https://github.com/flarum/extension-manager) installed. These drive Composer on the server, so they need an admin key and write mode. See [Managing extensions](#managing-extensions).
@@ -77,6 +85,19 @@ Two capabilities stay inactive unless you point them at a service that answers t
7785

7886
Every other tool above (generic, convenience, docs, dev, and extension management) works out of the box with no such backend.
7987

88+
## Prompts
89+
90+
The server also ships prompts: named, ready-made workflows that chain the right tools in the right order, so you don't have to describe the whole job yourself. Clients surface them in their own way (Claude Code lists them as slash commands, Claude Desktop under the prompts menu).
91+
92+
| Prompt | What it does |
93+
| --- | --- |
94+
| `build-flarum-extension` | Scaffolds and builds a Flarum 2.0 extension, following the `flarum_dev` contracts |
95+
| `review-flarum-extension` | Reviews existing extension code against those same contracts |
96+
| `check-flarum-compatibility` | Checks an extension against real production stacks (queue drivers, Redis, multi-server, sub-path URLs) |
97+
| `prepare-flarum-support-request` | Assembles a redacted support request from a forum that still loads |
98+
99+
The first three come with the extension-development reference (`FLARUM_DEV`), the last with the troubleshooting guide (`FLARUM_TROUBLESHOOT`); disabling either hides its prompts too.
100+
80101
## Configuration
81102

82103
| Variable | Required | Description |
@@ -87,7 +108,8 @@ Every other tool above (generic, convenience, docs, dev, and extension managemen
87108
| `FLARUM_MODE` | optional | `write` (default) or `read`. In `read` mode the server refuses every mutating request (create/update/delete and any non-GET `flarum_request`) and the write tools are hidden. `READ_ONLY=1` does the same. Use it to point an AI at a real forum without risking changes. |
88109
| `FLARUM_EXTENSIONS` | optional | `1`/`true` registers the extension-management tools (install/update/remove extensions via `flarum/extension-manager`). Off by default; requires write mode and an admin key. See [Managing extensions](#managing-extensions). |
89110
| `FLARUM_DOCS` | optional | On by default. Set `0`/`false`/`off` to hide the official-docs tools (`flarum_docs_search`/`get`/`list`). They read the public docs only, never your forum. |
90-
| `FLARUM_DEV` | optional | On by default. Set `0`/`false`/`off` to hide the extension-development reference tool (`flarum_dev`). Static guidance; never touches your forum. |
111+
| `FLARUM_DEV` | optional | On by default. Set `0`/`false`/`off` to hide the extension-development reference tool (`flarum_dev`) and its prompts. Static guidance; never touches your forum. |
112+
| `FLARUM_TROUBLESHOOT` | optional | On by default. Set `0`/`false`/`off` to hide the troubleshooting guide (`flarum_troubleshoot`) and its prompt. Static guidance; never touches your forum. |
91113
| `FLARUM_TIMEOUT` | optional | Request timeout in ms (default 30000) |
92114
| `FLARUM_USER_AGENT` | optional | Override the `User-Agent` sent to your forum. Defaults to `mcp-for-flarum/<version> (+repo url)`. See [Behind Cloudflare or a WAF](#behind-cloudflare-or-a-waf). |
93115

@@ -284,6 +306,8 @@ FLARUM_URL=... FLARUM_API_KEY=... node dist/index.js
284306

285307
[MIT](LICENSE) © Link Robins. Free and open source — self-host it, modify it, and use it however you like.
286308

309+
**Commercial and hosted use is welcome, and needs no permission.** Run it for clients, bundle it into a paid product, offer it as a hosted service, fork it, rebrand it: MIT already allows all of that, and there is no separate licence to buy, no key to obtain, and no tier that unlocks anything. Nothing in the code is held back — the two control-plane hooks above are dormant integration points, not a paywall, and you are free to point them at infrastructure of your own. The only ask is the one the licence makes: keep the copyright notice. If you build something with it, I would love to hear about it.
310+
287311
## Trademarks
288312

289313
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.

0 commit comments

Comments
 (0)