docs: add MCP server architecture document for gen-1 Spectrum Web Com…#6079
docs: add MCP server architecture document for gen-1 Spectrum Web Com…#6079blunteshwar wants to merge 13 commits intomainfrom
Conversation
…ponents Defines the architecture for an MCP server exposing gen-1 component APIs (properties, events, slots, CSS custom properties) with a forward-compatible design for gen-2 migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parse the migration status markdown table to extract structured migration entries with component name, status, and completed steps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement parseCEM() that extracts ComponentAPI objects from Custom Elements Manifest JSON. Handles property filtering (private/protected), inherited member annotations, deprecated normalization, and all CEM sections (attributes, events, slots, CSS properties, CSS parts, methods). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements ComponentRegistry class that stores ComponentAPI objects and supports querying by tag name, filtering by generation, full-text search across properties/events/slots/descriptions/css-properties with relevance scoring, and example management. Adds SearchSection type to types.ts. All 9 tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement parseReadmeExamples() that extracts ```html demo code blocks from component README files, using the nearest preceding heading as title. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validates HTML snippets against the component registry, flagging unknown attributes with typo suggestions (Levenshtein distance) and warning on deprecated attributes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Register all 6 tools (list_components, get_component_api, get_component_examples, search_components, validate_usage, get_migration_info) and wire up the stdio transport with component/migration data loading at startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests list_components, get_component_api, get_component_examples, search_components, validate_usage, and get_migration_info flows using real test fixtures and the full module stack. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The repo generates a single monolithic custom-elements.json at 1st-gen/projects/documentation/ rather than per-package files. Add parseMonolithicCEM() that derives package names from module paths, and update index.ts to try monolithic CEM first with per-package fallback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…RATION_STEPS Address code review findings: - Use z.enum() instead of z.string() for sections/searchIn params in get_component_api and search_components tools to validate input at the MCP boundary - Export MIGRATION_STEPS from migration-parser and reuse in index.ts instead of duplicating the array Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Implements a fully functional MCP (Model Context Protocol) server for Spectrum Web Components, enabling AI tools like Claude to understand and work with SWC components natively.
list_components,get_component_api,get_component_examples,search_components,validate_usage,get_migration_infocustom-elements.jsongenerated bydocs:analyze, loading 95 components automatically@adobe/spectrum-wc/{component}equivalentsHow to test
Related
@react-spectrum/mcp