IETF RFC MCP Server

IETF RFC MCP Server

Provides LLM-based access to IETF documents such as RFCs, Internet-Drafts, STD/BCP/FYI series, and errata through a Model Context Protocol server.

Category
访问服务器

README

IETF RFC MCP Server

A Model Context Protocol server that gives an LLM first-class access to the IETF document corpus — RFCs, Internet-Drafts, the STD/BCP/FYI series and published errata — running on Cloudflare Workers.

Endpoint: https://rfc.banbanlab.xyz/mcp

claude mcp add --transport http ietf-rfc https://rfc.banbanlab.xyz/mcp

For Claude Desktop and other clients:

{
  "mcpServers": {
    "ietf-rfc": {
      "type": "http",
      "url": "https://rfc.banbanlab.xyz/mcp"
    }
  }
}

No authentication — the RFC corpus is public.

Tools

Tool What it does
search_rfcs Find RFCs by title, optionally also abstract
get_rfc_metadata Status, date, authors, abstract, keywords, series membership
list_rfc_sections Section outline with per-section sizes
get_rfc_section One section including its subsections
get_rfc Full text, windowed by offset/limit
resolve_reference BCP 14 → RFC 2119 + RFC 8174; draft names → RFCs
get_rfc_relations Obsoletes/updates, and the chain to the current document
get_rfc_errata Errata with original text, correction and status
search_internet_drafts Work in progress, not yet published as RFCs

RFCs are long — RFC 9110 alone is half a megabyte — so the intended path is list_rfc_sections then get_rfc_section, not get_rfc. The tool descriptions say so, which is what steers the model.

Design

Stateless, so no Durable Object

Cloudflare's own MCP guidance points at McpAgent, which is backed by a Durable Object. Every tool here is a pure lookup with nothing to remember between calls, so the state a Durable Object exists to hold does not exist. The server instead uses the MCP SDK's WebStandardStreamableHTTPServerTransport in stateless mode: Request in, Response out, a fresh server per request.

The practical consequence is that this runs on a plain Worker, with no Workers Paid requirement and one less hop per call.

The index is built offline, not in the Worker

Two things callers want have no per-document endpoint upstream — you can only download the whole dataset:

Dataset Size Provides
rfc-index.xml ~14 MB STD/BCP/FYI membership, draft → RFC mapping
errata.json ~11 MB every erratum ever filed

Parsing either inside a request would exhaust a Worker's CPU budget on every call. scripts/build-index.mjs therefore downloads and reshapes them on a laptop or in CI, and uploads the result to KV. The Worker only ever reads one small value per lookup and never writes.

Errata are sharded by RFC number in blocks of 100. That number falls out of two limits pulling opposite ways: one key per RFC would mean ~2,500 writes per rebuild, over KV's free-tier allowance of 1,000 writes/day, while a single key would put megabytes of JSON.parse back into the request path.

Text parsing is the hard part

The canonical plain-text rendering spans two incompatible eras:

  • Pre-2019 RFCs are paginated — a footer, a form feed and a running header every 58 lines, landing in the middle of sentences.
  • xml2rfc v3 RFCs have no page breaks but are much longer.

src/rfctext.ts normalises both. Splitting on the form feed makes the de-pagination exact: the footer is always the last non-blank line before the break and the header the first after it, so neither has to be pattern-matched against the whole document, where [Page 3] might legitimately appear inside a quoted example.

Section detection keys on headings sitting at column 0, since body prose is always indented. The earliest RFCs break that rule by centring top-level headings — RFC 791 sets 1. INTRODUCTION at column 28 while its body sits at column 2 — so centred lines are accepted too, but only when isolated between blank lines and free of column alignment. Without those extra conditions the rule swallows RFC 9110's status-code registry, RFC 791's bit-pattern tables and RFC 9293's ASCII diagrams.

The parser is checked against nine real RFCs spanning 1981 to 2022, not just synthetic fixtures.

Caching

Every upstream subrequest is pinned to the Cloudflare edge cache via cf.cacheTtl: 30 days for RFC text (immutable once published), 7 days for metadata, 1 hour for search and draft state. Parsed documents are additionally memoised per isolate, capped at four, because section browsing is inherently repetitive — list the outline, then pull two or three sections.

The RFC Editor and the Datatracker are volunteer-run. Being a polite consumer of them is a design requirement, not an optimisation.

Development

npm install
npm test              # parser unit tests
npm run typecheck
npm run dev           # local server at http://localhost:8787

Deployment

npx wrangler kv namespace create RFC_INDEX   # once; put the id in wrangler.jsonc
npm run push-index                           # build and upload the lookup index
npm run deploy

GET /health reports whether the index is present.

The index is refreshed weekly by .github/workflows/refresh-index.yml, which needs a CLOUDFLARE_API_TOKEN repository secret with Workers KV Storage: Edit permission, plus CLOUDFLARE_ACCOUNT_ID.

Data sources and attribution

Data comes from rfc-editor.org and the IETF Datatracker. This project is not affiliated with or endorsed by the IETF, the IETF Trust or the RFC Editor. RFCs themselves are published under the IETF Trust Legal Provisions.

Licence

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选