MCP server that renames/moves TypeScript files and updates all imports via tsserver
MCP server that renames/moves TypeScript files and updates all imports via tsserver
A lightweight Model Context Protocol (MCP) server for TypeScript and JavaScript refactoring and code intelligence. Every tool maps directly to a tsserver protocol command — the output is the raw, unmodified response from TypeScript's compiler. Rename symbols, extract functions, move declarations between files, reorganize imports, navigate type hierarchies, explore call graphs, search symbols across your workspace, map AI-generated code into the right locations, discover which error codes have automatic fixes, and more — with every import, require, re-export, and
Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| rename | Rename a TypeScript/JavaScript symbol and update all references across the project. |
| renameFileOrDirectory | Rename or move a TypeScript/JavaScript file or directory and update all import paths across the project. |
| references | |
| getDiagnostics | Get all errors, warnings, and suggestions for a file. Returns semantic diagnostics and suggestion diagnostics as separate arrays. |
| organizeImports | |
| getCodeFixes | Get available code fixes for specific error codes at a range in a file. Use getDiagnostics first to discover error codes and ranges, then pass them here. |
| getCombinedCodeFix | Get a combined code fix that applies all instances of a fix across a file in one action. Returns the full set of file edits as a CombinedCodeActions response. Use getCodeFixes first to discover available fixId values, th |
| extractFunction | Extract a selected code range into a new function. TypeScript auto-detects parameters and return type. The response includes renameFilename / renameLocation so you can follow up with rename to give the function a meaning |
| extractConstant | Extract a selected expression into a named constant. TypeScript infers the type. The response includes renameFilename / renameLocation so you can follow up with rename to give the constant a meaningful name. |
| moveSymbol | Move top-level declarations (functions, classes, types, constants) to another file. All imports across the project are rewired automatically. If the target file doesn't exist, tsserver creates it. |
| inlineVariable | Inline a variable — replace all references with the variable's initializer and delete the declaration. Position must be on the variable name in its declaration or any usage. |
| extractType | Extract an inline type annotation into a named type alias. Select the type span to extract. The response includes renameFilename / renameLocation so you can follow up with rename to give the type a meaningful name. |
{
"mcpServers": {
"ts": {
"command": "npx",
"args": ["-y", "ts-mcp-server"]
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Use Microsoft’s Playwright MCP server to navigate pages, inspect accessibility snapshots, fill forms and capture browser screenshots.
Connect GitHub MCP to repositories, issues and pull requests with GitHub’s hosted service or a locally run server.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Search Linear issues and projects, inspect work context and manage updates through Linear’s hosted MCP server with OAuth.