Jsc Typescript Ast MCP logo

Jsc Typescript Ast MCP

Analyze TypeScript references, dependencies, and React component trees through MCP tools backed by ts-morph.

Install Jsc Typescript Ast MCP

Run the project’s own setup commands, in order.

Setup steps from the project

jsc-typescript-ast-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    yarn install
    
  2. 2. Configure
    cp .env.example .env
    
  3. 3. Run
    yarn build
    

Overview

The jsc-typescript-ast-mcp MCP server analyzes a TypeScript project through ts-morph and the project’s configured tsconfig.json. It exposes tools for locating class-method references, finding files that import a dependency, and inspecting React component trees. Configure the project path with an environment variable, then connect the built server to Claude Code or another MCP client. Reach for it when an agent needs codebase-level TypeScript structure or reference information.

Use cases

  • Find every reference to a class method
  • Trace which files import a dependency
  • Inspect a React component hierarchy
  • Map component metadata from an entry file

Key features

  • TypeScript AST analysis with ts-morph
  • Class-method reference lookup with file and line results
  • Dependency import discovery
  • React component tree analysis
  • Configurable component traversal depth

Tools7

What Jsc Typescript Ast MCP lets your agent do. Expand a tool for its parameters.

Self-reported~73 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 79d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit7mo agoMost recent push to the default branch.
Tools exposed7Callable tools this server registers over MCP.

How Jsc Typescript Ast MCP works

What jsc-typescript-ast-mcp MCP server does

The jsc-typescript-ast-mcp MCP server gives an MCP client access to TypeScript AST analysis for a configured project. It uses ts-morph to parse the project described by a tsconfig.json file, allowing an AI assistant to inspect relationships in the codebase rather than relying only on text searches.

Its supported analysis covers three tasks: locating references to a class method, identifying files that import a dependency, and building a tree of React components starting from an entry file. The results are intended for code navigation, dependency tracing, and understanding component structure.

How it works

The server reads the project configuration from the path supplied by PROJECT_TSCONFIG_PATH. If that variable is not set, the project uses tsconfig.json by default. The MCP client sends tool inputs to the server, which analyzes the configured TypeScript project and returns structured results.

find_reference accepts a file path, class name, and method name. It returns file paths and line numbers for references to that method. find_dependency accepts a dependency name and returns files that import it. component_tree starts at an entry file and returns a JSON representation of the React component structure.

The component-tree result can include element metadata such as props, an onClick value, and a selected data attribute. Its traversal depth is controlled by maxDepth, which defaults to 3.

Setup and configuration

The jsc-typescript-ast-mcp MCP server requires Node.js and Yarn. A basic setup is:

  1. Clone the repository.
  2. Run yarn install.
  3. Copy .env.example to .env.
  4. Set PROJECT_TSCONFIG_PATH to the target project’s tsconfig.json.
  5. Build with yarn build.
  6. Check the server with yarn test:mcp.

For Claude Code, build the project and copy or adapt .mcp.example.json into the MCP configuration. Enable the configured server in Claude Code, start the client, and use /mcp to verify the connection.

Tools and capabilities

  • find_reference: Finds references to a named method on a named class. Inputs are filePath, className, and methodName; results contain file paths with line numbers.
  • find_dependency: Finds project files that import the supplied dependencyName.
  • component_tree: Analyzes React components from an entryFilePath. maxDepth limits traversal and defaults to 3. An optional data-id input selects an attribute to expose as TreeNode.dataId.

Limitations and notes

Analysis depends on the selected TypeScript configuration and the files included by that project. The documented setup requires Node.js and Yarn. The component-tree capability is described for React component structures, while the reference and dependency tools operate on the configured TypeScript codebase. The repository is licensed under MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Jsc Typescript Ast MCP

jsc-typescript-ast-mcp is an MCP server that connects AI assistants to a TypeScript project through its tsconfig.json and ts-morph-based AST analysis. Its main tools are find_reference for class-method references, find_dependency for import usage, and component_tree for React component hierarchies with optional metadata.

Install it by cloning the repository, running `yarn install`, copying `.env.example` to `.env`, and setting `PROJECT_TSCONFIG_PATH`. Build it with `yarn build`, then connect the resulting MCP server through an MCP client configuration.

Set `PROJECT_TSCONFIG_PATH` to the path of the project’s `tsconfig.json`. If the variable is omitted, the server uses `tsconfig.json` as the default project configuration.

It states that the server can be connected to MCP-compatible clients and provides explicit setup instructions for Claude Code.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewJsc Typescript Ast MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/jsc-typescript-ast-mcp?style=directory)](https://allmcps.com/mcp/jsc-typescript-ast-mcp)
HTML Embed
<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>