mcp-app-verification
БесплатноБез исполняемых скриптовНе проверенComprehensive verification checklists for MCP Apps. Tests with basic-host reference, validates handler-before-connect, text fallback, resource URI linking…
от a5c-ai★ 1 947 звёзд на GitHubОб этом скилле
mcp-app-verification
Run comprehensive verification checklists for MCP Apps covering correctness, compatibility, and migration completeness.
Overview
MCP Apps have several critical invariants that must be verified before deployment. This skill provides systematic verification across multiple dimensions:
- Runtime verification: App loads and functions in basic-host reference
- Pattern verification: Critical code patterns are correct (handler-before-connect, text fallback)
- Build verification: Single-file bundle is valid and complete
- Styling verification: Host theming applies correctly
- CSP verification: All origins declared, no silent failures
- Migration verification: No remaining legacy patterns (OpenAI, old MIME types, snake_case)
Capabilities
basic-host Test Execution
- Build the MCP App
- Start the server
- Launch basic-host reference implementation against the server
- Verify app loads without console errors
- Verify handlers fire correctly
Handler-Before-Connect Invariant
- Search source code for
app.connect()call - Verify ALL handlers (
ontoolinput,ontoolresult,onhostcontextchanged,onteardown) are registered BEFORE connect - Flag violations -- handlers registered after connect will silently not work
Text Fallback Verification
- Search all tool handlers for
contentarray in return value - Verify each tool returns at least one
{ type: 'text', text: '...' }entry - Flag tools that only return
structuredContentwithout text fallback
Resource URI Link Integrity
- Extract all
resourceUrivalues fromregisterAppToolcalls - Extract all URIs from
registerAppResourcecalls - Verify every tool
resourceUrihas a matching registered resource - Flag orphaned resources (registered but not referenced)
Single-File Bundle Verification
- Build the project
- Verify
dist/mcp-app.html(or equivalent) exists - Check the HTML file is self-contained (no external
<script src>,<link href>,<img src>to relative paths) - Verify
vite-plugin-singlefileis in dev dependencies
Host Styling Verification
- Search CSS for
var(--color-*,var(--font-*,var(--border-radius-*patterns - Verify fallback values are present:
var(--color-background-primary, #ffffff)not justvar(--color-background-primary) - Check
onhostcontextchangedhandler exists and applies styling
CSP Verification
- Build and search output for network origins
- Compare against CSP configuration in
registerAppResource - Flag origins present in code but missing from CSP
- Verify conditional origins match between runtime and CSP config
Legacy Pattern Detection (Migration)
- Search for remaining OpenAI patterns:
window.openai.toolInput,window.openai.toolOutput,window.openai - Search for old metadata paths:
openai/ - Search for old MIME types:
text/html+skybridge - Search for hardcoded MIME type:
text/html;profile=mcp-app(should useRESOURCE_MIME_TYPE) - Search for snake_case CSP:
_domains"or_domains:(should be camelCase)
Usage
Full Verification Workflow
# Step 1: Build the project
npm run build
# Step 2: Verify single-file bundle
ls -la dist/mcp-app.html
# Should be a single file with all assets inlined
# Step 3: Check for external references in bundle
grep -E '<script src="|<link.*href="|<img src="(?!data:)' dist/mcp-app.html
# Should return NOTHING (all assets inlined)
# Step 4: Start server
npm run serve &
SERVER_PID=$!
# Step 5: Test with basic-host
cd /tmp/mcp-ext-apps/examples/basic-host
SERVERS='["http://localhost:3001/mcp"]' npm run start
# Verify: app loads, handlers fire, styling applies
# Step 6: Stop server
kill $SERVER_PID
Pattern Verification Commands
# Handler-before-connect check
# Find app.connect() and verify handlers are above it
grep -n 'app\.connect\|\.ontoolinput\|\.ontoolresult\|\.onhostcontextchanged\|\.onteardown' src/main.ts
# Text fallback check
# Every tool handler should return content array
grep -A5 'return {' src/server.ts | grep -c 'content:'
# Resource URI linking
grep 'resourceUri' src/server.ts
grep "registerAppResource" src/server.ts
# RESOURCE_MIME_TYPE usage (not hardcoded)
grep 'RESOURCE_MIME_TYPE' src/server.ts
grep "text/html;profile" src/server.ts # Should NOT match
# CSS variable fallbacks
grep -c 'var(--.*,' src/global.css # Count with fallbacks
grep 'var(--' src/global.css | grep -v ',' # Flag missing fallbacks
Migration Verification (OpenAI -> MCP)
# Server-side legacy patterns
grep -rn 'openai/' src/ # Old metadata paths
grep -rn 'text/html+skybridge' src/ # Old MIME type
grep -rn "text/html;profile=mcp-app" src/ # Hardcoded (use RESOURCE_MIME_TYPE)
grep -rn '_domains"' src/ # Snake_case CSP
grep -rn "_domains:" src/ # Snake_case CSP
# Client-side legacy patterns
grep -rn 'window\.openai\.toolInput' src/
grep -rn 'window\.openai\.toolOutput' src/
grep -rn 'window\.openai' src/
# All
Установить mcp-app-verification в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadBashGlobGrepВложенные файлы
FAQ
Что делает скилл mcp-app-verification?
Comprehensive verification checklists for MCP Apps. Tests with basic-host reference, validates handler-before-connect, text fallback, resource URI linking, single-file bundling, host styling, CSP, and legacy pattern detection.
Как установить скилл mcp-app-verification?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mcp-app-verification запускает скрипты?
Нет, скилл состоит только из инструкций (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