by mizchi
TypeScript Refactoring offers advanced TypeScript/JavaScript code analysis and intelligent refactoring for seamless and
Provides TypeScript/JavaScript code analysis and refactoring using ts-morph with symbol renaming, file moving, and cross-file reference updates. Works across entire codebases with intelligent import path corrections.
TypeScript Refactoring is a community-built MCP server published by mizchi that provides AI assistants with tools and capabilities via the Model Context Protocol. TypeScript Refactoring offers advanced TypeScript/JavaScript code analysis and intelligent refactoring for seamless and It is categorized under ai ml, developer tools.
You can install TypeScript Refactoring in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
TypeScript Refactoring is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
I recommend TypeScript Refactoring for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
Strong directory entry: TypeScript Refactoring surfaces stars and publisher context so we could sanity-check maintenance before adopting.
According to our notes, TypeScript Refactoring benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
Strong directory entry: TypeScript Refactoring surfaces stars and publisher context so we could sanity-check maintenance before adopting.
TypeScript Refactoring has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
According to our notes, TypeScript Refactoring benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
TypeScript Refactoring reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
TypeScript Refactoring has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
I recommend TypeScript Refactoring for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
According to our notes, TypeScript Refactoring benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
showing 1-10 of 45
A unified MCP (Model Context Protocol) server that provides advanced code manipulation and analysis capabilities for multiple programming languages through Language Server Protocol integration.
See examples/ for working examples of each supported language configuration.
# tsgo (reccommended)
npm add -D @mizchi/lsmcp @typescript/native-preview
npx @mizchi/lsmcp init -p tsgo
claude mcp add lsmcp npx -- -y @mizchi/lsmcp -p tsgo
# with manual --bin
claude mcp add lsmcp npx -- -y @mizchi/lsmcp --bin="<lsp-command>"
<details>
<summary>📖 Example Usage with Claude</summary>
1. get_project_overview # Understand the codebase
2. search_symbols # Find what you need
3. get_symbol_details # Deep dive into symbols
Initial Exploration:
get_project_overview - First tool to understand any codebaselist_dir - Browse directory structureget_symbols_overview - High-level view of file symbolsFinding Code:
search_symbols - Primary search for functions, classes, interfaceslsp_get_document_symbols - List all symbols in a specific filelsp_get_workspace_symbols - Alternative workspace-wide searchUnderstanding Code:
get_symbol_details - Complete information in one call (recommended)lsp_get_definitions - Jump to definition (use includeBody: true for full code)lsp_find_references - Find all usageslsp_get_hover - Quick type informationCode Quality:
lsp_get_diagnostics - Check for errorslsp_get_code_actions - Get available fixesCode Modification:
lsp_rename_symbol - Safe renaming across codebaselsp_format_document - Format codereplace_range / replace_regex - Text replacements1. EXPLORING A NEW CODEBASE
1. mcp__lsmcp__get_project_overview
→ Understand structure, main components, statistics
2. mcp__lsmcp__search_symbols --kind "class"
→ Find all classes in the project
3. mcp__lsmcp__get_symbol_details --symbol "MainClass"
→ Deep dive into specific class implementation
2. INVESTIGATING A BUG
1. mcp__lsmcp__search_symbols --name "problematicFunction"
→ Locate the function
2. mcp__lsmcp__get_symbol_details --symbol "problematicFunction"
→ Understand its type, implementation, and usage
3. mcp__lsmcp__lsp_find_references --symbolName "problematicFunction"
→ See all places it's called
4. mcp__lsmcp__lsp_get_diagnostics --relativePath "path/to/file.ts"
→ Check for errors
3. REFACTORING CODE
1. mcp__lsmcp__search_symbols --name "oldMethodName"
→ Find the method to refactor
2. mcp__lsmcp__get_symbol_details --symbol "oldMethodName"
→ Understand current implementation and usage
3. mcp__lsmcp__lsp_rename_symbol --symbolName "oldMethodName" --newName "newMethodName"
→ Safely rename across codebase
4. mcp__lsmcp__lsp_format_document --relativePath "path/to/file.ts"
→ Clean up formatting
4. ADDING NEW FEATURES
1. mcp__lsmcp__get_project_overview
→ Understand existing architecture
2. mcp__lsmcp__search_symbols --kind "interface"
→ Find relevant interfaces to implement
3. mcp__lsmcp__get_symbol_details --symbol "IUserService"
→ Understand interface requirements
4. mcp__lsmcp__lsp_get_completion --line 50
→ Get suggestions while writing new code
FALLBACK TOOLS (USE ONLY WHEN NECESSARY):
Read - Only when you need to see non-code files or LSMCP tools failGrep - For text pattern searches in filesGlob - Only when LSMCP file finding doesn't workLS - Only for basic directory listing when LSMCP failsBash commands - Only for non-code operations or troubleshootingUse standard tools ONLY in these situations:
You have access to project memories stored in .lsmcp/memories/. Use these tools:
mcp__lsmcp__list_memories - List available memory filesmcp__lsmcp__read_memory - Read specific memory contentmcp__lsmcp__write_memory - Create or update memoriesmcp__lsmcp__delete_memory - Delete a memory fileMemories contain important project context, conventions, and guidelines that help maintain consistency.
</details>lsmcp includes built-in presets for popular language servers:
tsgo - TypeScript (Recommended)typescript - typescript-language-serverrust-analyzer - Rust Analysermoonbit - MoonBitfsharp - F# (fsautocomplete)deno - Deno TypeScript/JavaScriptgopls - Go (Official Go language server)hls - Haskell Language Server (requires ghcup setup, see docs/HASKELL_SETUP.md)ocaml - OCaml Language Server.lsmcp/config.json
{
"$schema": "../node_modules/@mizchi/lsmcp/lsmcp.schema.json",
"preset": "tsgo",
"settings": {
"autoIndex": true,
"indexConcurrency": 10
}
}
For a comprehensive configuration example, see examples/full-lsmcp-config.json.
lsmcp provides comprehensive MCP tools for code analysis and manipulation:
Note: Tool names listed below are the raw MCP tool names (snake_case, e.g. get_hover). Some clients display them with a server-qualified prefix (e.g. mcplsmcpget_hover). For naming conventions and module boundaries, see docs/TOOL_REFERENCE.md.
LSMCP includes several performance optimizations:
Configuration options in .lsmcp/config.json:
{
"indexConcurrency": 5,
"maxFileSize": 10485760,
"enableWatchers": true,
"memoryLimit": 1024
}
See CONTRIBUTING.md for detailed development setup, testing instructions, and contribution guidelines.
# Quick start
pnpm install
pnpm build
pnpm test
# Run with memory monitoring
node --expose-gc dist/lsmcp.js
LSMCP has separate logging systems for MCP server and LSP client that can be controlled independently:
Enable MCP server debug output with either environment variable:
MCP_DEBUG=1 lsmcp # Enable MCP server debug logging
LSMCP_DEBUG=1 lsmcp # Alternat
---
Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
✓ Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.