An MCP that provides an abstract syntax tree (AST) for TypeScript code using the ts-morph library.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A Model Context Protocol (MCP) server that provides TypeScript AST (Abstract Syntax Tree) analysis capabilities. This server allows you to find references for classes and methods, analyze component trees, and find dependencies in TypeScript code using the ts-morph library.
find_dependency tool to list all files that import a specified library.component_tree tool to analyze React component structures in your codebase.Clone the repository
Install dependencies:
Copy the example configuration files:
Update .env with your project's tsconfig path:
This will start the MCP server that can be connected to by MCP-compatible clients.
To use this MCP server in Claude Code:
.mcp.example.json to .mcp.json (or update your existing one with the content of the MCP configuration).claude/settings.local.json and add the MCP section (or the subset needed if you already have some MCPs configured)/mcp command and check the MCP is connectedsrc/The server uses the following environment variable:
PROJECT_TSCONFIG_PATH: Path to the tsconfig.json file to use for project analysis (defaults to 'tsconfig.json').env.example: Example environment variables file.mcp.example.json: Example MCP configuration file (if applicable)The server provides three tools:
find_referenceFind all references to a given class method in your codebase.
filePath: Path to the fileclassName: Name of the classmethodName: Name of the methodfind_dependencyList all files that import a specified library.
dependencyName: Name of the dependency to search forcomponent_treeAnalyze React component structures in your codebase.
entryFilePath: Path to the entry filemaxDepth: Maximum depth of the component tree (default: 3)data-id (optional): Attribute name to capture into TreeNode.dataId (example: data-attribute-id)props, dataId, and onClickMIT
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/jsc-typescript-ast-mcp)<a href="https://allmcps.com/mcp/jsc-typescript-ast-mcp"><img src="https://allmcps.com/api/badge/jsc-typescript-ast-mcp?style=directory" alt="Jsc Typescript Ast MCP on AllMCPs" /></a>