Skip to main content

mcp-diff

Schema lockfile and breaking-change detector for MCP servers.

The problem: MCP servers serve tool schemas at runtime. When a description changes, agent behavior changes silently — no diff, no CI failure, no warning.

The solution: Commit a mcp-schema.lock to git. Fail CI on breaking changes.

Install

pip install mcp-diff

Usage

# Snapshot your server's current schema
mcp-diff snapshot python3 my_server.py

# Check for breaking changes (exits 1 if found)
mcp-diff check python3 my_server.py

# Human-readable report (always exits 0)
mcp-diff report python3 my_server.py

Example output

mcp-diff check python3 my_server.py

[BREAKING]  read_file: Tool 'read_file' was removed.
[BREAKING]  search_files.pattern: Parameter 'pattern' type changed: 'string' → 'array' in tool 'search_files'.
[WARNING]   search_files: Tool description changed.
              was: 'Search for files matching a pattern.'
              now: 'Search files. Use glob patterns.'
[INFO]      write_file: Tool 'write_file' was added.

Found 2 breaking, 1 warning, 1 info changes.

Change severity

Severity When CI impact
breaking Tool removed, required param added/removed, param type changed exits 1
warning Tool or param description changed (descriptions are behavioral contracts for LLMs) exits 0
info Tool added, optional param added exits 0

CI integration (GitHub Actions)

- name: Snapshot MCP schema
  run: mcp-diff snapshot python3 my_server.py
  # Commit mcp-schema.lock to your repo

- name: Check for breaking changes
  run: mcp-diff check python3 my_server.py
  # Exits 1 and fails the build if breaking changes are detected

Lockfile format

{
  "version": "1",
  "created_at": "2026-03-22T03:00:00Z",
  "command": "python3 my_server.py",
  "tools": [
    {
      "name": "search_files",
      "description": "Search for files matching a pattern",
      "inputSchema": { "..." : "..." }
    }
  ]
}

Commit mcp-schema.lock to git. The diff in your PR is the schema diff.

Options

mcp-diff snapshot [--output PATH] <command...>
mcp-diff check    [--lockfile PATH] [--json] [--no-color] <command...>
mcp-diff report   [--lockfile PATH] [--no-color] <command...>

Exit codes

Code Meaning
0 Clean (no breaking changes)
1 Breaking changes detected
2 Error (missing lockfile, server failed to start)

Part of the MCP developer toolkit

Source: github.com/0-co/mcp-diff

Release files for mcp-diff 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-diff 0.1.0
File Size Uploaded
mcp_diff-0.1.0.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-diff 0.1.0
File Interpreter ABI Platform
mcp_diff-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / mcp_diff-0.1.0.tar.gz

Download URL mcp_diff-0.1.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1bcbddabfaedf822347c9c81e861350c19a8e4609bdc30572cbe8922f2671b1d
BLAKE2b-256 checksum
How to use checksums
bbb5e956f36790b97f2edfdc4296cea07efe2bad7e7abc66716b7890c70af36a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / mcp_diff-0.1.0-py3-none-any.whl

Download URL mcp_diff-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ef37636b98ecae6da336c212dba222a14fc5c14a586f0c9ba15ca8391ec542e
BLAKE2b-256 checksum
How to use checksums
a17f063c066788eb2b6cd321482ef34a452a9c39f9f25c112632413323c090b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page