
angrysky56/ast-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
소스 코드를 쿼리 가능한 Semantic Graph로 변환하고 구조화 된 AST로, 이 도구는 "읽는 텍스트"와 "거대한 구조 사이의 간격을 브릿지합니다.
개요
MCP (Model Context Protocol) 서버는 Abstract Syntax Trees (AST) 및 Abstract Semantic Graphs (ASG)를 통해 코드 구조와 세마틱 분석 기능을 제공하는 서버입니다. - Abstract Syntax Tree (AST) - 코드에서 Abstract Semantic Graph (ASG) 생성 - 분석 코드 구조 및 복잡성 분석 - 여러 프로그래밍 언어 지원 (Python, JavaScript, TypeScript, Go, Rust, C/C++, Java) - Claude Desktop 및 기타 MCP 클라이언트와 호환 - 대용량 파일의 빠른 처리를위한 Incremental 패싱 - 향상된 범위 처리 및 더 많은 완전한 semantic Analysis - C/C++, Java) - C/C++, Java를 식별하는 성능 향상 - C/C++, C/C++, Java - Python 3.9 이상 - uv 패키지 관리자 (추천) 또는 pip 2. 프로젝트와 의존성을 설치하십시오: 1. 설정 파일을 편집하여 Claude 데스크톱을 구성: - macOS: ~/Library/Application Support/claude-desktop/claude desktop config.json - Linux: ~/.
개요(AI 번역)
MCP (Model Context Protocol) 서버는 Abstract Syntax Trees (AST) 및 Abstract Semantic Graphs (ASG)를 통해 코드 구조와 세마틱 분석 기능을 제공하는 서버입니다.
특징
- Abstract Syntax Trees (AST)에 코드
- 코드에서 Abstract Semantic Graphs (ASG) 생성
- 분석 코드 구조 및 복잡성
- 여러 프로그래밍 언어 지원 (Python, JavaScript, TypeScript, Go, Rust, C/C++, Java)
- Claude 데스크톱 및 기타 MCP 클라이언트와 호환
- 대용량 파일의 빠른 처리를위한 Incremental 패싱
- 향상된 범위 처리 및 더 완전한 semantic 분석
- AST diffing 코드 버전의 변경을 식별
- 향상된 성능에 대한 리소스 캐싱
설치
# 필수품
- 파이썬 3.9 이상
- uv 패키지 관리자 (추천) 또는 pip
uv 사용 (추천)
-
Clone 이 저장소:
-
프로젝트와 의존성을 설치하십시오:
-
나무 인서트 패서더를 구축하십시오.
pip 사용 (동의)
Claude 데스크탑 사용
- 설정 파일을 편집하여 Claude 데스크톱을 구성:
** 설정 파일의 위치:**
- macOS:
~/Library/Application Support/claude-desktop/claude_desktop_config.json
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
AST MCP Server
An MCP (Model Context Protocol) server that provides code structure and semantic analysis capabilities through Abstract Syntax Trees (AST) and Abstract Semantic Graphs (ASG).
Features
- Parse code into Abstract Syntax Trees (AST)
- Generate Abstract Semantic Graphs (ASG) from code
- Analyze code structure and complexity
- Support for multiple programming languages (Python, JavaScript, TypeScript, Go, Rust, C/C++, Java)
- Compatible with Claude Desktop and other MCP clients
- Incremental parsing for faster processing of large files
- Enhanced scope handling and more complete semantic analysis
- AST diffing to identify changes between code versions
- Resource caching for improved performance
Installation
Prerequisites
- Python 3.9 or higher
- uv package manager (recommended) or pip
Using uv (Recommended)
- Clone this repository:
git clone https://github.com/angrysky56/ast-mcp-server.git
cd ast-mcp-server
- Install the project and dependencies:
# Install the project in development mode with all dependencies
uv sync
# Or install with specific optional dependencies
uv sync --extra dev # Development tools
uv sync --extra testing # Testing dependencies
uv sync --extra docs # Documentation tools
- Build the tree-sitter parsers:
uv run build-parsers
Using pip (Alternative)
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e .
# Build parsers
python build_parsers.py
Usage with Claude Desktop
- Configure Claude Desktop to use the server by editing your configuration file:
Location of config file:
- macOS:
~/Library/Application Support/claude-desktop/claude_desktop_config.json - Linux:
~/.config/claude-desktop/claude_desktop_config.json - Windows:
%APPDATA%\claude-desktop\claude_desktop_config.json
- Add the AST MCP server configuration:
{
"mcpServers": {
"AstAnalyzer": {
"command": "uv",
"args": [
"--directory",
"/home/ty/Repositories/ai_workspace/ast-mcp-server/ast_mcp_server",
"run",
"server.py"
]
}
}
}
Important: Replace /absolute/path/to/ast-mcp-server with the actual absolute path on your system.
-
Restart Claude Desktop to load the new MCP server.
-
In Claude Desktop, you can now use the AST-based code analysis tools by referencing code files or pasting code snippets.
Development
Development Environment Setup
# Install with development dependencies
uv sync --extra dev
# Install pre-commit hooks (optional)
uv run pre-commit install
Running in Development Mode
To run the server in development mode with the MCP inspector:
# Using uv
uv run --extra dev -- -m mcp dev server.py
# Or using the development script
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"AstAnalyzer": {
"command": "uv",
"args": [
"--directory",
"/home/ty/Repositories/ai_workspace/ast-mcp-server/ast_mcp_server",
"run",
"server.py"
]
}
}
}