
TypeScript Migrator MCP
โ 3from LiangYingC
Migrate JavaScript files to TypeScript with customizable conversion rules.
๐ฅ๐ฅ๐ฅโ VerifiedFreeQuick setup
TypeScript Migrator MCP
This MCP server let you easily converts JavaScript files to TypeScript with AI agent.
Setup
Add the following configuration to your MCP settings JSON:
{
"mcpServers": {
"typescript-migrator-mcp": {
"command": "npx",
"args": ["-y", "typescript-migrator-mcp"]
}
}
}Usage
Once configured, your AI agent can convert JavaScript files to TypeScript by calling the conversion tool with a file path:
Convert @test/myFile.js to TypeScriptThe tool will:
- Analyze the JavaScript file and its dependencies
- Generate appropriate TypeScript types and interfaces
- Preserve original logic while adding type safety
- Ensure lint and type errors are fixed
- Summarize the work of AI
Configuration
Custom Rules
To add your own conversion rules, create a custom markdown file with your rules and specify its path in the environment configuration:
{
"mcpServers": {
"typescript-migrator-mcp": {
"command": "npx",
"args": ["-y", "typescript-migrator-mcp"],
"env": {
"CUSTOM_RULES_MD_FILE_PATH": "/path/to/your/custom-rules.md"
}
}
}
}No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.
License
Apache 2.0