TypeScript Migrator MCP is an MCP server that enables AI agents to automatically convert JavaScript files into TypeScript while maintaining code safety and business logic. The server integrates directly into MCP-compatible clients and coding environments, giving developers and software teams the ability to systematically modernize legacy JavaScript repositories. By processing targeted files, the server analyzes underlying code dependencies, formulates appropriate interfaces and type annotations, and addresses type-checking errors and linting issues. Developers can customize the migration behavior by pointing the server to a dedicated Markdown file containing specific team guidelines, coding standards, and type definitions. In addition to executing the conversion, the tool provides a concise summary of all changes made during the transformation process. This functionality reduces the manual effort required to transition projects to TypeScript, ensuring that logic remains intact while providing static typing across components, libraries, and application scripts. Development teams can use it to incrementally upgrade specific files or entire modules without breaking existing workflows or manually writing boilerplate types.
Category: Developer Tools & Code Intelligence
Tags: code-generation, javascript, migration, refactoring, typescript
typescript-migrator-mcp to your mcpServers object: json { "mcpServers": { "typescript-migrator-mcp": { "command": "npx", "args": ["-y", "typescript-migrator-mcp"] } } } 3. Optional: To apply custom conversion guidelines, configure the CUSTOM_RULES_MD_FILE_PATH environment variable in the env block with the path to your rules file: json "env": { "CUSTOM_RULES_MD_FILE_PATH": "/path/to/your/custom-rules.md" } 4. Save the configuration and restart your client.Part of MCP Servers
TypeScript Migrator MCP allows AI agents to inspect JavaScript source files and convert them into TypeScript. It analyzes dependencies, generates necessary TypeScript interfaces and type annotations, preserves the original execution logic, fixes linting and type errors, and returns a summary of the migration steps performed.
You can configure TypeScript Migrator MCP in your client settings file by registering it under the mcpServers key. Set the execution command to npx with the arguments -y and typescript-migrator-mcp. Once configured and your client is restarted, the migration tools become immediately available.
Yes, the server supports custom migration rules. You can write your specific instructions or architectural guidelines in a Markdown file and supply its absolute path using the CUSTOM_RULES_MD_FILE_PATH environment variable in your MCP configuration settings to guide the AI conversion.
Yes, TypeScript Migrator MCP is open source software distributed under the Apache 2.0 license. The source code and repository documentation are publicly available on GitHub, allowing developers to review, modify, and contribute to the tool's codebase and conversion capabilities.