MCP server for JavaScript/TypeScript code analysis using tree-hugger-js
Tree hugger js mcp mcp server lets Claude, Cursor and other MCP clients work with Tree Hugger Js MCP directly. MCP server for JavaScript/TypeScript code analysis using tree-hugger-js.
An MCP (Model Context Protocol) server that provides AI agents with powerful JavaScript/TypeScript code analysis and transformation capabilities using the tree-hugger-js library.
Once connected, the assistant can call these 12 tools directly:
parse_code — // Parse code string await callTool("parse_code", { source: "function hello() { console.log('world'); }" });find_pattern — // Find async functions await callTool("find_pattern", { pattern: "function[async]" });find_all_pattern — The find_all_pattern tool exposed by this serverget_functions — The get_functions tool exposed by this serverget_classes — The get_classes tool exposed by this serverget_imports — The get_imports tool exposed by this serverrename_identifier — The rename_identifier tool exposed by this serverremove_unused_imports — The remove_unused_imports tool exposed by this servertransform_code — The transform_code tool exposed by this serverinsert_code — The insert_code tool exposed by this serverget_node_at_position — The get_node_at_position tool exposed by this serveranalyze_scopes — The analyze_scopes tool exposed by this serverThe server is distributed via npm as tree-hugger-js-mcp, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.
Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Tree Hugger Js MCP sits in that group, and the shape of its toolset — parse_code, find_pattern, find_all_pattern among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.
| Tool | What it does |
|---|---|
| parse_code | // Parse code string await callTool("parse_code", { source: "function hello() { console.log('world'); }" }); |
| find_pattern | // Find async functions await callTool("find_pattern", { pattern: "function[async]" }); |
| find_all_pattern | The find_all_pattern tool exposed by this server. |
| get_functions | The get_functions tool exposed by this server. |
| get_classes | The get_classes tool exposed by this server. |
| get_imports | The get_imports tool exposed by this server. |
| rename_identifier | The rename_identifier tool exposed by this server. |
| remove_unused_imports | The remove_unused_imports tool exposed by this server. |
| transform_code | The transform_code tool exposed by this server. |
| insert_code | The insert_code tool exposed by this server. |
| get_node_at_position | The get_node_at_position tool exposed by this server. |
| analyze_scopes | The analyze_scopes tool exposed by this server. |
### Alternative Configurations
```json
{
"mcpServers": {
"tree-hugger-js": {
// If installed globally
"command": "tree-hugger-js-mcp"
// Or if built from source
"command": "node",
"args": ["/path/to/tree-hugger-js-mcp/build/index.js"]
}
}
}Configuration as documented by the project. Restart the client after saving.
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.