Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature: Contract verification panel (pin tool contracts, diff on reconnect)

已关闭
#2,727 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start by tracing the Inspector’s existing tools, resources, prompts, and reconnect flows, then read the linked PIN-SPEC and reference implementation for hashing and comparison behavior. Identify the UI entry point and existing test locations for connection and inspection features. Done means a connected server can pin canonicalized contract hashes, compare them after reconnect, and display added, removed, and changed tools with the proposed direction grading.

由索引模型根据 Issue 内容生成。

描述

Feature: Contract verification panel (pin tool contracts, diff on reconnect)

Problem

The Inspector shows a server's current tools, resources, and prompts at a point in time. But there is no way to know if the tool contracts changed between sessions. MCP servers can silently add, remove, or modify tool definitions between connections (deploy, version bump, feature flag), and the Inspector has no mechanism to surface this.

We ran a drift watch over 24 popular MCP servers for two months and found 336 silent contract changes, including silent tool removals (Shopify dropped two validators, HubSpot removed a tool with no release notes channel). Full corpus: rugsnare drift-watch.

Proposal

Add a "Contract" tab or panel that:

  1. Pins the surface on first connect: hash each tool's {name, description, inputSchema} by canonicalized sha-256
  2. Compares on reconnect: after a server restart/reconnect, diff the current tools/list against the pinned snapshot
  3. Surfaces changes: show added / removed / changed tools with direction grading (breaking, loosened, expanded, cosmetic)

This would complement the Inspector's existing inspection capabilities with a temporal dimension: not just "what does this server expose" but "has what it exposes changed since I last looked."

Reference implementation

We ship a standalone CLI that does exactly this (rugsnare, Apache-2.0, zero dependencies). The Inspector could either integrate the hashing/comparison logic directly or shell out to rugsnare as an optional dependency. The pin format is an open spec (PIN-SPEC) with a POLICY class for verifier upgrades and an IDENTITY class for deployment changes.

Use cases
  • Developer: connect to a dev server, pin, upgrade the server, reconnect, see what changed before your agent does
  • Security reviewer: pin a production server, monitor for contract drift as part of an audit
  • CI gate: the same pins can be used in CI to fail builds on breaking contract changes

The OWASP MCP Security Cheat Sheet now recommends pinning tool contracts (PR #2764, merged; cheat sheet), so this aligns with where the ecosystem is heading.

主要语言
TypeScript
星标
11.1k
派生
1.6k
平均合并
5 小时 38 分钟
30 天内合并 PR
152

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/inspector 的其他 Issue

查看 modelcontextprotocol/inspector 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。