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.

概览

AI 生成的概览

让助手查询 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。
安装前请注意
仅做只读查询,不会写入、发送或删除数据,也不要求任何凭据。注册表数据从第三方主机实时获取,因此查询内容会暴露给这些主机。联系人及注册人个人字段会被丢弃,自由文本中的邮箱地址会被替换。查不到表示 IANA 没有登记,并不代表该值在实际中未被使用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Iana Registries Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

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.

10 Tools


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

ToolDescription
iana_lookup_portService name and port assignments by port number, service name, or keyword, per transport, with the port's RFC 6335 class
iana_lookup_media_typeRegistered media (MIME) types by exact type or keyword, with status, replacement, and registration-template statements
iana_lookup_http_statusAn HTTP status code by number, or reason phrases by keyword; an unassigned code reports its range
iana_lookup_http_fieldRegistered HTTP field (header and trailer) names with status and Structured Field type
iana_lookup_uri_schemeRegistered URI schemes with status, description, and well-known URI support
iana_lookup_penPrivate Enterprise Numbers by number or OID under 1.3.6.1.4.1, or by organization name
iana_lookup_language_tagValidate and canonicalize a BCP 47 language tag subtag by subtag, or search subtags by description
iana_get_rfc_statusCurrent status and relations of up to 10 RFCs or Internet-Drafts per call
iana_search_registriesFind any registry or sub-registry in the IANA protocol index by keyword
iana_get_registry_recordsRead and filter the records of any IANA XML registry by id

Capability reference

iana_lookup_port tool

  • One of port (0–65535), service (exact name), or keyword; transport (tcp, udp, sctp, dccp) filters every mode
  • Each row carries state (assigned, reserved, unassigned, unnamed) and its transport; port mode adds port_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) or keyword; top_level narrows keyword mode
  • status is current, deprecated, or obsoleted, with replaced_by when the registry names a replacement
  • type mode also reads the registration template and returns its file-extension, intended-usage, and deprecated-alias statements under template; template.fetched is false when the template can't be read

iana_lookup_http_status tool

  • One of code (100–599) or keyword over registered reason phrases
  • Returns class and state (assigned, temporary, obsoleted, unused) with the defining reference and section; an unassigned code returns found: false and its unassigned_range

iana_lookup_http_field tool

  • One of name (case-insensitive) or keyword over names and comments; status filters both modes
  • Returns status (permanent, provisional, deprecated, obsoleted), structured_type when one is registered, comments, and the defining reference

iana_lookup_uri_scheme tool

  • One of scheme (a trailing : or :// is ignored) or keyword; status (permanent, provisional, historical) filters both modes
  • Returns the description, references, well_known_uri_support, and template_url when a registration template is published

iana_lookup_pen tool

  • One of pen (a number, or an OID under 1.3.6.1.4.1) or organization words
  • Each entry carries its oid prefix and state (assigned, reserved, unassigned); organization_withheld: true marks an organization line held back because it mixes in contact details
  • An OID with arcs below the enterprise number echoes requested_oid and sub_arcs; those arcs are assigned by the enterprise, not IANA

iana_lookup_language_tag tool

  • One of tag (underscores read as hyphens) or description; subtag_type narrows description mode
  • Tag mode returns well_formed, valid, canonical_tag (valid tags only), each part in subtags[], and issues[]: kind unknown and wrong_position make a tag invalid, while deprecated, variant_prefix_mismatch, suppress_script_redundant, and extension_not_validated are 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 ids per 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 as kind: "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, and became_rfc; an unknown id is found: false with guidance
  • 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

  • query words matched against registry titles, categories, and ids, with an exact registry or sub-registry id ranked first; limit 1–50, default 15, paged by offset
  • Each entry carries the registry_id and subregistry_id that iana_get_registry_records reads, plus registration procedure, defining documents, and page and XML URLs

iana_get_registry_records tool

  • A registry id or iana.org/assignments URL, optional subregistry, and filters value (exact match on the key column; a decimal also matches range rows) and contains (words in any field)
  • Pages by cursor / next_cursor within limit (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, and cut_fields names what was cut
  • A registry with several sub-registries and none chosen returns subregistries[] instead of records; failures carry unknown_registry, unknown_subregistry, non_xml_registry, invalid_cursor, or cursor_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 (rec is 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: false with a notice naming the next step, an unknown RFC or draft returns found: false with guidance, and an invalid language tag returns valid: false with its issues[]. 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_required otherwise; limit is 1–100, default 25, and the list modes (keyword, organization, description) page with offset and return next_offset, alongside totalCount, shown, and truncated
  • Provenance on every registry response: source names the registry file, registry_updated (the registry's own last-updated date), fetched_at, and stale
  • Typed failures with recovery hints: every tool declares upstream_unreadable (index_unreadable for search) and pacer_shed, which carries retryAfter when this server's own request queue is full

Getting started

Add the following to your MCP client configuration file.

json
{  "mcpServers": {    "iana-registries-mcp-server": {      "type": "stdio",      "command": "bunx",      "args": ["@cyanheads/iana-registries-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info"      }    }  }}

Or with npx (no Bun required):

json
{  "mcpServers": {    "iana-registries-mcp-server": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@cyanheads/iana-registries-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info"      }    }  }}

Or with Docker:

json
{  "mcpServers": {    "iana-registries-mcp-server": {      "type": "stdio",      "command": "docker",      "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/iana-registries-mcp-server:latest"]    }  }}

For Streamable HTTP, set the transport and start the server:

sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http# Server listens at http://localhost:3010/mcp

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

  1. Clone the repository:
sh
git clone https://github.com/cyanheads/iana-registries-mcp-server.git
  1. Navigate into the directory:
sh
cd iana-registries-mcp-server
  1. Install dependencies:
sh
bun install
  1. Configure environment (optional):
sh
cp .env.example .env# the server needs no variables of its own; edit framework overrides as needed

Configuration

The server reads no environment variables of its own. These framework settings apply:

VariableDescriptionDefault
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTHTTP server port.3010
MCP_HTTP_HOSTHTTP server host.127.0.0.1
MCP_HTTP_ENDPOINT_PATHHTTP endpoint path./mcp
MCP_SESSION_MODEHTTP session mode: stateless, stateful, or auto.stateless
MCP_AUTH_MODEAuthentication: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.).info
LOGS_DIRDirectory for log files (Node.js only).<app-root>/logs
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1.in-memory
OTEL_ENABLEDEnable OpenTelemetry.false

See .env.example for the full list of framework overrides.

Running the server

Local development

  • Build and run the production version:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:http# orbun run start:stdio
  • Run checks and tests:

    sh
    bun run devcheck  # Lints, formats, type-checks, and morebun run test      # Runs the test suite

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point: registers the tools and starts and stops the services.
src/mcp-server/tools/definitionsTool definitions (*.tool.ts), ten tools.
src/mcp-server/tools/sharedSchemas, list paging and notices, and markdown helpers the tools share.
src/services/upstreamPaced, budgeted HTTP client for iana.org, rfc-editor.org, and datatracker.ietf.org.
src/services/registryRegistry cache and parsers: XML registries, the PEN list, the language subtag registry, the protocol index, BCP 47 tag analysis, and personal-data scrubbing.
src/services/media-templateMedia type registration template reader.
src/services/ietfRFC Editor and Datatracker document status.
tests/Unit and tool tests, mirroring the src/ structure.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging; registry text is third-party, so format() renders it through the quote() and inline() 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:

sh
bun run devcheckbun run test

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
  1. v0.1.1最新Oct 1, 2026