Skip to main content
Glama

Servidor MCP RFCXML

npm version CI License: MIT Node.js Claude Code

README en japonés

Un servidor del Protocolo de Contexto de Modelo (MCP) para la comprensión estructurada de documentos RFC.

Propósito

A diferencia de los servidores MCP de RFC basados en texto existentes, este servidor aprovecha la estructura semántica de RFCXML para permitir:

  • Extracción de requisitos normativos (MUST/SHOULD/MAY) con salida estructurada

  • Construcción de grafos de dependencia de RFC

  • Gestión del alcance de definiciones

  • Generación de listas de verificación de implementación

Related MCP server: Unstructured Document Processor MCP

Arquitectura

┌─────────────────────────┐
│  Markdown / PDF         │  Display & Sharing
├─────────────────────────┤
│  Translation            │  Explanation & Verification
├─────────────────────────┤
│  RFCXML MCP             │  Common Understanding for AI & Humans
├─────────────────────────┤
│  RFCXML                 │  Single Source of Truth
└─────────────────────────┘

Comparación con MCP existentes

Característica

mcp-rfc existente

RFCXML MCP

Recuperación de texto RFC

✅

✅

Extracción de secciones

✅ (basado en texto)

✅ (basado en estructura)

Extracción de MUST/SHOULD/MAY

❌

✅

Estructuración de condiciones/excepciones

❌

✅

Grafo de dependencia de RFC

❌

✅

Gestión del alcance de definiciones

❌

✅

Lista de verificación de implementación

❌

✅

Inicio rápido

Uso con Claude Desktop / Claude Code

Añada lo siguiente a su archivo de configuración de MCP:

{
  "mcpServers": {
    "rfcxml": {
      "command": "npx",
      "args": ["-y", "@shuji-bonji/rfcxml-mcp"]
    }
  }
}

