Table of Contents
Fetching ...

NetMCP: Network-Aware Model Context Protocol Platform for LLM Capability Extension

Enhan Li, Hongyang Du, Kaibin Huang

TL;DR

This work addresses the challenge of extending LLM capabilities through external MCP tools in dynamic networks by introducing NetMCP, a heterogeneous benchmarking platform that simulates diverse network conditions. It proposes SONAR, a joint semantic- and network-aware routing algorithm that combines tool relevance with real-time QoS metrics using a weighted utility, enabling adaptive and robust tool selection. Through extensive simulations and real-world validations, SONAR demonstrates higher task success, lower completion times, and dramatically reduced failures compared with semantic-only baselines, underscoring the practical value of network-aware design for scalable LLM systems. The platform and algorithm pave the way for reproducible evaluation and future enhancements in network-resilient tool integration for LLMs.

Abstract

Large Language Models (LLMs) remain static in functionality after training, and extending their capabilities requires integration with external data, computation, and services. The Model Context Protocol (MCP) has emerged as a standard interface for such extensions, but current implementations rely solely on semantic matching between users' requests and server function descriptions, which makes current deployments and simulation testbeds fragile under latency fluctuations or server failures. We address this gap by enhancing MCP tool routing algorithms with real-time awareness of network and server status. To provide a controlled test environment for development and evaluation, we construct a heterogeneous experimental platform, namely Network-aware MCP (NetMCP), which offers five representative network states and build a benchmark for latency sequence generation and MCP server datasets. On top of NetMCP platform, we analyze latency sequences and propose a Semantic-Oriented and Network-Aware Routing (SONAR) algorithm, which jointly optimizes semantic similarity and network Quality of Service (QoS) metrics for adaptive tool routing. Results show that SONAR consistently improves task success rate and reduces completion time and failure number compared with semantic-only, LLM-based baselines, demonstrating the value of network-aware design for production-scale LLM systems. The code for NetMCP is available at https://github.com/NICE-HKU/NetMCP.

NetMCP: Network-Aware Model Context Protocol Platform for LLM Capability Extension

TL;DR

This work addresses the challenge of extending LLM capabilities through external MCP tools in dynamic networks by introducing NetMCP, a heterogeneous benchmarking platform that simulates diverse network conditions. It proposes SONAR, a joint semantic- and network-aware routing algorithm that combines tool relevance with real-time QoS metrics using a weighted utility, enabling adaptive and robust tool selection. Through extensive simulations and real-world validations, SONAR demonstrates higher task success, lower completion times, and dramatically reduced failures compared with semantic-only baselines, underscoring the practical value of network-aware design for scalable LLM systems. The platform and algorithm pave the way for reproducible evaluation and future enhancements in network-resilient tool integration for LLMs.

Abstract

Large Language Models (LLMs) remain static in functionality after training, and extending their capabilities requires integration with external data, computation, and services. The Model Context Protocol (MCP) has emerged as a standard interface for such extensions, but current implementations rely solely on semantic matching between users' requests and server function descriptions, which makes current deployments and simulation testbeds fragile under latency fluctuations or server failures. We address this gap by enhancing MCP tool routing algorithms with real-time awareness of network and server status. To provide a controlled test environment for development and evaluation, we construct a heterogeneous experimental platform, namely Network-aware MCP (NetMCP), which offers five representative network states and build a benchmark for latency sequence generation and MCP server datasets. On top of NetMCP platform, we analyze latency sequences and propose a Semantic-Oriented and Network-Aware Routing (SONAR) algorithm, which jointly optimizes semantic similarity and network Quality of Service (QoS) metrics for adaptive tool routing. Results show that SONAR consistently improves task success rate and reduces completion time and failure number compared with semantic-only, LLM-based baselines, demonstrating the value of network-aware design for production-scale LLM systems. The code for NetMCP is available at https://github.com/NICE-HKU/NetMCP.
Paper Structure (17 sections, 9 equations, 9 figures, 3 tables, 1 algorithm)

This paper contains 17 sections, 9 equations, 9 figures, 3 tables, 1 algorithm.

Figures (9)

  • Figure 1: Motivation for considering network states and designing a joint optimization algorithm for MCP tool routing. Naive routing policies based only on tool expertise, risk delays or failures under poor network conditions, while policies based only on network conditions may select irrelevant tools. Our algorithm resolves this trade-off to find the optimal tool that is both highly expert and network-efficient.
  • Figure 2: The design of the NetMCP platform.
  • Figure 3: Modular architecture of the NetMCP platform. The NetMCP comprises five core modules, i.e., MCP servers, network status environment, agent, tool routing algorithm, and evaluation metrics, interacting through well-defined APIs to enable reproducible evaluation of network-aware tool routing algorithms under diverse and controllable conditions.
  • Figure 4: Example of a hybrid scenario configuration generated by the NetMCP platform, simulating diverse network behaviors including high latency, low latency, intermittent outages, fluctuating bursts, and high jitter.
  • Figure 5: Overview of the SONAR algorithm, which combines tool prediction, semantic-oriented tool routing, and network-aware tool routing into a joint optimization strategy for selecting the most suitable MCP tool.
  • ...and 4 more figures