gitlab-forum-mcp AGENTS.md

Documentation for a Discourse MCP server, a local program that lets AI agents use tools to read and interact with Discourse forums. It explains site selection, authentication, permissions, available tools, and the server's TypeScript entry point.

In plain words
What is it for?
Setting a target Discourse site, enabling public or authenticated access, checking permissions, running the server, and learning how its forum tools and outputs are structured.
Why use it?
It helps developers understand how the forum connection works and what access an agent will have before configuring or using it.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/ahnmichael/gitlab-forum-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/ahnmichael/gitlab-forum-mcp

Made for: Codex, OpenCode.

Per session 1,753 This file is loaded in full into every session.
When invoked 1,753 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.01753 $0.01753
Opus 5 $0.00877 $0.00877
Sonnet 5 $0.00351 $0.00351
Haiku 4.5 $0.00175 $0.00175

Measured 2d ago against content hash 8af056ee741d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gitlab-forum-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 2d 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

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 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 · 102 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. 2d ago First seen · 102 lines · 1,753 tokens per session scan A 8af056ee741d

Subscribe to this mod's changes

gitlab-forum-mcp AGENTS.md is an instructions file published in the GitHub repository ahnmichael/gitlab-forum-mcp (0 stars, last pushed 11mo ago), licensed MIT. It adds 1,753 tokens to every session, about $0.0088 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

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,104 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,182 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,345 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

next.js 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