lesswrong-mcp CLAUDE.md

A read-only MCP server for LessWrong and the Alignment Forum, two related discussion websites. It exposes tools for reading their content without requiring sign-in and deliberately does not support editing drafts.

In plain words
What is it for?
Use it to search or read LessWrong and Alignment Forum material through the server's tools, using either site's base URL.
Why use it?
It gives agents a controlled way to retrieve forum content while preventing write operations to those sites.

Instructions file

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/seankessinger/lesswrong-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/seankessinger/lesswrong-mcp
Per session 2,682 This file is loaded in full into every session.
When invoked 2,682 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.02682 $0.02682
Opus 5 $0.01341 $0.01341
Sonnet 5 $0.00536 $0.00536
Haiku 4.5 $0.00268 $0.00268

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

Security

Grade A, and why

lesswrong-mcp CLAUDE.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.

CLAUDE.md · 160 lines

How it starts

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

CLAUDE.md — lesswrong-mcp

Guidance for Claude Code working in this repo. Read this first; it captures the architecture, the two backends, the test command, and the backend caps that aren't obvious from any single function.

What this is

A read-only MCP server exposing LessWrong and the Alignment Forum as tools. Both sites are the same open-source ForumMagnum app sharing one database, so a single server covers both by switching the base URL (SITE_BASE_URLS). No auth is needed for reads. Everything is strictly read-only — the forum's draft-editing POST endpoints are intentionally not wrapped.

Layout

The server is a small package — lesswrong_mcp/, FastMCP, Python ≥3.10, 8 tools, launched via python -m lesswrong_mcp. It was split from a single module into focused submodules, each importing only from lower layers (leaf → root), behind a re-exporting __init__.py facade:

  • config.py — constants, the six enums, version/USER_AGENT, _base(). Pure leaf; imports nothing from the package.
  • markdown.py — pure text/reference helpers: _handle_error, _md_inline, _slice_markdown, _extract_*_ref, _seg.
  • http_client.py — all network I/O + per-loop lifecycle: _request, _get_markdown, _graphql, _resources/_aclose_client/_lifespan, the SSRF guard _block_offsite_redirect.
  • graphql_resolve.py_resolve_id / _resolve_user_id / _resolve_tag_id (slug → _id).
  • server.py — the mcp singleton (wired to the http_client lifespan), _READONLY, SiteParam, the _tool_errors funnel. Must NOT import tools.
  • tools.py — the 8 @mcp.tool handlers + the /health route; importing it registers them on mcp.
  • cli.pymain() + _configure_http; __main__.py delegates here.

Read the full file on GitHub · 160 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 · 160 lines · 2,682 tokens per session scan A 3329f7c72be7

Subscribe to this mod's changes

lesswrong-mcp CLAUDE.md is an instructions file published in the GitHub repository seankessinger/lesswrong-mcp (3 stars, last pushed 2mo ago), licensed MIT. It adds 2,682 tokens to every session, about $0.0134 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.