Use the LWC Development MCP Tools (Beta)
The LWC development MCP tools speed up component creation from PRD specifications and facilitates with Jest test coverage and validation.
create_lwc_component
- Creates LWC components from PRD specifications with proper structure and best practicescreate_lwc_jest_tests
- Generates comprehensive Jest test suites for LWC components with coverage and mockingreview_lwc_jest_tests
- Reviews and validates Jest test implementations for LWC components
MCP Tools for LWC Development is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.
The tools are invoked automatically based on your prompts. Here are some sample prompts that invoke the LWC development MCP tools.
Ask about creating a component based on a PRD.
- Create an LWC component named accountList from this PRD:
<paste PRD>
- From the PRD below, generate the contactCard component.
<paste PRD>
- Generate an LWC component that that displays a list of cases using getListUi based on this PRD.
<paste PRD>
Ask about generating Jest tests that cover your use cases.
- Generate Jest tests for this component covering load, success, empty, and error states.
- Create tests for this component including user interactions, DOM updates, and wire errors.
- Mock lightning/uiRecordApi (getRecord, getFieldValue) and test events for this component.
Ask about reviewing and validating Jest tests and identifying coverage gaps.
- Validate that tests for this component follow LWC Jest best practices and proper cleanup.
- Review tests for this component and suggest missing cases and mocking improvements.
- Assess tests for this component for async handling and coverage gaps.
See Also