Skip to main content
Glama
jscoobyced

TypeScript AST MCP Server

by jscoobyced

TypeScript AST MCP 서버

TypeScript AST(추상 구문 트리) 분석 기능을 제공하는 Model Context Protocol(MCP) 서버입니다. 이 서버는 ts-morph 라이브러리를 사용하여 클래스와 메서드의 참조를 찾고, 컴포넌트 트리를 분석하며, TypeScript 코드의 의존성을 찾을 수 있게 해줍니다.

기능

  • MCP 서버: AI 어시스턴트와의 통합을 위한 Model Context Protocol 구현

  • TypeScript 분석: 강력한 TypeScript AST 파싱 및 분석을 위해 ts-morph 사용

  • 참조 찾기: 코드베이스에서 주어진 클래스 메서드에 대한 모든 참조 찾기

  • 의존성 찾기: find_dependency 도구를 사용하여 지정된 라이브러리를 가져오는 모든 파일 나열

  • 컴포넌트 트리 분석: component_tree 도구를 사용하여 코드베이스의 React 컴포넌트 구조 분석

  • 이 도구들은 MCP 서버의 일부이며 Claude Code 또는 기타 MCP 클라이언트를 통해 호출할 수 있습니다.

Related MCP server: agent-workspace-mcp

사전 요구 사항

  • Node.js(프로젝트와 호환되는 버전)

  • Yarn 패키지 매니저

설정

  1. 저장소를 클론합니다.

  2. 의존성을 설치합니다:

    yarn install
  3. 예제 구성 파일을 복사합니다:

    cp .env.example .env
  4. 프로젝트의 tsconfig 경로로 .env를 업데이트합니다:

    PROJECT_TSCONFIG_PATH=/path/to/your/project/tsconfig.json

실행 방법

프로젝트 빌드:

yarn build

MCP 서버 테스트:

yarn test:mcp

이렇게 하면 MCP 호환 클라이언트가 연결할 수 있는 MCP 서버가 시작됩니다.

Claude Code에 설치

Claude Code에서 이 MCP 서버를 사용하려면:

  1. 서버 빌드:

    yarn build
  2. Claude Code 구성:

  • .mcp.example.json.mcp.json으로 복사합니다(또는 기존 파일을 MCP 구성 내용으로 업데이트).

  • .claude/settings.local.json을 편집하고 MCP 섹션을 추가합니다(이미 일부 MCP가 구성된 경우 필요한 하위 집합만 추가).

  “enableAllProjectMcpServers”: true,
  “enabledMcpjsonServers”: [
    “typescript-ast”
  ]
  • Claude Code를 시작합니다.

  • /mcp 명령을 입력하고 MCP가 연결되었는지 확인합니다.

개발

코드 업데이트:

  1. src/의 TypeScript 소스 파일을 변경합니다.

  2. 프로젝트를 빌드합니다:

    yarn build
  3. 변경 사항을 테스트합니다:

    yarn test:mcp

환경 변수

서버는 다음 환경 변수를 사용합니다:

  • PROJECT_TSCONFIG_PATH: 프로젝트 분석에 사용할 tsconfig.json 파일의 경로(기본값: 'tsconfig.json')

예제 구성 파일

  • .env.example: 예제 환경 변수 파일

  • .mcp.example.json: 예제 MCP 구성 파일(해당하는 경우)

도구 설명

서버는 세 가지 도구를 제공합니다:

1. find_reference

코드베이스에서 주어진 클래스 메서드에 대한 모든 참조를 찾습니다.

  • 입력:

    • filePath: 파일 경로

    • className: 클래스 이름

    • methodName: 메서드 이름

  • 출력: 메서드가 참조되는 파일 경로 및 줄 번호 목록

2. find_dependency

지정된 라이브러리를 가져오는 모든 파일을 나열합니다.

  • 입력:

    • dependencyName: 검색할 의존성 이름

  • 출력: 지정된 의존성을 가져오는 파일 경로 목록

3. component_tree

코드베이스의 React 컴포넌트 구조를 분석합니다.

  • 입력:

    • entryFilePath: 진입 파일 경로

    • maxDepth: 컴포넌트 트리의 최대 깊이(기본값: 3)

    • data-id(선택 사항): TreeNode.dataId로 캡처할 속성 이름(예: data-attribute-id)

  • 출력: props, dataId, onClick과 같은 선택적 요소 메타데이터를 포함한 컴포넌트 트리 구조의 JSON 표현

라이선스

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
5Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…

  • Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.

  • Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jscoobyced/jsc-typescript-ast-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server