discourse-mcp: Instructions file for Codex

AGENTS.md

discourse-mcp AGENTS.md is an instructions file for Codex, OpenCode from king-of-the-grackles/discourse-mcp. It costs 1,755 tokens per session, scanned A, a copy of gitlab-forum-mcp AGENTS.md, MIT.

Repository instructions for a server that lets AI assistants use Discourse forums through tools. Discourse is forum software used to host online communities, and MCP is a standard way to expose those tools to an assistant.

In plain words
What is it for?
Developing discourse-mcp, including connecting to Discourse sites, reading public data, handling credentials, and working with its built-in forum tools.
Why use it?
They explain site selection, authentication, permissions, and which forum actions are available or restricted.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is king-of-the-grackles/discourse-mcp's own configuration. It tells Codex and OpenCode how to work on discourse-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything discourse-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to king-of-the-grackles/discourse-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/king-of-the-grackles/discourse-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/king-of-the-grackles/discourse-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for discourse-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/king-of-the-grackles/discourse-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/king-of-the-grackles/discourse-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/king-of-the-grackles/discourse-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/king-of-the-grackles/discourse-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for discourse-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/king-of-the-grackles/discourse-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/king-of-the-grackles/discourse-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,755 This file is loaded in full into every session.
When invoked 1,755 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01755 $0.01755
Opus 5 $0.00877 $0.00877
Sonnet 5 $0.00351 $0.00351
Haiku 4.5 $0.00176 $0.00176

Measured 11d ago against content hash be1264655dc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

discourse-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to gitlab-forum-mcp AGENTS.md — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Discourse MCP — Agent Guide

What this is

  • Purpose: An MCP (Model Context Protocol) stdio server that exposes Discourse forum capabilities as tools for AI agents.
  • Entry point: src/index.ts → compiled to dist/index.js (binary name: discourse-mcp).
  • SDK: @modelcontextprotocol/sdk. Node ≥ 18.

How it works

  • On start, the server validates CLI flags via Zod, constructs a dynamic site state, and registers tools on an MCP server named @discourse/mcp.
  • Choose a target Discourse site by either:
    • Calling the discourse_select_site tool (validates via /about.json), or
    • Starting with --site <url> to tether to a single site (validates via /about.json and hides discourse_select_site).
  • Outputs are text-oriented; some tools embed compact JSON in fenced code blocks for structured extraction.

Authentication & permissions

  • Supported auth:
    • None (read-only public data)
    • Per-site overrides via --auth_pairs, e.g. [{"site":"https://example.com","api_key":"...","api_username":"system"}].
  • Writes are disabled by default. Write tools (discourse_create_post, discourse_create_topic, discourse_create_category, discourse_create_user) are only registered when all are true:
    • --allow_writes AND not --read_only AND a matching auth_pairs entry exists for the selected site.
  • Secrets are never logged; config is redacted before logging.

Tools exposed (built-in)

  • discourse_search
    • Input: { query: string; with_private?: boolean; max_results?: number (1–50, default 10) }
    • Output: Top topics with titles and URLs; appends a JSON footer of { results: [{ id, url, title }] } inside a fenced block.
  • discourse_read_topic
    • Input: { topic_id: number; post_limit?: number (1–20, default 5); start_post_number?: number }
    • Output: Title, category, tags, and the first N posts (raw preferred when available) up to the configured max read length per post; includes canonical topic link.
  • discourse_read_post
    • Input: { post_id: number }
    • Output: Author, timestamp, content (raw preferred) truncated to the configured max read length, and a direct link.
  • discourse_list_categories
    • Input: {}
    • Output: Category names with topic counts.
  • discourse_list_tags
    • Input: {}
    • Output: Tags with usage counts (or notice if tags are disabled).
  • discourse_get_user
    • Input: { username: string }
    • Output: Display name, trust level, joined date, short bio, and profile link.
  • discourse_filter_topics
    • Input: { filter: string; page?: number; per_page?: number (1–50) }
    • Output: Paginated topic list with titles and URLs; appends a JSON footer { page, per_page, results: [{ id, url, title }], next_url? }.
    • Query language: key:value tokens separated by spaces; category/categories (comma = OR, =category = without subcats, - exclude); tag/tags (comma = OR, + = AND) and tag_group; status:(open|closed|archived|listed|unlisted|public); personal in: (bookmarked|watching|tracking|muted|pinned); dates created/activity/latest-post-(before|after) as YYYY-MM-DD or N days; numeric likes[-op]-(min|max), posts-(min|max), posters-(min|max), views-(min|max); order: with optional -asc; free text terms allowed.
  • discourse_create_post (conditionally available; see permissions)
    • Input: { topic_id: number; raw: string (≤ 30k chars) }
    • Output: Link to created post/topic. Includes a simple 1 req/sec rate limit.
  • discourse_create_topic (conditionally available; see permissions)
    • Input: { title: string; raw: string (≤ 30k chars); category_id?: number; tags?: string[] }
    • Output: Link to created topic. Includes a simple 1 req/sec rate limit.
  • discourse_create_category (conditionally available; see permissions)
    • Input: { name: string; color?: hex; text_color?: hex; parent_category_id?: number; description?: string }
    • Output: Link to created category. Includes a simple 1 req/sec rate limit.
  • discourse_select_site (hidden when --site is provided)
    • Input: { site: string }
    • Output: Confirms selection; validates via /about.json. Triggers remote tool discovery when enabled.

Read the full file on GitHub · 112 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 112 lines · 1,755 tokens per session scan A be1264655dc9

Subscribe to this mod's changes

discourse-mcp AGENTS.md is an instructions file published in the GitHub repository king-of-the-grackles/discourse-mcp (0 stars, last pushed 2mo ago), licensed MIT. It adds 1,755 tokens to every session, about $0.0088 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to gitlab-forum-mcp AGENTS.md, differing in 12 lines, and is treated as a copy.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,126 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens