Breaking change classifier for MCP server schemas
Project description
mcp-compat
Know before you deploy if you're breaking MCP users.
mcp-compat compares two MCP server schemas (before/after) and classifies every change as BREAKING, WARN, or SAFE. Gate your deploys on it.
mcp-compat: schema compatibility report
2 BREAKING changes, 1 SAFE change
BREAKING get_weather Parameter 'units' type changed: string → integer
BREAKING list_items Required parameter 'limit' removed
SAFE create_item New optional parameter 'tags' added
Run with --ci to fail CI on breaking changes
Install
pip install mcp-compat
No external dependencies. Python 3.9+.
Quick start
# Compare two local schema files
mcp-compat before.json after.json
# Fail CI on breaking changes
mcp-compat before.json after.json --ci
# JSON output for scripting
mcp-compat before.json after.json --json
# Compare remote schemas
mcp-compat https://example.com/schema-v1.json https://example.com/schema-v2.json
Input is a JSON array of MCP tool objects (same format as agent-friend grade):
[
{
"name": "get_weather",
"description": "Get current weather",
"inputSchema": {
"type": "object",
"properties": {
"city": {"type": "string", "description": "City name"},
"units": {"type": "string", "description": "Units", "default": "celsius"}
},
"required": ["city"]
}
}
]
Change classification
| Change | Severity | Reason |
|---|---|---|
| Tool removed | BREAKING | All callers break immediately |
| Required parameter removed | BREAKING | Callers passing it hit unexpected behavior |
| New required parameter added | BREAKING | Callers that omit it will receive errors |
| Parameter type changed | BREAKING | Callers sending old type get rejected |
| Required parameter made optional | BREAKING | Removes validation guarantee callers relied on |
| Optional parameter made required | BREAKING | Callers that omit it now fail |
| Optional parameter removed | WARN | Callers passing it may get unexpected behavior |
| Tool added | SAFE | Additive, no existing callers affected |
| New optional parameter added | SAFE | Existing callers unaffected |
| Description changed | SAFE | No functional impact |
| Default value changed | SAFE | Callers that relied on old default may see behavior change (consider as WARN in sensitive contexts) |
CI integration
Add to your GitHub Actions workflow:
- name: Check MCP schema compatibility
run: |
pip install mcp-compat
mcp-compat schema-before.json schema-after.json --ci
Or capture the schema before a deploy:
# Before deploy
mcp-compat-capture > schema-before.json # save current schema
# After deploy candidate is ready
mcp-compat schema-before.json schema-after.json --ci
JSON output
mcp-compat before.json after.json --json
{
"breaking_count": 1,
"warn_count": 0,
"safe_count": 2,
"changes": [
{
"severity": "BREAKING",
"tool": "get_weather",
"message": "Parameter 'units' type changed: string → integer"
},
{
"severity": "SAFE",
"tool": "get_weather",
"message": "New optional parameter 'format' added"
}
]
}
Part of the MCP developer lifecycle
agent-friend lint schemas before publishing
mcp-patch security audit (prompt injection, over-permission)
mcp-pytest test tool behavior end-to-end
mcp-snoop debug stdio traffic in real time
mcp-diff detect schema changes between versions
mcp-compat classify breaking changes ← you are here
All on PyPI. All open-source. All zero external dependencies.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_compat-0.1.0.tar.gz.
File metadata
- Download URL: mcp_compat-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08e0d748816906aeec4d5fe9289fb510ade996f0704a888aca7bc6ab82a08973
|
|
| MD5 |
d7f57f634b358bccbe4f53e3e5a39305
|
|
| BLAKE2b-256 |
a71bfc6289d989321fcc6e2c22292ecbacee7d2a41e82f282dcd87708a1d7fc6
|
File details
Details for the file mcp_compat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_compat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2eea04b35df53ff6075a3bb4e9395f6651d649b2371fc3ba43a3903fbdf582f2
|
|
| MD5 |
062a9945d44770e787a75c8ccc4732cd
|
|
| BLAKE2b-256 |
2c84736575d33b56a241a15e5cdb52e18ac0f73785a280778b75d7af05994c83
|