Jsc Typescript Ast Mcp

io.github.jscoobycedPublished by GitHub account jscoobycedv1.0.10Updated Nov 3, 2026

AST for TypeScript, supports creating JSON representations of React components

VerifiedSTDIODesktop onlyDeveloper ToolsData & Analytics

Overview

AI-generated overview

Local MCP server that parses a TypeScript project with ts-morph so an assistant can find method references, library imports and React component trees.

What you can do
  • Find references to a class method, returning file paths and line numbers
  • List files that import a given library dependency
  • Analyze React component structures from an entry file into a JSON tree with props, data-id and onClick metadata
When to use it
Useful when working in a TypeScript or React codebase and you want the assistant to trace where a method is used, see which files depend on a library, or map a component hierarchy instead of grepping by hand.
Requirements
Runs locally over stdio as an npm package; needs Node.js and Yarn. Requires the PROJECT_TSCONFIG_PATH environment variable pointing at the project's tsconfig.json (Vite projects may need tsconfig.app.json). No authentication declared.
Before you install
The server reads source files from the project path you configure, so point it only at code you are comfortable exposing to the assistant. It is read-only analysis; no write, send or delete tools are described.

Installation

In SourceWeft

  1. Open Jsc Typescript Ast Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

TypeScript AST MCP Server

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.

Features

  • MCP Server: Implements the Model Context Protocol for integration with AI assistants
  • TypeScript Analysis: Uses ts-morph for powerful TypeScript AST parsing and analysis
  • Reference Finding: Find all references to a given class method in your codebase
  • Dependency Finding: Use the find_dependency tool to list all files that import a specified library.
  • Component Tree Analysis: Use the component_tree tool to analyze React component structures in your codebase.
  • The tools are part of the MCP server and can be invoked via Claude Code or other MCP clients.

Prerequisites

  • Node.js (version compatible with the project)
  • Yarn package manager

Setup

  1. Create .env with your project's tsconfig path:
    bash
    PROJECT_TSCONFIG_PATH=/path/to/your/project/tsconfig.json

How to Run

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.

Installing in Claude Code

To use this MCP server in Claude Code:

  1. Configure Claude Code:
  • Copy a .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.

  • Edit your .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”  ]
  • Start Claude Code
  • Type the /mcp command and check the MCP is connected

Tool Descriptions

The server provides three tools:

1. find_reference

Find all references to a given class method in your codebase.

  • Input:
    • filePath: Path to the file
    • className: Name of the class
    • methodName: Name of the method
  • Output: List of file paths with line numbers where the method is referenced

2. find_dependency

List all files that import a specified library.

  • Input:
    • dependencyName: Name of the dependency to search for
  • Output: List of file paths that import the specified dependency

3. component_tree

Analyze React component structures in your codebase.

  • Input:
    • entryFilePath: Path to the entry file
    • maxDepth: Maximum depth of the component tree (default: 3)
    • data-id (optional): Attribute name to capture into TreeNode.dataId (example: data-attribute-id)
  • Output: JSON representation of the component tree structure, including optional element metadata such as props, dataId, and onClick

License

MIT

Source: code/README.md at commit ad97145

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.10LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts