Internet-Draft | MCP for Networks | October 2025 |
Zeng & Mao | Expires 23 April 2026 | [Page] |
The Model Context Protocol (MCP) is an open standard that enables Large Language Model (LLM) applications to seamlessly integrate with external data sources and tools by exposing Resources, Prompts and Tools in a JSON-RPC 2.0 transport. This document describes a mapping of MCP roles, primitives and security model to the network management domain so that network devices act as MCP servers and network controllers act as MCP clients. The goal is to provide an intent-based, conversational and secure approach for automated network troubleshooting, configuration validation, and closed-loop remediation without inventing new protocols or device agents.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 23 April 2026.¶
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Network operators today face two converging demands: (1) reduce Mean Time to Repair (MTTR) while managing ever larger infrastructures, and (2) adopt intent-based interfaces that allow engineers to express high-level goals such as "verify reachability between Site-A and Site-B" instead of typing low-level CLI commands.¶
Simultaneously, Large Language Models (LLMs) have demonstrated utility in reasoning about semi-structured data such as device logs, configurations, and command outputs. However, safely exposing device-level actions and data to an LLM in real time remains an open problem. The Model Context Protocol (MCP), developed by Anthropic and published at https://modelcontextprotocol.io, provides a lightweight, capability-oriented RPC layer that already addresses this problem for general LLM applications.¶
This document specifies a deterministic mapping of MCP roles, primitives, and security workflows onto the network management plane so that:¶
The result is an intent-based, conversational and secure automation framework that re-uses existing agents (NETCONF/RESTCONF/YANG, SNMP, CLI, gNMI, etc.) already present on devices instead of requiring new firmware.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
MCP terms such as "Tool", "Resource", "Prompt", "Client", "Server", "Host", and "Capability" are used as defined in the MCP specification dated 2025-06-18.¶
Intent: A high-level, declarative statement of desired network behaviour, expressed in natural language or structured YAML/JSON, that the controller must translate into concrete device actions.¶
+----------------------------------+ | Human Operator (Chat UI, Web) | +-----------------+----------------+ | Intent (natural lang.) v +----------------------------------+ | Controller / Orchestrator | | (MCP Client + LLM Host) | +-----------------+----------------+ | JSON-RPC 2.0 over TLS v +----------------------------------+ | Network Device | | (MCP Server) | +----------------------------------+
MCP Server: Runs on or proxied in front of the network element. Exposes:¶
MCP Client: Runs inside the controller. Maintains a persistent JSON-RPC 2.0 connection to each server. Optionally hosts an LLM that reasons about the data returned by servers.¶
On connection establishment, the client and server exchange capability objects as defined in MCP. Servers list their supported YANG modules [RFC8525], CLI command sets, and Tool schemas encoded in OpenAPI 3.0. Clients list optional features such as "sampling" (LLM recursion) or "roots" (URI scoping).¶
Resources are exposed under the URI scheme mcp://<device>/<yang-module>:<path>
. Reading a resource returns YANG JSON-encoded data per [RFC7951]. Examples:¶
mcp://router1/ietf-interfaces:interfaces/interface=eth0
¶
mcp://router1/openconfig-bgp:bgp/neighbors/neighbor=1.1.1.1
¶
Servers SHOULD support the "content-id" header to enable E-tags for caching.¶
Tools are mapped to well-known RPC operations already exposed by devices via NETCONF/RESTCONF/YANG, gNMI, or CLI. A Tool is described by an OpenAPI 3.0 Operation Object and MUST be idempotent when possible.¶
Example Tool schema (ping):¶
{ "name": "ping", "description": "Execute ICMP echo probe", "inputSchema": { "type": "object", "properties": { "destination": { "type": "string" }, "count": { "type": "integer", "default": 5 }, "source": { "type": "string" } }, "required": ["destination"] } }
Prompts are reusable prompt templates stored on the device. They allow vendors or operators to encode golden troubleshooting workflows in natural language. A prompt MAY contain variable placeholders such as "{{interface}}" that the client fills in before sending to an LLM.¶
If the client advertises the "sampling" capability, the server MAY request LLM inference on behalf of the device. This is useful for recursive troubleshooting where the device needs to ask clarifying questions. All sampling requests MUST be approved by the human operator via explicit consent UI.¶
The following steps illustrate the flow:¶
ping
(Tool) from router1 to 10.2.2.2show interfaces
(Resource) on router2¶
/openconfig-bgp:bgp/neighbors/neighbor=1.1.1.1/state
-/ietf-interfaces:interfaces/interface=loopback0
¶
JSON-RPC 2.0 is carried over TLS 1.3 [RFC8446] with TCP/443 or QUIC [RFC9000] as the underlying transport. Servers present X.509 device certificates; clients use mutual TLS with short-lived SPAKE2 [RFC9383] tokens to achieve zero-touch onboarding.¶
YANG data is encoded in JSON [RFC7951] unless the client explicitly requests XML.¶
Large tech-support files MAY be streamed via HTTP/2 chunked transfer and are integrity-protected by SHA-256 hashes delivered in the JSON-RPC result.¶
Servers MAY support the MCP "progress" notification to report percentage completion for long-running Tools such as "tracepath".¶
This section extends the security model defined in MCP with network-specific requirements.¶
All Tool invocations that change device state MUST be confirmed by an authenticated user via an out-of-band consent channel (e.g., click-through UI or signed JWT). The consent object includes:¶
Servers issue short-lived OAuth 2.0 [RFC6749] access tokens scoped to individual YANG subtrees or Tools. Tokens are bound to the mutual TLS channel to prevent replay.¶
When the controller hosts an LLM, the LLM is placed in a sandbox with no direct layer-3 reachability to devices. All interactions MUST traverse the MCP client to mitigate prompt-injection attacks.¶
Every JSON-RPC request and response is appended to an immutable audit trail (e.g., syslog [RFC5424] or IETF syslog over TLS). Servers include a "session-id" field to allow cross-device correlation.¶
This document requests IANA to register the following well-known URI:¶
Additionally, the YANG module "ietf-mcp" is requested to be added to the IETF YANG module registry with namespace "urn:ietf:params:xml:ns:yang:ietf-mcp".¶
--> { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "ping", "arguments": { "destination": "10.2.2.2", "count": 5, "source": "192.0.2.1" } } } <-- { "jsonrpc": "2.0", "id": 1, "result": { "loss": 0, "rtt": { "min": 2.1, "max": 2.3, "avg": 2.2 } } }
--> { "jsonrpc": "2.0", "id": 2, "method": "resources/subscribe", "params": { "uri": "mcp://router1/ietf-interfaces:interfaces/interface=eth0", "content-id": "etag-1234" } } <-- { "jsonrpc": "2.0", "id": 2, "result": { "subscription-id": "sub-42", "initial": { "admin-status": "up", "oper-status": "up" } } }