
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
jsc-typescript-ast-mcp
Advanced tools
A Model Context Protocol (MCP) server that provides an abstract syntax tree (AST) representation of TypeScript code using the ts-morph library. It allows clients to analyze and manipulate TypeScript code structures, making it easier for AI models to under
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. Great to represent JSON structure of your React components.
find_dependency tool to list all files that import a specified library.component_tree tool to analyze React component structures in your codebase..env with your project's tsconfig path:
PROJECT_TSCONFIG_PATH=/path/to/your/project/tsconfig.json
Add this package as dependency and run
yarn typescript-ast
This will start the MCP server that can be connected to by MCP-compatible clients.
To use this MCP server in Claude Code:
.mcp.json (or update your existing one with the content of the MCP configuration):{
"mcpServers": {
"typescript-ast": {
"type": "stdio",
"command": "yarn",
"args": [
"typescript-ast"
],
"env": {
"PROJECT_TSCONFIG_PATH": "PATH/TO/YOUR/TYPESCRIPT/PROJECT/tsconfig.json"
}
}
}
}
For the project path, if you're using Vite you might want to use the tsconfig.app.json instead.
.claude/settings.local.json and add the MCP section (or the subset needed if you already have some MCPs configured) “enableAllProjectMcpServers”: true,
“enabledMcpjsonServers”: [
“typescript-ast”
]
/mcp command and check the MCP is connectedThe 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
FAQs
A Model Context Protocol (MCP) server that provides an abstract syntax tree (AST) representation of TypeScript code using the ts-morph library. It allows clients to analyze and manipulate TypeScript code structures, making it easier for AI models to under
The npm package jsc-typescript-ast-mcp receives a total of 85 weekly downloads. As such, jsc-typescript-ast-mcp popularity was classified as not popular.
We found that jsc-typescript-ast-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.