Ubicaciones del archivo de configuración:

  • Claude Desktop (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json

  • Claude Desktop (Windows): %APPDATA%\Claude\claude_desktop_config.json

  • Claude Code (alcance del proyecto): .mcp.json en la raíz del proyecto

  • Claude Code (alcance del usuario): ~/.claude.json

  • Claude Code (CLI): claude mcp add rfcxml -- npx -y @shuji-bonji/rfcxml-mcp

Instalación (Opcional)

Para una instalación global:

npm install -g @shuji-bonji/rfcxml-mcp

Luego configure MCP:

{
  "mcpServers": {
    "rfcxml": {
      "command": "rfcxml-mcp"
    }
  }
}

Herramientas disponibles

Fase 1: Estructura básica

  • get_rfc_structure - Obtener jerarquía de secciones y metadatos

  • get_requirements - Extraer requisitos normativos (MUST/SHOULD/MAY) con estructura

  • get_definitions - Obtener definiciones de términos y su alcance

Fase 2: Relaciones

  • get_rfc_dependencies - Obtener RFCs referenciados (normativos/informativos)

  • get_related_sections - Obtener secciones relacionadas dentro del mismo RFC

Fase 3: Soporte de verificación

  • validate_statement - Verificar si una declaración cumple con los requisitos del RFC

  • generate_checklist - Generar lista de verificación de implementación

Soporte para RFC heredados

Los RFC publicados después del RFC 8650 (diciembre de 2019) están disponibles en el formato oficial RFCXML v3. Es posible que los RFC anteriores no tengan XML disponible.

Este servidor incluye una funcionalidad de reserva automática: cuando el XML no está disponible, analiza el formato de texto en su lugar.

Información de origen

Todas las respuestas incluyen información de origen:

{
  "rfc": 6455,
  "sections": [...],
  "_source": "text",
  "_sourceNote": "Warning: Parsed from text format. Accuracy may be limited."
}

_source

Descripción

xml

Analizado desde RFCXML (alta precisión)

text

Analizado desde texto (precisión media)

Compatibilidad

RFC

Formato

Notas

RFC 8650+

XML

Soporte oficial RFCXML v3

Antes de RFC 8650

Texto

Reserva automática

Muestras de salida

get_rfc_structure - Obtener estructura de RFC

{
  "metadata": {
    "title": "Transmission Control Protocol (TCP)",
    "docName": "draft-ietf-tcpm-rfc793bis-28",
    "number": 9293
  },
  "sections": [
    {
      "number": "section-1",
      "title": "Purpose and Scope"
    },
    {
      "number": "section-3",
      "title": "Functional Specification",
      "subsections": [
        { "number": "section-3.1", "title": "Header Format" },
        {
          "number": "section-3.5",
          "title": "Establishing a Connection",
          "subsections": [
            { "number": "section-3.5.1", "title": "Half-Open Connections and Other Anomalies" },
            { "number": "section-3.5.2", "title": "Reset Generation" }
          ]
        }
      ]
    }
  ],
  "referenceCount": { "normative": 15, "informative": 85 },
  "_source": "xml"
}

get_requirements - Extraer requisitos normativos

{
  "rfc": 9293,
  "filter": { "level": "MUST" },
  "stats": { "total": 53, "byLevel": { "MUST": 53 } },
  "requirements": [
    {
      "id": "R-section-3.5-5",
      "level": "MUST",
      "text": "A TCP implementation support simultaneous open attempts (MUST-10).",
      "section": "section-3.5",
      "sectionTitle": "Establishing a Connection"
    },
    {
      "id": "R-section-3.7.1-9",
      "level": "MUST",
      "text": "TCP endpoints implement both sending and receiving the MSS Option (MUST-14).",
      "section": "section-3.7.1",
      "sectionTitle": "Maximum Segment Size Option"
    }
  ],
  "_source": "xml"
}

get_rfc_dependencies - Obtener dependencias de RFC

{
  "rfc": 9293,
  "normative": [
    { "rfcNumber": 791, "title": "Internet Protocol", "anchor": "RFC0791" },
    { "rfcNumber": 2119, "title": "Key words for use in RFCs to Indicate Requirement Levels" },
    { "rfcNumber": 5681, "title": "TCP Congestion Control" }
  ],
  "informative": [
    { "rfcNumber": 793, "title": "Transmission Control Protocol" },
    { "rfcNumber": 1122, "title": "Requirements for Internet Hosts - Communication Layers" }
  ],
  "_source": "xml"
}

generate_checklist - Generar lista de verificación de implementación

# RFC 9293 Implementation Checklist

**Transmission Control Protocol (TCP)**

Role: Client

## Required (MUST / REQUIRED / SHALL)

- [ ] A TCP implementation support simultaneous open attempts (MUST-10). (section-3.5)
- [ ] TCP endpoints implement both sending and receiving the MSS Option (MUST-14). (section-3.7.1)
- [ ] The RTO be computed according to the algorithm in, including Karn's algorithm (MUST-18). (section-3.8.1)

## Optional (MAY / OPTIONAL)

- [ ] Implementers include "keep-alives" in their TCP implementations (MAY-5). (section-3.8.4)

Salida de reserva de texto (RFC heredados)

{
  "metadata": {
    "title": "The WebSocket Protocol",
    "number": 6455
  },
  "sections": [
    { "number": "1", "title": "Introduction" },
    { "number": "5", "title": "Data Framing" }
  ],
  "_source": "text",
  "_sourceNote": "Warning: Parsed from text format. Accuracy may be limited."
}

Ejemplos

Consulte el directorio examples/ para ver muestras completas de listas de verificación:

RFC

Protocolo

Origen

RFC 6455

WebSocket

Texto (reserva)

RFC 9293

TCP

RFCXML

RFC 7540

HTTP/2

Texto (reserva)

Ejemplo de prompt para Claude:

Generate an implementation checklist for RFC 9293 (TCP).

Arquitectura interna

Estructura del módulo

src/
├── index.ts                    # MCP server entry point
├── config.ts                   # Centralized configuration
├── constants.ts                # BCP 14 keyword definitions + RFC number limits
├── services/
│   ├── rfc-fetcher.ts          # RFC fetching (parallel)
│   ├── rfc-service.ts          # RFC parse & cache management
│   ├── rfcxml-parser.ts        # RFCXML parser
│   ├── rfc-text-parser.ts      # Text fallback parser
│   └── checklist-generator.ts  # Checklist generation service
├── tools/
│   ├── definitions.ts          # MCP tool definitions
│   └── handlers.ts             # Tool handlers (toolHandlers map)
├── types/
│   └── index.ts                # Type definitions
└── utils/
    ├── cache.ts                # LRU cache
    ├── fetch.ts                # Parallel fetch utility
    ├── logger.ts               # Logger abstraction
    ├── requirement-extractor.ts # Shared requirement extraction
    ├── section.ts              # Section search utilities
    ├── statement-matcher.ts    # Weighted statement matching
    ├── text.ts                 # Text processing utility
    └── validation.ts           # Input validation

Optimización de obtención de RFC

Envía solicitudes paralelas a múltiples fuentes (RFC Editor, IETF Tools, Datatracker) y utiliza la primera respuesta exitosa:

┌─────────────────┐
│  fetchRFCXML()  │
└────────┬────────┘
         │ Parallel requests
    ┌────┴────┬────────────┐
    ▼         ▼            ▼
┌────────┐ ┌────────┐ ┌────────┐
│RFC     │ │IETF    │ │Data-   │
│Editor  │ │Tools   │ │tracker │
└────┬───┘ └────┬───┘ └────┬───┘
     │          │          │
     └────┬─────┴──────────┘
          │ Promise.any (first success)
          ▼
    ┌───────────┐
    │ Successful│ → Cancel other requests via AbortController
    │ Response  │
    └───────────┘

Estrategia de caché

Caché LRU (Least Recently Used) con límites de memoria:

Caché

Entradas máx.

Contenido

Caché XML

20

RFCXML sin procesar

Caché de texto

20

Texto sin procesar

Caché de metadatos

100

Metadatos de RFC

Caché de análisis

50

Estructura analizada

Desarrollo

# Install dependencies
npm install

# Development mode
npm run dev

# Build
npm run build

# Test (watch mode)
npm test

# Test (single run — for CI etc.)
npm test -- --run

# E2E test (MCP client integration)
npm run test:e2e

# Lint
npm run lint

# Format
npm run format

Licencia

MIT

Proyectos relacionados

Available Tools

7 tools
generate_checklistB

Generate RFC implementation checklist in Markdown format.

Inputs: rfc (required), role, sections, includeSubsections.

get_definitionsC

Get term definitions from RFC.

Inputs: rfc (required), term.

get_requirementsA

Extract normative requirements (MUST/SHOULD/MAY) from RFC in structured format.

Inputs: rfc (required), section, level.

get_rfc_dependenciesB

Get RFC reference relationships (normative/informative).

Inputs: rfc (required), includeReferencedBy.

get_rfc_structureC

Get RFC section hierarchy and metadata.

Inputs: rfc (required), includeContent.

validate_statementC

Validate if a statement complies with RFC requirements.

Inputs: rfc (required), statement (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific aspects of RFC analysis, with no overlap in functionality. For example, get_definitions extracts terms, get_requirements extracts normative language, and get_rfc_structure provides metadata, making misselection unlikely.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, such as get_definitions, validate_statement, and generate_checklist. This predictability enhances readability and usability for agents.

    Tool Count5/5

    With 7 tools, the server is well-scoped for RFC analysis, covering key operations like extraction, validation, and dependency mapping. Each tool earns its place without feeling excessive or insufficient for the domain.

    Completeness4/5

    The toolset provides comprehensive coverage for analyzing RFCs, including structure, definitions, requirements, and dependencies, with minor gaps such as lacking tools for editing or updating RFC content, but core workflows are well-supported.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables Large Language Models to search and access IETF RFC documents with pagination support.
      3
      13
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that enables programmatic access to IETF RFC documents, allowing users to fetch, search, and extract specific sections from RFCs.
      3
      20
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      An MCP server for obtaining, parsing and reading RFC documents from the ietf.org website, providing programmatic interactive tools.
      3
      2
      Apache 2.0