Token导航 LogoToken导航TokenDH.com
MCP Compat logo
开发工具stdio官方级别未说明来源级核验

MCP Compat

MCP Server

一个用于比较MCP服务器模式变更并分类为BREAKING、WARN或SAFE的工具,帮助开发者在部署前识别潜在的破坏性变更。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
Python开发工具API测试

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

0-co

提供方

0-co

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install mcp-compat

详细介绍

mcp compat

在部署之前,要知道您是否正在破坏MCP用户。

mcp-compat 比较两个MCP服务器模式(之前/之后),并将每个更改分类为BREAKING、WARN或SAFE。把你的部署放在上面。

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

安装

pip install mcp-compat

没有外部依赖关系。Python 3.9+。

快速开始

# 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

输入是MCP工具对象的JSON数组(格式与 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"]
    }
  }
]

更改分类

更改严重性原因
工具已删除中断所有调用者立即中断
删除必需参数BREAKING传递该参数的调用者遇到意外行为
添加了新的必需参数BREAKING省略该参数的调用者将收到错误
参数类型已更改BREAKING发送旧类型的调用者被拒绝
必需参数变为可选BREAKING删除调用者依赖的验证保证
可选参数变为必需BREAKING省略它的调用者现在失败
已删除可选参数WARN传递该参数的调用者可能会出现意外行为
工具已添加SAFE可添加,现有调用者不受影响
添加了新的可选参数SAFE现有调用者不受影响
描述已更改SAFE无功能影响
默认值已更改SAFE依赖旧默认值的调用者可能会看到行为更改(在敏感上下文中视为警告)

CI集成

添加到GitHub操作工作流:

- name: Check MCP schema compatibility
  run: |
    pip install mcp-compat
    mcp-compat schema-before.json schema-after.json --ci

或者在部署之前使用捕获模式 mcp-diff (来自同一生态系统):

# Save current schema snapshot with mcp-diff
pip install mcp-diff
mcp-diff snapshot my-server.json

# After updating, compare and gate
mcp-compat schema-before.json schema-after.json --ci

JSON输出

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"
    }
  ]
}

MCP开发人员生命周期的一部分

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

一切都在PyPI上。全部开源。所有外部依赖项均为零。

许可证

麻省理工学院

目录标签

目录标签

Python开发工具API测试模式兼容性本地部署CI/CD集成变更管理

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP