TypeScript MCP
About
A TypeScript-specialized server providing advanced code manipulation and analysis capabilities.
Details
- Author
- mizchi
- Categories
- Developer Tools
Jump to
Setup
Install TypeScript MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/mizchi/typescript-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A unified MCP (Model Context Protocol) server that provides advanced code manipulation and analysis capabilities for multiple programming languages through Language Server Protocol integration.
- πMulti-Language Support
- πSemantic Code Analysis
- π€AI-Optimized
Seeexamples/for working examples of each supported language configuration.
- Node.js 22.0.0 or higher (required for built-in SQLite support)
# 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>"
π― Core Flow: Overview β Search β Details
1. get_project_overview # Understand the codebase 2. search_symbols # Find what you need 3. get_symbol_details # Deep dive into symbols
- get_project_overview- First tool to understand any codebase
- list_dir- Browse directory structure
- get_symbols_overview- High-level view of file symbols
- search_symbols- Primary search for functions, classes, interfaces
- lsp_get_document_symbols- List all symbols in a specific file
- lsp_get_workspace_symbols- Alternative workspace-wide search
- get_symbol_details- Complete information in one call (recommended)
- lsp_get_definitions- Jump to definition (useincludeBody: truefor full code)
- lsp_find_references- Find all usages
- lsp_get_hover- Quick type information
- lsp_get_diagnostics- Check for errors
- lsp_get_code_actions- Get available fixes
- lsp_rename_symbol- Safe renaming across codebase
- lsp_format_document- Format code
- replace_range/replace_regex- Text replacements
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
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
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
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 fail
- β οΈGrep- For text pattern searches in files
- β οΈGlob- Only when LSMCP file finding doesn't work
- β οΈLS- Only for basic directory listing when LSMCP fails
- β οΈBashcommands - Only for non-code operations or troubleshooting
Use standard tools ONLY in these situations:
- Non-code files: README, documentation, configuration files
- LSMCP tool failures: When LSMCP tools return errors or no results
- Debugging: When troubleshooting why LSMCP tools aren't working
- Special file formats: Files that LSMCP doesn't support
- Quick verification: Double-checking LSMCP results when needed
You have access to project memories stored in.lsmcp/memories/. Use these tools:
- mcp__lsmcp__list_memories- List available memory files
- mcp__lsmcp__read_memory- Read specific memory content
- mcp__lsmcp__write_memory- Create or update memories
- mcp__lsmcp__delete_memory- Delete a memory file
Memories contain important project context, conventions, and guidelines that help maintain consistency.
lsmcp includes built-in presets for popular language servers:
- tsgo- TypeScript (Recommended)
- typescript- typescript-language-server
- rust-analyzer- Rust Analyser
- moonbit- MoonBit
- fsharp- F# (fsautocomplete)
- deno- Deno TypeScript/JavaScript
- gopls- Go (Official Go language server)
- hls- Haskell Language Server (requires ghcup setup, seedocs/HASKELL_SETUP.md)
- ocaml- OCaml Language Server
{ "$schema": "../node_modules/@mizchi/lsmcp/lsmcp.schema.json", "preset": "tsgo", "settings": { "autoIndex": true, "indexConcurrency": 10 } }
For a comprehensive configuration example, seeexamples/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, seedocs/TOOL_REFERENCE.md.
- lsp_get_hover- Get type information and documentation for symbols
- lsp_find_references- Find all references to a symbol across the codebase
- lsp_get_definitions- Navigate to symbol definitions with optional code body
- lsp_get_diagnostics- Check for errors and warnings in files
- lsp_get_all_diagnostics- Get diagnostics for entire project
- lsp_get_document_symbols- List all symbols in a file
- lsp_get_workspace_symbols- Search symbols across the entire workspace
- lsp_get_completion- Get code completion suggestions
- lsp_get_signature_help- Get parameter hints for function calls
- lsp_format_document- Format entire documents using language server
- lsp_rename_symbol- Rename symbols across the codebase
- lsp_get_code_actions- Get available quick fixes and refactorings
- lsp_delete_symbol- Delete a symbol and optionally all its references
- lsp_check_capabilities- Check supported LSP features
- get_project_overview- Quick project structure and component analysis
- search_symbols- Fast symbol search using pre-built index (auto-creates index if needed)
- get_symbol_details- Get comprehensive details about a symbol (hover, definition, references)
- index_external_libraries- Index TypeScript declaration files from node_modules
- get_typescript_dependencies- List available TypeScript dependencies
- search_external_library_symbols- Search symbols in indexed external libraries
- resolve_symbol- Resolve symbols to their definitions in external libraries
- get_available_external_symbols- Get symbols available from imported libraries
- parse_imports- Parse and analyze import statements
- replace_range- Replace specific text ranges in files
- replace_regex- Advanced regex-based replacements
- list_dir- List directories with gitignore support
- get_symbols_overview- High-level symbol overview by file
- list_memories- List project memories
- read_memory- Read specific memory content
- write_memory- Create or update memories
- delete_memory- Remove memories
LSMCP includes several performance optimizations:
- Incremental Indexing: Only modified files are re-indexed
- Memory Monitoring: Automatic garbage collection when memory usage is high
- Batch Processing: Efficient concurrent file processing
- Smart Caching: 15-minute cache for frequently accessed data
Configuration options in.lsmcp/config.json:
{ "indexConcurrency": 5, "maxFileSize": 10485760, "enableWatchers": true, "memoryLimit": 1024 }
SeeCONTRIBUTING.mdfor 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 # Alternative (backward compatible)
Enable LSP client debug output separately:
LSP_DEBUG=1 lsmcp # Enable LSP client debug logging
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .
Local stdio MCP server that lets AI coding agents read and maintain structured architecture, rules, and decisions directly from your repository.
Official Context7 MCP server that brings up-to-date, version-specific library documentation and code examples into AI coding prompts.
Remote, no-auth MCP server providing AI-powered codebase context and answers
Instead of direct calling MCP tools, mcpcode server transforms MCP tool calls into TypeScript programs, enabling smarter, lower-latency orchestration by LLMs.
Help agents automatically write and test stories for your UI components
Official Svelte MCP server, provides docs and suggestions on the generated code.
Supercharge your Agent with Semantic Code Intelligence and save π° in the process!
Execute any LLM-generated code in the YepCode secure and scalable sandbox environment and create your own MCP tools using JavaScript or Python, with full support for NPM and PyPI packages
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





