Table of Contents
Fetching ...

MCP-Diag: A Deterministic, Protocol-Driven Architecture for AI-Native Network Diagnostics

Devansh Lodha, Mohit Panchal, Sameer G. Kulkarni

TL;DR

The paper tackles the core problem of reliably integrating LLMs into network diagnostics while mitigating unstructured data and unsafe shell access. It introduces MCP-Diag, a MCP-based architecture featuring a deterministic translation layer that converts canonical tool output into validated JSON, and a protocol-level Elicitation loop coupled with a hybrid control/streaming transport. Empirical results show 100% extraction accuracy with a modest latency overhead and a significant token-cost increase, while maintaining a small resource footprint, underscoring practical viability for production AIOps. This work delivers a concrete blueprint for secure, scalable AI-native network diagnostics and points toward future capabilities in richer diagnostics, autonomous agents, and large-scale orchestration.

Abstract

The integration of Large Language Models (LLMs) into network operations (AIOps) is hindered by two fundamental challenges: the stochastic grounding problem, where LLMs struggle to reliably parse unstructured, vendor-specific CLI output, and the security gap of granting autonomous agents shell access. This paper introduces MCP-Diag, a hybrid neuro-symbolic architecture built upon the Model Context Protocol (MCP). We propose a deterministic translation layer that converts raw stdout from canonical utilities (dig, ping, traceroute) into rigorous JSON schemas before AI ingestion. We further introduce a mandatory "Elicitation Loop" that enforces Human-in-the-Loop (HITL) authorization at the protocol level. Our preliminary evaluation demonstrates that MCP-Diag achieving 100% entity extraction accuracy with less than 0.9% execution latency overhead and 3.7x increase in context token usage.

MCP-Diag: A Deterministic, Protocol-Driven Architecture for AI-Native Network Diagnostics

TL;DR

The paper tackles the core problem of reliably integrating LLMs into network diagnostics while mitigating unstructured data and unsafe shell access. It introduces MCP-Diag, a MCP-based architecture featuring a deterministic translation layer that converts canonical tool output into validated JSON, and a protocol-level Elicitation loop coupled with a hybrid control/streaming transport. Empirical results show 100% extraction accuracy with a modest latency overhead and a significant token-cost increase, while maintaining a small resource footprint, underscoring practical viability for production AIOps. This work delivers a concrete blueprint for secure, scalable AI-native network diagnostics and points toward future capabilities in richer diagnostics, autonomous agents, and large-scale orchestration.

Abstract

The integration of Large Language Models (LLMs) into network operations (AIOps) is hindered by two fundamental challenges: the stochastic grounding problem, where LLMs struggle to reliably parse unstructured, vendor-specific CLI output, and the security gap of granting autonomous agents shell access. This paper introduces MCP-Diag, a hybrid neuro-symbolic architecture built upon the Model Context Protocol (MCP). We propose a deterministic translation layer that converts raw stdout from canonical utilities (dig, ping, traceroute) into rigorous JSON schemas before AI ingestion. We further introduce a mandatory "Elicitation Loop" that enforces Human-in-the-Loop (HITL) authorization at the protocol level. Our preliminary evaluation demonstrates that MCP-Diag achieving 100% entity extraction accuracy with less than 0.9% execution latency overhead and 3.7x increase in context token usage.
Paper Structure (14 sections, 3 figures, 1 table, 1 algorithm)

This paper contains 14 sections, 3 figures, 1 table, 1 algorithm.

Figures (3)

  • Figure 1: MCP-Diag Architecture: The MCP Host (left) orchestrates the flow between the user, the LLM, and the MCP Server (right). Critically, all tool execution is centralized on the Server, which enforces governance via a mandatory MCP Elicitation loop (blue arrows) back to the Host, and guarantees reliable data by transforming raw stdout into validated JSON.
  • Figure 2: MCP-Diag (server) running in VS Code (Host).
  • Figure 3: Comparison of MCP-Diag and baseline ShellTool for A) Protocol overhead B) Latency overhead C) Task Accuracy D) Memory overhead E) CPU overhead and F) Token Overhead over 500 trials.