> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automated Migration to Para with MCP

> Use AI-powered tooling to automatically migrate your app from Privy, Reown, Web3Modal, or WalletConnect to Para

The [Para Migration MCP Server](https://github.com/getpara/Para-Migration-MCP) is an AI-powered Model Context Protocol (MCP) server that automates wallet provider migrations to Para. Instead of manually rewriting providers, hooks, imports, and configuration, you can run the migration through your AI coding assistant and have it handle the entire process atomically — all changes succeed together or roll back automatically.

It works with Claude Code, Cursor, and Claude Desktop, and supports migrations from Privy, Reown (AppKit), Web3Modal, and WalletConnect.

## Supported Migration Paths

| Source Provider | Strategy                | Description                                                                    |
| --------------- | ----------------------- | ------------------------------------------------------------------------------ |
| Privy           | `privy-to-para`         | Replaces `PrivyProvider`, `usePrivy`, `useWallets`, and related hooks          |
| Reown / AppKit  | `reown-to-para`         | Replaces `AppKit`, `useAppKit`, `useAppKitAccount`, and related hooks          |
| Web3Modal       | `web3modal-to-para`     | Replaces `Web3Modal`, `useWeb3Modal`, `useWeb3ModalAccount`, and related hooks |
| WalletConnect   | `walletconnect-to-para` | Replaces WalletConnect provider and connector configuration                    |

## Prerequisites

Before starting, make sure you have:

* A Para API key from the [Developer Portal](https://developer.getpara.com/)
* Node.js 18+ installed
* An existing project using one of the supported wallet providers above
* An AI tool that supports MCP: [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Cursor](https://www.cursor.com/), or [Claude Desktop](https://claude.ai/download)

## Installation

Add the Migration MCP server to your AI tool of choice:

<Tabs>
  <Tab title="Claude Code">
    Run the following command in your terminal:

    ```bash theme={null}
    claude mcp add para-migration -- npx -y para-migration-mcp
    ```

    Restart Claude Code to pick up the new server.
  </Tab>

  <Tab title="Cursor">
    Add the following to your `.cursor/mcp.json` file (create it if it doesn't exist):

    ```json .cursor/mcp.json theme={null}
    {
      "mcpServers": {
        "para-migration": {
          "command": "npx",
          "args": ["-y", "para-migration-mcp"]
        }
      }
    }
    ```

    Restart Cursor to pick up the new server.
  </Tab>

  <Tab title="Claude Desktop">
    Add the following to your Claude Desktop configuration file:

    * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
    * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

    ```json claude_desktop_config.json theme={null}
    {
      "mcpServers": {
        "para-migration": {
          "command": "npx",
          "args": ["-y", "para-migration-mcp"]
        }
      }
    }
    ```

    Restart Claude Desktop to pick up the new server.
  </Tab>
</Tabs>

## Step-by-Step Migration

Once the MCP server is connected, walk through these steps in your AI tool's chat interface. Each step corresponds to an MCP tool that runs automatically behind the scenes.

<Steps>
  <Step title="Analyze Your Project">
    Start by asking your AI assistant to analyze your project:

    ```text theme={null}
    Analyze my project at ./my-app for wallet provider usage
    ```

    This runs the `analyze_project` tool, which scans your project's dependencies, imports, provider components, hooks, and styles. It returns:

    * The detected wallet provider (Privy, Reown, Web3Modal, or WalletConnect)
    * The recommended migration strategy
    * A summary of all provider-related code found (hooks, providers, imports)

    <Note>
      If your project uses a non-standard structure, you can also specify the path to your `package.json` directly.
    </Note>
  </Step>

  <Step title="Check Wagmi Compatibility">
    Para maintains full [Wagmi](https://wagmi.sh/) compatibility, so your existing Wagmi hooks continue to work after migration. Verify this by asking:

    ```text theme={null}
    Check Wagmi hook compatibility for my project at ./my-app
    ```

    This runs `check_compatibility` and reports which Wagmi hooks are in use and whether they're compatible with Para's provider.
  </Step>

  <Step title="Preview the Migration (Dry Run)">
    Before making any changes, preview what the migration will do:

    ```text theme={null}
    Run a dry run migration from Privy to Para for my project at ./my-app
    ```

    This runs `execute_atomic_migration` with `dryRun: true`. It returns a detailed list of every operation that **would** be performed — dependency removals, import replacements, provider swaps, hook updates, and CSS additions — without actually modifying any files.

    Review the output to make sure you're comfortable with the changes.
  </Step>

  <Step title="Execute the Migration">
    When you're ready, execute the migration:

    ```text theme={null}
    Execute the atomic migration from Privy to Para for my project at ./my-app
    ```

    This runs `execute_atomic_migration` with `dryRun: false`. The migration is **atomic** — either all operations succeed together, or everything rolls back to the original state. You'll never be left with a half-migrated project.

    The tool will:

    1. Remove old wallet provider imports
    2. Add Para SDK imports
    3. Replace provider components with `ParaProvider`
    4. Update hook usages (e.g., `usePrivy` becomes `useAccount`)
    5. Add Para CSS imports to your entry point

    <Warning>
      Make sure your project is committed to version control before running the migration, so you can easily review the diff afterward.
    </Warning>
  </Step>

  <Step title="Validate the Migration">
    After the migration completes, run validation to catch the issues that cause 90% of migration failures:

    ```text theme={null}
    Validate my Para migration at ./my-app
    ```

    This runs `validate_para_migration` and checks for five critical issues:

    1. **Modal ownership** — use the modal embedded in `<ParaProvider>`, or disable it before rendering your own `<ParaModal />`
    2. **CSS imports missing** — `@getpara/react-sdk/styles.css` must be imported in your entry point
    3. **Environment enum** — Must use `Environment.DEVELOPMENT` (not the string `"development"`)
    4. **Old dependencies present** — Old provider packages should be fully removed
    5. **Para dependencies missing** — `@getpara/react-sdk` must be installed

    You can also check the overall migration completion percentage:

    ```text theme={null}
    Check migration completion state for ./my-app
    ```

    This runs `validate_migration_state` and returns a breakdown of how much of the migration is complete across dependencies, imports, providers, hooks, and styles.
  </Step>

  <Step title="Install Updated Dependencies">
    Based on the validation output, update your dependencies:

    ```bash Terminal theme={null}
    # Remove old provider packages
    npm uninstall @privy-io/react-auth       # For Privy migrations
    npm uninstall @reown/appkit @reown/appkit-adapter-wagmi  # For Reown migrations
    npm uninstall @web3modal/wagmi            # For Web3Modal migrations

    # Install Para SDK
    npm install @getpara/react-sdk
    ```

    Then run your project to verify everything works:

    ```bash Terminal theme={null}
    npm run dev
    ```
  </Step>
</Steps>

## Generating Additional Components

If you need to generate specific components after the migration, the MCP server includes several code generation tools you can invoke through your AI assistant.

### Provider Component

Generate a production-ready `ParaProvider` component:

```text theme={null}
Generate a Para provider component with my API key and mainnet + polygon chains
```

This runs `generate_provider_component` and outputs a complete provider with embedded modal configuration, CSS imports, and `Environment` enum already configured correctly.

### Connect Button

Generate a styled wallet connection button:

```text theme={null}
Generate a Para connect button with Tailwind styling
```

Supported styling options: `tailwind`, `styled-components`, `css-modules`, or `none`.

### CSS Imports

Auto-detect your project's entry point and generate the correct CSS import:

```text theme={null}
Generate CSS imports for my project at ./my-app
```

This runs `generate_css_imports` and detects whether your entry point is `main.tsx`, `layout.tsx`, `_app.tsx`, or another file, then generates the appropriate import statement.

### Hook Migration Examples

See before/after examples of how hooks change during migration:

```text theme={null}
Show me hook migration examples from Privy to Para
```

This runs `generate_hooks_examples` and shows the mapping for each hook — for example, `usePrivy` becomes `useAccount`, `useWallets` becomes `useWallet`, and so on. Supported source providers: `privy`, `reown`, `walletconnect`.

### Next.js Layout with Styles

Generate a complete Next.js root layout with Para styles properly imported:

```text theme={null}
Generate a Next.js layout with Para styles
```

This runs `generate_layout_with_styles` and outputs a `layout.tsx` file with the `@getpara/react-sdk/styles.css` import in the correct location.

## Common Issues

<Warning>
  **Duplicate ParaModal**: `ParaProvider` renders an embedded modal by default. Remove any separate `<ParaModal />`, or set `disableEmbeddedModal: true` in the provider config before rendering your own modal.
</Warning>

<Warning>
  **Missing CSS Import**: Para's modal requires its stylesheet. Make sure `@getpara/react-sdk/styles.css` is imported in your application's entry point (e.g., `layout.tsx`, `main.tsx`, or `_app.tsx`). Without it, the modal renders without styling.
</Warning>

<Warning>
  **Environment String vs Enum**: Use the `Environment` enum from `@getpara/react-sdk` rather than a plain string. For example, use `Environment.DEVELOPMENT` instead of `"development"`. Using a string will cause runtime errors.
</Warning>

## Tool Reference

Full parameter documentation for all 14 MCP tools provided by the migration server.

<Accordion title="Analysis Tools">
  **`analyze_project`** — Analyze a project to detect wallet provider usage and prepare a migration plan.

  | Parameter         | Type   | Required | Description                                     |
  | ----------------- | ------ | -------- | ----------------------------------------------- |
  | `projectPath`     | string | Yes      | Path to the project directory                   |
  | `packageJsonPath` | string | No       | Path to package.json (auto-detected if omitted) |

  ***

  **`check_compatibility`** — Check compatibility between current Wagmi hooks and Para.

  | Parameter     | Type   | Required | Description                   |
  | ------------- | ------ | -------- | ----------------------------- |
  | `projectPath` | string | Yes      | Path to the project directory |

  ***

  **`validate_migration`** — Validate migration setup and check for common issues.

  | Parameter     | Type   | Required | Description                                 |
  | ------------- | ------ | -------- | ------------------------------------------- |
  | `projectPath` | string | Yes      | Path to the project directory               |
  | `config`      | object | No       | Migration configuration to validate against |

  ***

  **`validate_para_migration`** — Validate the 5 critical issues that cause 90% of migration failures.

  | Parameter     | Type   | Required | Description                   |
  | ------------- | ------ | -------- | ----------------------------- |
  | `projectPath` | string | Yes      | Path to the project directory |

  ***

  **`validate_migration_state`** — Get migration completion percentage across dependencies, imports, providers, hooks, and styles.

  | Parameter     | Type   | Required | Description                   |
  | ------------- | ------ | -------- | ----------------------------- |
  | `projectPath` | string | Yes      | Path to the project directory |
</Accordion>

<Accordion title="Execution Tools">
  **`execute_atomic_migration`** — Execute a complete atomic migration with automatic rollback on failure.

  | Parameter     | Type    | Required | Default | Description                                                                                           |
  | ------------- | ------- | -------- | ------- | ----------------------------------------------------------------------------------------------------- |
  | `projectPath` | string  | Yes      | —       | Path to the project directory                                                                         |
  | `strategy`    | enum    | Yes      | —       | Migration strategy: `privy-to-para`, `reown-to-para`, `web3modal-to-para`, or `walletconnect-to-para` |
  | `dryRun`      | boolean | No       | `false` | Preview changes without modifying files                                                               |
</Accordion>

<Accordion title="Code Generation Tools">
  **`generate_migration_config`** — Generate a Para configuration object.

  | Parameter         | Type      | Required | Default                                     | Description                                                                    |
  | ----------------- | --------- | -------- | ------------------------------------------- | ------------------------------------------------------------------------------ |
  | `paraApiKey`      | string    | Yes      | —                                           | Your Para API key                                                              |
  | `environment`     | enum      | No       | `"development"`                             | `"development"` or `"production"`                                              |
  | `supportedChains` | number\[] | No       | `[1]`                                       | Chain IDs to support (e.g., `[1, 137]` for mainnet + Polygon)                  |
  | `wallets`         | string\[] | No       | `["METAMASK", "COINBASE", "WALLETCONNECT"]` | External wallets to enable: `METAMASK`, `COINBASE`, `WALLETCONNECT`, `RAINBOW` |

  ***

  **`generate_provider_component`** — Generate a React provider component for Para integration.

  | Parameter    | Type    | Required | Default | Description                                                |
  | ------------ | ------- | -------- | ------- | ---------------------------------------------------------- |
  | `config`     | object  | Yes      | —       | Migration configuration (from `generate_migration_config`) |
  | `typescript` | boolean | No       | `true`  | Generate TypeScript or JavaScript                          |

  ***

  **`generate_connect_button`** — Generate a styled connect button component.

  | Parameter    | Type    | Required | Default      | Description                                                                 |
  | ------------ | ------- | -------- | ------------ | --------------------------------------------------------------------------- |
  | `styling`    | enum    | No       | `"tailwind"` | Styling approach: `none`, `tailwind`, `styled-components`, or `css-modules` |
  | `typescript` | boolean | No       | `true`       | Generate TypeScript or JavaScript                                           |

  ***

  **`generate_css_imports`** — Generate CSS import statements for the correct entry point.

  | Parameter     | Type    | Required | Default | Description                       |
  | ------------- | ------- | -------- | ------- | --------------------------------- |
  | `projectPath` | string  | Yes      | —       | Path to the project directory     |
  | `typescript`  | boolean | No       | `true`  | Generate TypeScript or JavaScript |

  ***

  **`generate_layout_with_styles`** — Generate a Next.js layout with Para SDK styles properly imported.

  | Parameter    | Type    | Required | Default | Description                       |
  | ------------ | ------- | -------- | ------- | --------------------------------- |
  | `typescript` | boolean | No       | `true`  | Generate TypeScript or JavaScript |

  ***

  **`generate_hooks_examples`** — Generate before/after hook usage examples showing migration patterns.

  | Parameter      | Type    | Required | Default   | Description                                           |
  | -------------- | ------- | -------- | --------- | ----------------------------------------------------- |
  | `fromProvider` | enum    | No       | `"privy"` | Source provider: `privy`, `reown`, or `walletconnect` |
  | `typescript`   | boolean | No       | `true`    | Generate TypeScript or JavaScript                     |
</Accordion>

<Accordion title="Utility Tools">
  **`create_migration_guide`** — Generate a step-by-step migration guide tailored to your project.

  | Parameter      | Type   | Required | Description                                      |
  | -------------- | ------ | -------- | ------------------------------------------------ |
  | `projectName`  | string | Yes      | Name of the project being migrated               |
  | `currentSetup` | string | No       | Description of the current wallet provider setup |
  | `targetConfig` | object | No       | Target Para configuration                        |

  ***

  **`quick_migration_mode`** — Generate an ultra-fast development configuration with timeouts and fallbacks.

  | Parameter | Type   | Required | Description                  |
  | --------- | ------ | -------- | ---------------------------- |
  | `config`  | object | Yes      | Base migration configuration |
</Accordion>

## Next Steps

<CardGroup cols={2}>
  <Card title="Migrate from Reown (Manual)" href="/v2/react/guides/migration-from-reown">
    Step-by-step manual migration guide from Reown to Para
  </Card>

  <Card title="Migrate from Web3Modal (Manual)" href="/v2/react/guides/migration-from-walletconnect">
    Step-by-step manual migration guide from Web3Modal to Para
  </Card>

  <Card title="React Quickstart" href="/v2/react/quickstart">
    Get started with the Para React SDK from scratch
  </Card>

  <Card title="Migration MCP Repository" href="https://github.com/getpara/Para-Migration-MCP">
    View the Migration MCP source code and contribute
  </Card>
</CardGroup>

## Related Walkthroughs

<CardGroup cols={3}>
  <Card title="Eliza AI Agent Integration" icon="robot" href="/v2/walkthroughs/Eliza">
    Intermediate · 30 min · Wallet-enabled AI agents
  </Card>

  <Card title="Thirdweb Integration" icon="cubes" href="/v2/walkthroughs/Thirdweb">
    Advanced · 40 min · Smart accounts and gas sponsorship
  </Card>

  <Card title="Ethereum Transfers" icon="ethereum" href="/v2/walkthroughs/ethereum-transfers">
    Intermediate · 20 min · Send ETH with Ethers and Viem
  </Card>
</CardGroup>
