Custom Elements Manifest tooling for Claude Code, providing both Language Server Protocol (LSP) and Model Context Protocol (MCP) support for custom elements.
- Tag Completion: Auto-complete custom element tag names in HTML
- Attribute Completion: Intelligent attribute suggestions based on element definitions
- Hover Documentation: View element and attribute documentation on hover
- Go-to-Definition: Navigate to element class definitions
- Diagnostics: Real-time validation and error reporting
- Code Actions: Quick fixes for missing imports and common issues
- Component Discovery: Find available custom elements in your project
- Attribute Validation: Get accurate attribute names, types, and values
- HTML Generation: AI-generated valid HTML with proper component usage
- Documentation Access: Access component descriptions and usage guidelines
- Design System Compliance: Automatic adherence to your design tokens
/a11y-review: Review custom element HTML for accessibility issues using manifest-documented patterns/docs-health: Audit element manifests for documentation completeness — find missing descriptions, undocumented APIs/design-api: Design a custom element's public API with consistency checks against existing elements/gen-tests: Generate test scaffolding for custom elements based on their manifest API surface/write-docs: Generate element documentation with usage examples, attribute tables, and integration guidance/compose: Suggest which elements to combine for a UI goal, with validated composed HTML/migrate: Compare manifest versions to find breaking changes and generate migration steps/react: Use custom elements in React with version-appropriate patterns (React 18 wrappers vs React 19 native)/vue: Use custom elements in Vue withisCustomElementconfig, slot syntax, and v-model setup/angular: Use custom elements in Angular withCUSTOM_ELEMENTS_SCHEMA, forms integration, and typing/write-demos: Write demo HTML partials forcem servewith correct metadata, imports, and structure/cem-serve: Set up and configurecem servefor custom element development with live reload and demos
Choose your preferred method:
Via npm:
npm install -g @pwrs/cemVia Go:
go install bennypowers.dev/cem@latestVerify installation:
cem versionAdd this marketplace to Claude Code:
/plugin marketplace add bennypowers/cem
Then install the plugin:
/plugin install cem
The LSP activates automatically for:
- HTML files (
.html,.htm) - TypeScript files (
.ts,.tsx) - JavaScript files (
.js,.mjs,.cjs)
Simply open a file with custom elements and start typing!
The MCP server activates automatically when the plugin is installed. Use it by asking questions like:
- "What custom elements are available in this project?"
- "Tell me about the
my-buttoncomponent" - "Create a form with my-input and my-button components"
The AI will have direct access to your component manifests and can generate accurate HTML using your design system.
The plugin works out-of-the-box with zero configuration. CEM automatically:
- Discovers
custom-elements.jsonmanifests in your project - Scans
node_modulesfor component libraries - Provides intelligent completions and diagnostics
Create a .config/cem.yaml in your project root for advanced options:
# Exclude patterns
exclude:
- "**/*.spec.ts"
- "dist/**"
# Additional manifest paths
manifests:
- "./custom-manifests/components.json"-
Verify CEM is installed and in PATH:
which cem cem lsp --help
-
Check Claude Code logs for errors:
/logs -
Restart the LSP server:
/lsp restart
-
Ensure your project has a
custom-elements.jsonmanifest:cem generate
-
Check that the manifest is valid:
cem validate
-
Verify component libraries in
node_moduleshave manifests
For large projects, exclude unnecessary files:
# .config/cem.yaml
exclude:
- "node_modules/**"
- "dist/**"
- "**/*.test.ts"-
Verify the MCP server is loaded:
/mcp -
Check that CEM is installed:
which cem cem mcp --help
-
Restart Claude Code to reload the MCP server
GPL-3.0 - See LICENSE for details