rfc-mcp
v0.3.0
Published
MCP server over a knowledge base written by rfc-extract
Maintainers
Readme
rfc-mcp
A stdio MCP server over a knowledge base written by rfc-extract. It reads the
markdown on disk and holds no index, so it cannot go stale.
Installing this gets you rfc-extract too, since the extract_rfc tool runs the real pipeline.
Install
Needs Node 22 or newer.
Claude Code:
claude mcp add rfc -- npx -y rfc-mcpOr by hand, in an MCP client config:
{
"mcpServers": {
"rfc": {
"command": "rfc-mcp"
}
}
}--kb-root defaults to $RFC_KB_ROOT, else $XDG_DATA_HOME/rfc-kb, else ~/.local/share/rfc-kb,
which is the same place rfc-extract writes to. Your client picks the working directory this
process starts in, so a relative path here resolves somewhere you probably didn't intend. Prefer the
default, or pass an absolute path. A leading ~/ is expanded, since args never goes through a
shell.
Tools
| Tool | Returns |
| --- | --- |
| list_rfcs | every RFC in the KB with tier and extraction date |
| get_section(rfc, section) | one section's markdown, by number (2.1) or file stem |
| search_kb(query, rfc?) | literal case-insensitive matches in extracted prose, with file, line, and snippet |
| search_catalog(query, {status?, stream?, wg?, since?, until?, current?, limit?}) | matching RFCs from the published index, ranked |
| get_requirements(rfc, {section?, keyword?}) | BCP 14 requirement records |
| get_abnf(rfc) | merged grammar plus each source block |
| get_examples(rfc, {section?, kind?}) | example blocks, filterable by section or kind |
| extract_rfc(url) | runs the pipeline and returns the run summary |
search_kb is literal substring matching over extracted prose, not semantic. If a keyword search comes up empty, the answer
is usually to read the section. extract_rfc is the only tool with side effects: it fetches over
the network and writes under --kb-root. It never touches notes/.
search_catalog is the one tool that works with an empty KB. It searches the RFC Editor's index of
every published RFC, so it answers "which RFC is this?" and gives you a number to hand to
extract_rfc. Its abstracts are truncated to 300 characters; extract the RFC for the full text.
rfc arguments have to look like a KB directory name (rfc9421). Anything else is refused before
a path is built, because every read here is a path built from a caller's string.
Format
The KB layout this server reads is documented in docs/kb-format.md.
Unstable until 1.0. This package and rfc-extract are versioned in lockstep and released together,
so mixing versions takes deliberate effort.
Changelog
CHANGELOG.md, at the repo root, covers both packages.
License
MIT, for this code. The KBs it serves are derived from copyrighted RFCs; see the licensing note in
rfc-extract and the copyright block in each KB's meta.json.
rfc-mcp is an independent tool. It is not affiliated with, endorsed by, or sponsored by the IETF,
the IETF Trust, or the RFC Editor.
