New Python tool detects breaking MCP schema changes, unlike simple hash pinning
A developer who previously built a hash-based pinning tool for Model Context Protocol (MCP) servers identified a key limitation: it could not distinguish between harmless schema updates and genuinely breaking changes. The core problem is that a SHA-256 pin treats any schema modification identically, whether a server adds an optional parameter or removes a required one. To address this, the developer built compat_gate.py, a tool that diffs the inputSchema and replays recorded agent calls to determine if existing calls remain valid under the new schema. The approach is grounded in subtyping logic: a change is backward-compatible if the new schema still accepts all previously valid calls, and breaking if it does not. The tool was built with AI assistance, tested on Python 3.13.5, and uses real MCP spec schema diffs alongside synthetic breaking-case fixtures for verification.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in