MCPGuard, an automated framework for checking whether Model Context Protocol (MCP) software development kits enforce the protocol specification, identified 13 conformance gaps in the official Python SDK and 19 in the TypeScript SDK, according to a research paper currently under review. The authors say two black-box testing baselines exposed none of the findings.
The framework uses two analysis tracks. One compares constraints in the MCP JSON Schema with models in SDK code, while the other extracts behavioral requirements from specification documents and uses language models to flag possible omissions. A further review stage examines the full source context and builds proof-of-concept tests to check whether candidate gaps are real.
The researchers report 27 structural findings and five behavioral findings across the SDKs. Generated proof-of-concept tests reproduced all structural findings; review of the full implementation context retained two behavioral findings in Python and three in TypeScript. The team says it reported the issues privately to the SDK maintainers.
The paper also describes tests involving 32 authorized public MCP servers. The researchers found that two shared gaps involving URI-format validation could reach downstream services: all 32 endpoints that completed the handshake accepted both malformed metadata fields.
The authors argue that SDK-level checks matter because applications built on an SDK may inherit constraints that the library does not enforce. MCPGuard is intended to complement endpoint-focused conformance tests by checking how specification requirements are represented and enforced within SDKs.
Sources: arXiv cs.AI.