MCPGuard: Finding Conformance Gaps in MCP SDKs via Dual-Track Analysis and Dynamic Adjudication
Xikai Sun, Kebin Liu, Fan Dang, Yawen Zheng, Zihao Yang, Yunhao Liu
Key points
From the paper's conclusion- We present MCPGuard, an automated LLM-based framework for detecting specification-to-SDK conformance gaps.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Tracing MCP Security Vulnerabilities: Constructing and Analyzing an MCP Security Vulnerability DatasetarXiv · 2026
- When Tool Names Are Not Identities: Measuring Provider Misbinding in MCP-Based AI AgentsarXiv · 2026
- Zero-Trust Authorization and Discovery for Enterprise MCParXiv · 2026
- MCP Tool Poisoning in Agentic AI Frameworks: A Cross-Framework Measurement StudyarXiv · 2026
- Model Context Protocol (MCP) at First Glance: Studying the Security and Maintainability of MCP ServersACM Transactions on Software Engineering and Methodology · 2026
- My Credentials, Please: Detecting Filesystem Capability Laundering in MCP Servers at ScalearXiv · 2026