kafen-mcp
Enables AI agents to read and browse a Discourse forum, including listing topics and categories, reading topic posts as Markdown, searching with Discourse filters, viewing user profiles and notifications, and fetching images from posts.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
kafen-mcp
An MCP server that lets AI agents read 卡粉论坛 DocOfCard, a Discourse forum about credit cards, banking and payments.
The forum requires an account to read anything. kafen-mcp signs in with a Discourse User API key issued through the forum's own device authorization page: you approve it once in your browser, and the key is limited to the read scope, so the server can browse but never post, like, or change settings.
Tools
Tool | What it does |
| Latest / new / unread / top / hot feeds, optionally filtered by category and tag, paginated |
| A topic's posts as Markdown (author, time, reply target, likes, reactions, polls); accepts ids or URLs and pages by post number |
| Full-text search with Discourse filters ( |
| Category tree with slugs, ids, topic counts and descriptions |
| Profile, stats, bio and recent topics/replies of a user |
| The signed-in account's notifications (does not mark them read) |
| Fetches a screenshot or image from a post and returns it to the model |
| Start the browser authorization from inside the agent and check which account is active |
Post HTML is converted to compact Markdown: images link to the original upload (with the forum's AI caption as alt text when available), quotes name their source post, and oneboxes collapse to a titled link.
Related MCP server: Discourse MCP
Setup
Requires Node.js 22 or newer.
git clone https://github.com/ChrAlpha/kafen-mcp.git
cd kafen-mcp
pnpm install
pnpm buildAuthorize
node dist/cli.mjs loginThe command prints a link and a confirmation code. Open the link in a browser where you are logged in to the forum, check the code, and click Authorize. The key is stored in $XDG_CONFIG_HOME/kafen-mcp/credentials.json (usually ~/.config/kafen-mcp/, %APPDATA%\kafen-mcp\ on Windows) with 0600 permissions.
You can skip this step and let the agent call the login tool instead; it returns the same link and code for you to open, and auth_status waits for the approval.
node dist/cli.mjs status # which account is active
node dist/cli.mjs logout # revoke the key on the forum and delete it locallyThe key also appears under Preferences → Apps on your forum profile (/my/preferences/apps), where it can be revoked at any time.
Register with an MCP client
Claude Code:
claude mcp add kafen -- node /absolute/path/to/kafen-mcp/dist/cli.mjsClaude Desktop, Cursor and other clients that use an mcpServers JSON block:
{
"mcpServers": {
"kafen": {
"command": "node",
"args": ["/absolute/path/to/kafen-mcp/dist/cli.mjs"]
}
}
}Codex (~/.codex/config.toml):
[mcp_servers.kafen]
command = "node"
args = ["/absolute/path/to/kafen-mcp/dist/cli.mjs"]Configuration
Variable | Default | Purpose |
|
| Forum to read; any Discourse site with user API keys enabled works |
|
| Where |
| — | Use this key instead of the credential store (for CI or containers) |
|
| Client id the key in |
Rate limits
Discourse allows about 50 requests per minute and 4,000 per day for each User API key. The client keeps itself under 45 requests per minute, waits out short 429 responses once, and reports longer waits to the agent instead of blocking. Most tools cost one request; read_topic with a large limit and get_user cost up to three.
Development
pnpm typecheck
pnpm test # unit tests
pnpm build && KAFEN_E2E=1 KAFEN_BASE_URL=https://meta.discourse.org pnpm test e2eThe end-to-end suite drives the built server over stdio against a live forum. To run it against DocOfCard, log in first and pass the same KAFEN_MCP_CONFIG_DIR.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search and page-reading for AI agents. One-click OAuth connect, or a Caesar API key.
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
Query Reddit communities, posts, brands and trends from your AI agent. OAuth 2.1.
1Search or monitor any Flarum-powered forum for discussions, replies, participants, dates, and…
Related MCP Servers
AlicenseAqualityCmaintenanceEnables AI agents to interact with Discourse forums through search, reading topics/posts, managing categories and users. Supports secure authentication and optional write operations with rate limiting.1429,326 npm79MIT- AlicenseAqualityDmaintenanceEnables AI agents to interact with Discourse forums through search, reading topics/posts, managing categories and tags, chat channels, and optionally creating content with safeguarded write operations.1529,326 npmMIT
- FlicenseAqualityCmaintenanceEnables an AI agent to read and act on a single Discourse forum as one user, including posting, private messages, likes, reactions, bookmarks, watch/track/mute, and reading its own notifications via a stdio MCP server.8-
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to read public forum threads, start discussions, and post replies via HTTP and JSON, with optional authenticated write access.MIT