Use the Aura-to-LWC Migration Tools (Beta)

The Aura-to-LWC conversion MCP tools are part of the aura-experts toolset.

  • create_aura_blueprint_draft - Creates a comprehensive Product Requirements Document (PRD) blueprint for Aura component migration. Analyzes Aura component files and generates framework-agnostic specifications suitable for LWC migration, including business requirements, technical patterns, and migration guidelines.

  • enhance_aura_blueprint_draft - Enhances an existing draft PRD with expert analysis and unknown resolution. Takes a draft blueprint and applies specialized Aura expert knowledge to resolve dependencies, add technical insights, and improve the migration specifications for better LWC implementation guidance.

  • transition_prd_to_lwc - Provides migration bridge guidance for creating LWC components from Aura specifications. Takes the enhanced PRD and generates specific implementation guidance, platform service mappings, and step-by-step instructions for building the equivalent LWC component.

  • orchestrate_aura_migration - Orchestrates the complete Aura-to-LWC migration workflow. Provides end-to-end guidance for the entire migration process, from initial analysis through final implementation, including best practices, tooling recommendations, and quality assurance steps.

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 possible prompts that invoke the migration and integration MCP tools.

Ask about analyzing an Aura component and generating a PRD blueprint that contains the component's structure, functionality, and requirements.

  • Analyze these Aura components and draft a migration PRD blueprint with UX, data, and events. <paste files>
  • Generate a framework-agnostic LWC specification from these Aura files, including requirements and constraints. <paste files>
  • Extract business rules and user flows from the Aura code and outline LWC acceptance criteria. <paste files>

Ask about enhancing the PRD blueprint and resolving unknowns.

  • Review this draft PRD, resolve unknowns/dependencies, and add technical risks and mitigations. <paste draft>
  • Enrich the blueprint with SLDS guidance and platform service mappings (LDS, UI API, Navigation). <paste draft>
  • Turn vague requirements into testable specs with measurable acceptance criteria and a closed questions log. <paste draft>

Ask about implementing an LWC component based on the enhanced blueprint.

  • From the enhanced PRD, produce an LWC component breakdown, file scaffolds, public API, wires, and events. <paste PRD>
  • Map Aura patterns (component/app events, attributes) to LWC equivalents and provide code scaffolds. <paste PRD>
  • Generate a step-by-step LWC build plan with migration bridge notes and an implementation checklist. <paste PRD>

Ask about a comprehensive migration plan with a testing and verification strategy.

  • Create an end-to-end Aura-to-LWC migration plan with phases, timeline, and QA gates. <paste context>
  • Define a verification strategy: Jest unit tests, a11y checks, UI regression, and parity matrix. <paste context>
  • Produce a risk register, rollback strategy, and environment/deployment steps for the migration. <paste context>

Choose one of these methods to use the aura-experts toolset for Aura-to-LWC migration.

  • Orchestrated migration: This is the recommended migration workflow. Use orchestrate_aura_migration to analyze an Aura component, draft a PRD, enhance the draft, and then dispatch LWC creation in one go. Orchestrated migration is preferred if the Aura component is small or medium and self-contained with no dependencies. The tool calls on the other migration tools.
  • Controlled migration: Run the steps separately to review and tweak at each stage. The tools can be run sequentially to generate a PRD of the Aura component's requirements for LWC migration (create_aura_blueprint_draft), followed by enhancing the blueprint (enhance_aura_blueprint_draft), and then creating the corresponding LWC component (transition_prd_to_lwc). Controlled migration is useful if you need to iterate and align with product stakeholders or if there are unknown external dependencies.

When using orchestrated migration, orchestrate_aura_migration runs the migration tools in order, using the output of one to inform the next step. You can tweak the inputs before you proceed to run the next tool. Each tool provides detailed instructions for completing that phase of the migration.

  1. Drafts a PRD in YAML format using create_aura_blueprint_draft.
  2. Enhances the PRD using enhance_aura_blueprint_draft.
  3. Confirms migration readiness using transition_prd_to_lwc.
  4. Generate LWC component files using create_lwc_component.
  5. Optimize and test the component using orchestrate_lwc_component_optimization.

For example, you can invoke the orchestrate_aura_migration tool by running this prompt.

We recommend that you use the orchestrated migration workflow where possible. With controlled migration, you create a prompt that invokes the next step, which gives you more control over the input for each step. Here are the recommended steps to run a controlled migration.

  1. Draft PRD from Aura using sf-aura-create-blueprint-draft with the full Aura bundle files mapped into a JSON.
  2. Feed the draft to sf-aura-enhance-blueprint-draft to enhance UX, data, events, accessibility, and acceptance criteria.
  3. Confirm migration readiness using sf-aura-dispatch-component-creation to translate the enhanced PRD into LWC generation instructions.
  4. Generate LWC using sf-lwc-create-component with the PRD body to create LWC scaffolding.

After your LWC code is generated, we recommend that you optimize and test the component using these tools.

When using the tools, keep these considerations in mind.

  • Include the entire Aura bundle as partial input reduces PRD quality.
  • Be explicit about event payloads, public API, and cross-component communication as it improves generated LWC quality.
  • Iterate blueprint generation (draft and enhance) several times before dispatching creation.

MCP tools for LWC development uses generative AI, which can produce inaccurate or harmful responses. The output generated by AI is often nondeterministic. Before using the generated output, review it for accuracy and safety. You assume responsibility for how the outcomes are applied to your organization.

See Also