typescript-mcp で AI に LSP のリファクタリング機能を与える
BRANK

一旦 npx -y typescript-mcp@latest で MCP サーバーが動くところまで作った。 npm の名前空間が空いてたので...これの続編 AST 操作ができないMCP サーバーとして、 Rename, Move File, Go to Definition, Find References 等の LSP の機能を提供した実際に動いている例# Rename file ● typescript:move_file (MCP)(root: "~/s andbox/claude-mcp", oldPath: "examples/oth er-types.ts", newPath: "examples/types.ts") ⎿ Successfully moved file from "~/san dbox/claude-mcp/examples/other-types.ts" to "~/sandbox/claude-mcp/examples/type s.ts". Updated imports in 2 file(s). Changes: File moved: examples/other-types.ts → examples/types.ts How to use今現在は claude-code mcp サーバーとして動く。 $ npm install typescript -D $ npx tsc --init $ npx -y typescript-mcp@latest --init=claude $ claude --mcp-config=.claude/mcp_servers.json ╭───────────────────────…

zenn.dev
Related Topics: TypeScript AI