mcp-spec-checker
БесплатноБез исполняемых скриптовНе проверенPredicate-level semantic diff for MCP protocol specs. Compares 0618 vs 1125 specs via Narya types, GF(3) evaluators, and Unison-style effects. Use for…
от plurigrid★ 73 звезды на GitHubОб этом скилле
MCP Spec Checker
Semantic diff engine for MCP protocol specifications using three independent verification approaches with mandatory cross-validation.
Three Verification Approaches
| Approach | File | Trit | Role |
|---|---|---|---|
| Narya Types | src/mcp_narya_types.py |
-1 (MINUS) | chk/syn/nosyn bidirectional typing |
| Agent-o-rama Evaluators | src/mcp_evaluators.py |
0 (ERGODIC) | GF(3) predicate evaluation |
| Unison Effects | src/mcp_effects.py |
+1 (PLUS) | Algebraic effect handlers |
GF(3) Conservation: (-1) + 0 + (+1) = 0 ✓
GF(3) Trit Assignments for Predicates
# From src/mcp_spec_predicates.py
PREDICATE_TRITS = {
# MINUS (-1): Constraint/validation predicates
"has_required_field": -1,
"type_matches": -1,
"schema_valid": -1,
# ERGODIC (0): Coordination predicates
"version_compatible": 0,
"capability_negotiated": 0,
"session_active": 0,
# PLUS (+1): Generation/action predicates
"tool_invoked": +1,
"response_emitted": +1,
"resource_created": +1,
}
Denotation
This skill compares MCP protocol specs at the predicate level, detecting semantic differences between versions and generating minimal counterexamples for incompatibilities via cross-validated triadic verification.
SemanticDiff = Inv_0618 △ Inv_1125 (symmetric difference)
Counterexample: min{msg : Inv_0618(msg) ≠ Inv_1125(msg)}
Consensus: ∀ approach ∈ {Narya, Evaluators, Effects}: result_agree
Invariant Set
| Invariant | Definition | Verification |
|---|---|---|
SpecVersionCompatibility |
Old spec passing → new spec passing OR documented breaking change | Diff analysis |
PredicateConsistency |
Same predicate → same trit across versions | Trit comparison |
CrossValidationConsensus |
All 3 approaches agree on validity | Bisimulation game |
CounterexampleMinimality |
Generated counterexamples are minimal witnesses | Size minimization |
GF(3) Typed Effects
| Approach | Trit | Effect | Description |
|---|---|---|---|
| Narya Types | -1 | VALIDATOR | Type-checks messages via chk/syn/nosyn |
| Evaluators | 0 | COORDINATOR | Runtime predicate evaluation |
| Unison Effects | +1 | GENERATOR | Generates effect traces and fixes |
Narya Compatibility
| Field | Definition |
|---|---|
before |
Initial spec version (e.g., 0618) |
after |
Target spec version (e.g., 1125) |
delta |
Semantic diff (strengthened, relaxed, breaking) |
birth |
Null spec (no predicates) |
impact |
1 if breaking changes detected |
Condensation Policy
Trigger: When 3 incompatible predicates are detected.
Action: Generate migration guide, emit counterexamples, mark as BREAKING.
Invariant Sets
Inv_0618 (June 2024 Spec)
Inv_0618 = {
"initialize_required": True,
"tools_list_before_invoke": True,
"prompt_field_required": False,
"result_or_error_exclusive": True,
"capabilities_optional": True,
}
Inv_1125 (November 2025 Spec)
Inv_1125 = {
"initialize_required": True,
"tools_list_before_invoke": False, # BREAKING CHANGE
"prompt_field_required": True, # BREAKING CHANGE
"result_or_error_exclusive": True,
"capabilities_optional": False, # BREAKING CHANGE
}
Semantic Diff (Not Text Diff)
from mcp_spec_unified import semantic_diff
diff = semantic_diff(Inv_0618, Inv_1125)
# Output:
# {
# "breaking": [
# {"predicate": "tools_list_before_invoke", "0618": True, "1125": False},
# {"predicate": "prompt_field_required", "0618": False, "1125": True},
# {"predicate": "capabilities_optional", "0618": True, "1125": False},
# ],
# "compatible": [
# {"predicate": "initialize_required", "value": True},
# {"predicate": "result_or_error_exclusive", "value": True},
# ],
# "gf3_balance": 0 # Sum of predicate trits
# }
Counterexample Generation
When predicates disagree, generate minimal counterexamples:
from mcp_spec_unified import generate_counterexample
# Find minimal message that passes 0618 but fails 1125
counterex = generate_counterexample(
spec_pass=Inv_0618,
spec_fail=Inv_1125,
predicate="prompt_field_required"
)
# Output:
# {
# "message": {"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "example"}},
# "0618_result": "PASS",
# "1125_result": "FAIL: missing required field 'prompt'",
# "fix": {"params": {"name": "example", "prompt": ""}}
# }
Cross-Validation (All 3 Approaches Must Agree)
from mcp_spec_unified import cross_validate
result = cross_validate(
message={"jsonrpc": "2.0", "method": "tools/call", ...},
spec_version="1125"
)
# Output:
# {
# "narya_types": {"result": "VALID", "trit": -1, "mode": "chk"},
# "evaluators": {"result": "VALID", "trit": 0, "predicates_passed": 12},
# "unison_effects": {"result": "VALID"
Установить mcp-spec-checker в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл mcp-spec-checker?
Predicate-level semantic diff for MCP protocol specs. Compares 0618 vs 1125 specs via Narya types, GF(3) evaluators, and Unison-style effects. Use for protocol verification, spec migration, or detecting breaking changes.
Как установить скилл mcp-spec-checker?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mcp-spec-checker запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic