You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Roo and Claude Code see errors in the IDE, but cannot perform semantic refactorings such as Go to Definition or Rename.
We can provide the AI with functionality equivalent to LSP. However, LLM is not good at word counting, so we provide this by lines and symbols.
Installation
Quick Setup with --init=claude
The easiest way to set up typescript-mcp in your project:
npm install typescript typescript-mcp -Dnpx typescript-mcp --init=claude# Creates/updates .mcp.json with typescript-mcp configuration# Creates/updates .claude/settings.json with permissions
After initialization, use Claude with:
claude
Optional: Prompt
##CRITICAL: Tool Usage Priority for Refactoring**When performing refactoring operations (rename, move, etc.) on TypeScript code, ALWAYS use typescript MCP tools (`mcp__typescript_*`) instead of the default Edit/Write tools.**Specifically for refactoring:- For renaming symbols: ALWAYS use`mcp__typescript__rename_symbol` instead of Edit/Write- For moving files: ALWAYS use`mcp__typescript__move_file` instead of Bash(mv) or Write- For moving directories: ALWAYS use`mcp__typescript__move_directory` instead of Bash(mv)- For finding references: ALWAYS use`mcp__typescript__find_references` instead of Grep/Bash(grep)- For type analysis: ALWAYS use`mcp__typescript__get_type_*` tools**NEVER use Edit, MultiEdit, or Write tools for TypeScript refactoring operations that have a corresponding mcp\__typescript_\* tool.**
Manual Setup
If you prefer to configure manually, add to your.mcp.json: