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

The Aura-to-LWC conversion MCP tools are part of the `aura-experts` toolset. These MCP tools are superseded by [the `experience-aura-lwc-migrate` skill](/docs/platform/lwc/guide/afv-lwc-skills.md).

:::note
MCP Tools for LWC is a pilot or beta service that is subject to the Beta Services Terms at [Agreements - Salesforce.com](https://www.salesforce.com/company/legal/agreements/) or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the [Product Terms Directory](https://ptd.salesforce.com/). Use of this pilot or beta service is at the Customer's sole discretion.
:::

To use the `aura-experts` toolset, pass the `--toolsets` flag as part of the `args` property of your MCP configuration file. We recommend that you specify both `lwc-experts` and `aura-experts` toolsets as the latter can call on tools in the `lwc-experts` toolset for Aura-to-LWC conversion workflows.

```json
{
  "mcpServers": {
    "Salesforce DX": {
      "command": "npx",
      "args": [
        "-y",
        "@salesforce/mcp@latest",
        "--orgs",
        "DEFAULT_TARGET_ORG",
        "--toolsets",
        "lwc-experts,aura-experts"
      ]
    }
  }
}
```

For more information, see [Install and Configure the Salesforce DX MCP Server (Beta)](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_mcp_server.htm) in the *Salesforce DX Developer Guide*.

The `aura-experts` toolset includes these tools to facilitate Aura-to-LWC conversion.

- `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 identiy any migration unknowns. 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.

:::important
When working with these tools using Agentforce Vibes Extension, you must enable the `a4d-general-rules-no-edit.md` and `a4d-lwc-rules-no-edit.md` global rules. The `a4d-general-rules-no-edit.md` rule is enabled by default. For more information on configuring rules in Agentforce Vibes, see [Agentforce Rules](https://developer.salesforce.com/docs/platform/einstein-for-devs/guide/devagent-rules.md) in the *Agentforce Vibes Extension Developer Guide*.
:::

## Migration Tools

Here are some possible prompts that invoke the migration and integration MCP tools.

### Create Aura Blueprint Draft (`create_aura_blueprint_draft`)

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>`

### Enhance Aura Blueprint Draft (`enhance_aura_blueprint_draft`)

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>`

### Dispatch Component Creation (`transition_prd_to_lwc`)

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>`

### Orchestrate Aura-to-LWC Migration (`orchestrate_aura_migration`)

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>`

## Migration Workflow

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.

### Orchestrated Migration

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.

```bash
Convert this Aura component to LWC using the official Aura to LWC migration assistant or the most complete automated process available.
Handle all technical details for me and follow LWC best practices, as well generate jest tests for it.
```

### Controlled Migration

We recommend that you use the [orchestrated migration](#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 `create_aura_blueprint_draft` with the full Aura bundle files mapped into a JSON.
2. Feed the draft to `enhance_aura_blueprint_draft` to enhance UX, data, events, accessibility, and acceptance criteria.
3. Confirm migration readiness using `transition_prd_to_lwc` to translate the enhanced PRD into LWC generation instructions.
4. Generate LWC using `create_lwc_component_from_prd` 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.

- [Best practices](/docs/platform/lwc/guide/mcp-lwc.md): `guide_lwc_best_practices`
- [Accessibility](/docs/platform/lwc/guide/mcp-lwc.md): `guide_component_accessibility`
- [Data integrity](/docs/platform/lwc/guide/mcp-lds.md): `guide_lds_development`, `guide_lds_referential_integrity`, `guide_lds_data_consistency`
- [Testing workflow](/docs/platform/lwc/guide/mcp-testing.md): `orchestrate_lwc_component_testing`

:::note
To run a comprehensive assessment of your conversion, consider using the [migration verification tool](/docs/platform/lwc/guide/mcp-migration.md).
:::

## Usage Considerations

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.

:::note
MCP Tools for LWC 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**

- [Salesforce DX MCP Server](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_mcp.htm)
- [LWC MCP Tools Reference](/docs/platform/lwc/guide/mcp-reference.md)
- [Migration Strategy](/docs/platform/lwc/guide/migrate-strategy.md)
- [Migrate Aura Components](/docs/platform/lwc/guide/migrate-introduction.md)
