MCP ExplorerExplorer

Mcp Code Migration

@mana-naraon 10 months ago
1 MIT
FreeCommunity
AI Systems
AI powered code migration tool using Claude and MCP - building this for the world's biggest MCP hackathon at Y Combinator Office

Overview

What is Mcp Code Migration

mcp-code-migration is an AI-powered tool designed to convert React components into Next.js 13+ components with TypeScript. It utilizes FastAPI and the Claude API to facilitate this migration process.

Use cases

Use cases include migrating legacy React applications to Next.js, enhancing performance and SEO, and simplifying the development process for teams adopting Next.js for new projects.

How to use

To use mcp-code-migration, clone the repository, set up the backend and frontend environments, and run the application. Users can input React component code and click ‘Migrate’ to convert it to a Next.js 13+ component.

Key features

Key features include AI-driven migration of React components, support for TypeScript, a user-friendly interface, and a backend powered by FastAPI. The tool is designed for seamless integration with existing React projects.

Where to use

mcp-code-migration can be used in web development, particularly for projects transitioning from React to Next.js. It is suitable for developers looking to modernize their applications and leverage the benefits of Next.js.

Content

MCP Code Migration

A AI-powered tool to convert React components to Next.js 13+ with TypeScript, powered by FastAPI, Claude API, and a modern Next.js frontend.


Prerequisites

  • Python 3.10+ (for backend)
  • Node.js 18+ and npm (for frontend)
  • Claude API key (from Anthropic)

1. Clone the Repository

git clone https://github.com/mana-nara/mcp-code-migration.git
cd mcp-code-migration

2. Backend Setup

cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install fastapi "uvicorn[standard]" anthropic fastapi-cors mcp-server-git

Set your Claude API key (replace with your actual key):

export CLAUDE_API_KEY="sk-ant-..."

Start the backend server:

uvicorn main:app --reload
  • The API will be available at http://localhost:8000
  • API documentation and interactive testing interface is available at http://localhost:8000/docs
    • Use this to verify if the backend is working correctly and to test API endpoints directly

3. Frontend Setup

cd ../frontend
npm install
npm run dev

4. Using the App

  1. Go to http://localhost:3000
  2. In the input box, enter Hello.jsx (already present in react-demo/).
  3. Click Fetch to load the React code.
  4. Click Migrate to convert it to a Next.js 13+ component with TypeScript.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers