Oriel — AI & technology worth noticing, every day.

MCPGuard: Finding Conformance Gaps in MCP SDKs via Dual-Track Analysis and Dynamic Adjudication

Paper · https://arxiv.org/abs/2611.03662

arXiv:2611.03662v1 Announce Type: new Abstract: The Model Context Protocol (MCP) connects large language model agents to external tools and services through official SDKs that implement message validation and session logic. Specification constraints omitted by these SDKs may propagate to downstream applications, highlighting the importance of SDK-level conformance testing. Yet existing MCP conformance tools mainly exercise running endpoints and reveal little about whether SDK models enforce specification requirements. We present MCPGuard, an automated LLM-based framework for detecting specification-to-SDK conformance gaps. Its structural track aligns JSON Schema constraints with normalized SDK models and produces constraint-specific evidence. Its behavioral track extracts normative prose rules, retrieves bounded function-level slices, and audits them with LLMs for candidate omissions. An evidence-aware dynamic adjudicator then inspects complete source context and builds PoCs to validate candidates. A shared kernel with language-specific adapters enables analysis across SDKs. On the official Python 1.26.0 and TypeScript 1.29.0 SDKs, MCPGuard confirms 13 and 19 findings, respectively, none of which are exposed by two black-box baselines. Tests on open MCP servers further show that these gaps can systematically propagate downstream. By making SDK conformance of specification constraints directly testable, MCPGuard complements conventional endpoint-oriented conformance suites.

First seen by Oriel on .

AI summary

MCPGuard is an automated LLM-based framework that detects specification-to-SDK conformance gaps through structural analysis, behavioral auditing, and dynamically validated proof-of-concepts.

  • Its structural track aligns JSON Schema constraints with normalized SDK models to produce constraint-specific evidence.
  • Its behavioral track extracts normative prose, retrieves bounded function-level code slices, and uses LLMs to identify candidate omissions.
  • A dynamic adjudicator examines complete source context and builds proof-of-concepts to validate suspected gaps.
  • MCPGuard confirmed 13 findings in the official Python 1.26.0 SDK and 19 in TypeScript 1.29.0, missed by two black-box baselines.
  • Tests on open MCP servers showed that SDK gaps can systematically propagate into downstream applications.

#mcp #sdk conformance #llm auditing #json schema

Generated by gpt-5.6-sol. Check the original for details.

Aliases

SourceExternal IDURL
arXiv AI Papersoai:arXiv.org:2611.03662v1https://arxiv.org/abs/2611.03662 Read discussion