rfc — an evidence engine for IETF RFCs
rfc answers questions about published IETF RFCs from the actual specification text. It discovers candidate RFCs through the IETF Datatracker, follows updates and obsoletes relationships, retrieves the canonical RFC Editor source, ranks which RFCs and sections bear on each question, and returns the exact paragraphs with their UTF-8 byte offsets and source hash. It runs as a CLI and as a local Model Context Protocol server, so a coding agent can cite a specification instead of recalling one.
It does retrieval and relevance judgment only; the caller does the reasoning and writes the answer. For each question it reports whether an answer was found, which RFCs were searched, and up to three exact passages per relevant RFC, each labelled supports, partial, says_nothing, or contradicts. Every quotation is a byte range in a hashed source you can re-slice yourself. See ADR 0005 for the design.
[!IMPORTANT]
Status: research preview
The ranking floors and selection limits are uncalibrated working values. The retrieval, provenance, and citation machinery is tested, but a passage the tool did not select is never read, so treat found: false as "not found in these RFCs", not as proof that no RFC says it.
Run
Requires Bun 1.4.2 or newer. The packages ship raw TypeScript and Bun executes it directly. Run the latest published CLI through bunx; no global installation is required.
Store a TypeSafe API key in your OS credential manager — macOS Keychain, Linux Secret Service, or Windows Credential Manager. The key is never accepted as a command-line argument.
bunx @wyattjoh/rfc@latest auth login # prompts, or use --stdin for automation
bunx @wyattjoh/rfc@latest auth
Quickstart
Human invocations print readable output by default. Repeat -q once per fact you need, and name RFCs with -r or discover them with --search-term:
bunx @wyattjoh/rfc@latest research \
-q "What does the 429 status code mean?" \
-q "Which header says how long to wait?" \
-r RFC6585 -r RFC9110
bunx @wyattjoh/rfc@latest research -q "How long may a cache reuse a response?" \
--search-term "HTTP caching"
bunx @wyattjoh/rfc@latest verify-citation RFC9110 \
"A client must send a target resource." \
"The client MUST send a request containing the target resource."
bunx @wyattjoh/rfc@latest cache status RFC9110
bunx @wyattjoh/rfc@latest costs
The equivalent long flags are available, including --question, --rfc, --claim, and --quote. Pass --format json when a human-style invocation needs machine-readable output.
Agents and programs can send the version-three JSON protocol on standard input. Structured standard input selects JSON output by default:
echo '{"schemaVersion":3,"questions":["What must a client send in a request?"],"rfcs":["RFC9110"]}' \
| bunx @wyattjoh/rfc@latest research
echo '{"schemaVersion":3,"questions":["How long may a cache reuse a response?"],"searchTerms":["HTTP caching"]}' \
| bunx @wyattjoh/rfc@latest research
echo '{"schemaVersion":3,"rfc":"RFC9110","claim":"A client must send a target resource.","quote":"The client MUST send a request containing the target resource.","offset":null}' \
| bunx @wyattjoh/rfc@latest verify-citation
Errors remain versioned JSON envelopes on standard error for both input styles.
Install the Claude Code plugin
The repository is a Claude Code marketplace containing the rfc plugin. The plugin bundles the RFC lookup skill and starts the latest published MCP server through bunx, so Bun 1.4.2 or newer must be available:
claude plugin marketplace add wyattjoh/rfc
claude plugin install rfc@wyattjoh-rfc --scope user
Enabling the plugin prompts for your TypeSafe API key. Claude Code stores it in the system credential store and passes it only to the MCP server process as RFC_TYPESAFE_API_KEY; the model never sees it. Change it later from /plugin → Installed → Configure options, or with claude plugin configure rfc@wyattjoh-rfc.
The plugin exposes the MCP tools automatically and registers the skill as /rfc:rfc-lookup. For local development, validate and load the checkout directly:
claude plugin validate . --strict
claude --plugin-dir .
Install the Pi package