MCP Ts Morph MCP Server

ts-morph を利用した MCP リファクタリングサーバー

Local serverstdioTypeScript

What is the MCP Ts Morph MCP server?

If you already use MCP Ts Morph, the mcp ts morph mcp server is the piece that lets your assistant work with it directly. ts-morph を利用した MCP リファクタリングサーバー.

What the server does

このパッケージは GitHub Actions ワークフロー(.github/workflows/release.yml)を介して npm に自動公開されます。

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • rename_symbol_by_tsmorph — The rename_symbol_by_tsmorph tool exposed by this server
  • rename_filesystem_entry_by_tsmorph — The rename_filesystem_entry_by_tsmorph tool exposed by this server
  • find_references_by_tsmorph — The find_references_by_tsmorph tool exposed by this server
  • remove_path_alias_by_tsmorph — The remove_path_alias_by_tsmorph tool exposed by this server
  • move_symbol_to_file_by_tsmorph — The move_symbol_to_file_by_tsmorph tool exposed by this server
  • change_signature_by_tsmorph — The change_signature_by_tsmorph tool exposed by this server
  • get_type_at_position_by_tsmorph — The get_type_at_position_by_tsmorph tool exposed by this server
  • find_unused_exports_by_tsmorph — The find_unused_exports_by_tsmorph tool exposed by this server

Credentials and setup notes

Configuration is passed through the environment: LOG_LEVEL, LOG_OUTPUT, LOG_FILE_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Installation

The server ships on npm as pnpm, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Where it fits

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP Ts Morph's toolset — rename_symbol_by_tsmorph, rename_filesystem_entry_by_tsmorph, find_references_by_tsmorph and 5 more — is a fair guide to whether it matches your workflow. It is maintained by SiroSuzume; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against MCP Ts Morph's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
rename_symbol_by_tsmorphThe rename_symbol_by_tsmorph tool exposed by this server.
rename_filesystem_entry_by_tsmorphThe rename_filesystem_entry_by_tsmorph tool exposed by this server.
find_references_by_tsmorphThe find_references_by_tsmorph tool exposed by this server.
remove_path_alias_by_tsmorphThe remove_path_alias_by_tsmorph tool exposed by this server.
move_symbol_to_file_by_tsmorphThe move_symbol_to_file_by_tsmorph tool exposed by this server.
change_signature_by_tsmorphThe change_signature_by_tsmorph tool exposed by this server.
get_type_at_position_by_tsmorphThe get_type_at_position_by_tsmorph tool exposed by this server.
find_unused_exports_by_tsmorphThe find_unused_exports_by_tsmorph tool exposed by this server.

How to install the MCP Ts Morph MCP server

{
  "mcpServers": {
    "mcp-tsmorph-refactor": {
      "command": "npx",
      "args": ["-y", "@sirosuzume/mcp-tsmorph-refactor"],
      "env": {}
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
LOG_LEVELConfiguration value read at startup.Optional
LOG_OUTPUTConfiguration value read at startup.Optional
LOG_FILE_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use MCP Ts Morph to rename symbol by tsmorph.
  • Use MCP Ts Morph to rename filesystem entry by tsmorph.
  • Use MCP Ts Morph to find references by tsmorph.

Frequently asked questions

It connects MCP Ts Morph to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (rename_symbol_by_tsmorph, rename_filesystem_entry_by_tsmorph, find_references_by_tsmorph, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Ts Morph directly.