The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Jsc Typescript Ast MCP listing page.
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