
Iana Registries Mcp Server
io.github.cyanheadsv0.1.1更新于 Oct 1, 2026
Find IANA ports, MIME types, HTTP codes/fields, URI schemes, PENs, BCP 47 tags, RFCs, any registry.
概览
让助手查询 IANA 注册表数据,如端口、媒体类型、HTTP 状态码与字段、URI 方案、PEN 和 BCP 47 语言标签,以及 RFC 与草案状态。
- 功能
- 提供十个查询工具,覆盖 IANA 协议注册表:端口与服务名、媒体(MIME)类型、HTTP 状态码与字段、URI 方案、私有企业编号(PEN)以及 BCP 47 语言标签。还可从 RFC Editor 和 IETF Datatracker 获取 RFC 与 Internet-Draft 的状态,并能搜索和读取 IANA 协议索引中的任意注册表。RFC 相关结果仅为元数据,服务器不会返回 RFC 正文。
- 适用场景
- 当助手需要权威的协议常量或文档状态时适用:确认某端口归属哪个服务、某媒体类型或 HTTP 字段是现行还是已弃用、校验语言标签,或确认某 RFC 是否被废弃或更新。它是参考资料查询工具,不是通用网页搜索。
- 运行要求
- 通过 npm 以本地 stdio 进程(或本地 Streamable HTTP 服务)运行,需要 Bun v1.4.0+ 或 Node.js v24+。无需 API 密钥或账号,上游数据源均无需密钥。需要访问 iana.org、rfc-editor.org 和 datatracker.ietf.org 的网络连接。可选框架变量包括 MCP_TRANSPORT_TYPE、MCP_HTTP_PORT、MCP_HTTP_HOST、MCP_HTTP_ENDPOINT_PATH、MCP_AUTH_MODE 和 MCP_LOG_LEVEL。
安装
在 SourceWeft 中
- 打开 控制台中的 Iana Registries Mcp Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@cyanheads/iana-registries-mcp-server
Look up IANA ports, media types, HTTP status codes and fields, URI schemes, enterprise numbers, and BCP 47 language tags; check RFC status; search and read any IANA registry via MCP. STDIO or Streamable HTTP.
Overview
Protocol parameters from the IANA registries, and document status from the RFC Editor and the IETF Datatracker. Look up ports, media types, HTTP status codes and fields, URI schemes, Private Enterprise Numbers, and BCP 47 language tags; check whether an RFC is current, obsoleted, or updated, and where an Internet-Draft stands; and search and read any other registry in the IANA protocol index. RFC answers are metadata only: the server never returns RFC text. Runs as a stdio process or a local Streamable HTTP server.
Tools
Capability reference
iana_lookup_port tool
- One of
port(0–65535),service(exact name), orkeyword;transport(tcp,udp,sctp,dccp) filters every mode - Each row carries
state(assigned,reserved,unassigned,unnamed) and its transport; port mode addsport_class(system,user,dynamic) and the range rows that contain the port
iana_lookup_media_type tool
- One of
type(e.g.application/json; parameters after;are dropped) orkeyword;top_levelnarrows keyword mode statusiscurrent,deprecated, orobsoleted, withreplaced_bywhen the registry names a replacementtypemode also reads the registration template and returns its file-extension, intended-usage, and deprecated-alias statements undertemplate;template.fetchedisfalsewhen the template can't be read
iana_lookup_http_status tool
- One of
code(100–599) orkeywordover registered reason phrases - Returns
classandstate(assigned,temporary,obsoleted,unused) with the defining reference and section; an unassigned code returnsfound: falseand itsunassigned_range
iana_lookup_http_field tool
- One of
name(case-insensitive) orkeywordover names and comments;statusfilters both modes - Returns
status(permanent,provisional,deprecated,obsoleted),structured_typewhen one is registered, comments, and the defining reference
iana_lookup_uri_scheme tool
- One of
scheme(a trailing:or://is ignored) orkeyword;status(permanent,provisional,historical) filters both modes - Returns the description, references,
well_known_uri_support, andtemplate_urlwhen a registration template is published
iana_lookup_pen tool
- One of
pen(a number, or an OID under1.3.6.1.4.1) ororganizationwords - Each entry carries its
oidprefix andstate(assigned,reserved,unassigned);organization_withheld: truemarks an organization line held back because it mixes in contact details - An OID with arcs below the enterprise number echoes
requested_oidandsub_arcs; those arcs are assigned by the enterprise, not IANA
iana_lookup_language_tag tool
- One of
tag(underscores read as hyphens) ordescription;subtag_typenarrows description mode - Tag mode returns
well_formed,valid,canonical_tag(valid tags only), each part insubtags[], andissues[]:kindunknownandwrong_positionmake a tag invalid, whiledeprecated,variant_prefix_mismatch,suppress_script_redundant, andextension_not_validatedare advisory - A single-subtag input lists records of other types under the same subtag in
also_registered_as
iana_get_rfc_status tool
- Up to 10
idsper call: RFC numbers in any common form, RFC Editor or Datatracker URLs, and draft names with or without a revision suffix; BCP, STD, and FYI numbers come back askind: "unsupported" documents[]gives RFCs their current and as-published status, stream, group, obsoletes and updates relations, and errata page, and gives drafts their state, IESG state, replacements, andbecame_rfc; an unknown id isfound: falsewithguidance- An id whose upstream lookup fails lands in
failed[]while the rest still answer; the call fails only when every id failed
iana_search_registries tool
querywords matched against registry titles, categories, and ids, with an exact registry or sub-registry id ranked first;limit1–50, default 15, paged byoffset- Each entry carries the
registry_idandsubregistry_idthatiana_get_registry_recordsreads, plus registration procedure, defining documents, and page and XML URLs
iana_get_registry_records tool
- A
registryid oriana.org/assignmentsURL, optionalsubregistry, and filtersvalue(exact match on the key column; a decimal also matches range rows) andcontains(words in any field) - Pages by
cursor/next_cursorwithinlimit(1–100, default 25) and a 48,000-character records budget; a field over 2,000 characters is cut, a record keeps at most 16 fields, andcut_fieldsnames what was cut - A registry with several sub-registries and none chosen returns
subregistries[]instead of records; failures carryunknown_registry,unknown_subregistry,non_xml_registry,invalid_cursor, orcursor_mismatch
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
IANA-specific:
- Live, keyless reads of the IANA registry files, the RFC Editor's per-RFC JSON, and the IETF Datatracker
- Each registry loads on first use and stays cached for 24 hours before revalidating; when a refresh fails, a cached copy up to 7 days old answers with
source.stale: true - Self-imposed request pacing per host (iana.org, rfc-editor.org, datatracker.ietf.org) and one 45-second budget per tool call that covers every retry and queue wait
- Generic records keep the registry's XML element names as field names (
recis the Recommended column); the registry notes returned on the first page usually explain them - Contact, designated-expert, and registrant-person fields are dropped by design, and email addresses in free text are replaced with
[email removed]
Agent-friendly output:
- Misses are results, not errors: a lookup that finds nothing returns
found: falsewith anoticenaming the next step, an unknown RFC or draft returnsfound: falsewithguidance, and an invalid language tag returnsvalid: falsewith itsissues[]. A miss means IANA has no registration, not that a value is unused in practice - Uniform lookup contract: every lookup takes exactly one mode key and fails
mode_requiredotherwise;limitis 1–100, default 25, and the list modes (keyword,organization,description) page withoffsetand returnnext_offset, alongsidetotalCount,shown, andtruncated - Provenance on every registry response:
sourcenames the registry file,registry_updated(the registry's own last-updated date),fetched_at, andstale - Typed failures with recovery hints: every tool declares
upstream_unreadable(index_unreadablefor search) andpacer_shed, which carriesretryAfterwhen this server's own request queue is full
Getting started
Add the following to your MCP client configuration file.
Or with npx (no Bun required):
Or with Docker:
For Streamable HTTP, set the transport and start the server:
Prerequisites
- Bun v1.4.0 or higher (or Node.js v24+).
- No API key or account: IANA, the RFC Editor, and the IETF Datatracker are all keyless.
Installation
- Clone the repository:
- Navigate into the directory:
- Install dependencies:
- Configure environment (optional):
Configuration
The server reads no environment variables of its own. These framework settings apply:
See .env.example for the full list of framework overrides.
Running the server
Local development
-
Build and run the production version:
-
Run checks and tests:
Project structure
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor logging; registry text is third-party, soformat()renders it through thequote()andinline()helpers - Register new tools in the barrel at
src/mcp-server/tools/definitions/index.ts - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
IANA and the IETF Trust dedicate the protocol registries to the public domain under CC0 1.0 (licensing terms, joint statement of 10 November 2021). RFC documents are excluded from that statement; this server returns RFC metadata only, never RFC text. This project is independent of IANA, the IETF, and the RFC Editor.
来源:README.md,提交 1b2030f
工具
0版本历史
1- v0.1.1最新Oct 1, 2026

