MC

micl2e2/code-to-tree

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

89 stars 12 forks 품질 53 트렌드 15MIT

micl2e2/code-to-tree는 MCP 서버 후보자는 https://github.com/micl2e2/code-to-tree.에서 수입했습니다

개요

micl2e2/code-to-tree는 MCP 서버 후보자는 https://github.com/micl2e2/code-to-tree.에서 수입했습니다

개요(AI 번역)

  • MCP 서버 : 코드 - 투 - 트리
  • Code-to-tree 사용
  • MCP 클라이언트 구성
  • 건물 (Windows)
  • 건물 (macOS)

MCP 서버 : 코드 - 투 - 트리

code-to-tree 서버의 목표는 다음과 같습니다.

1.accurately 변환 소스 코드의 기능 제공 AST(Abstract Syntax Tree), 언어에 관계없이. 2. 1 ** 독립 ** 바이너리는 모든 MCP 클라이언트가 필요합니다.

이 목표는 imply:

  1. 과잉 구문 파서는 ** versatile**이어야 합니다. 현재 위치 나무 시터를 선택하고, 언어는: C, C++, Rust, Ruby, Go, Java, Python.
  2. 서버는 안에 모든 기능을 실행할 수 있어야 합니다 자체, imposingminimum 최종 사용자의 소프트웨어 의존성 기계. 여기에서 우리는 mcpc를 선택합니다.

** 스크린 샷:**

위의 스크린 샷은 지정된 질문을 묻습니다. 에서 q.md.

(IMPORTANT NOTE: LLMs는 동일한 생성의 책임이 없습니다. 같은 질문에 대한 결과, 당신은 완전히 다른 얻을 것이다 작풍 또는 내용. 여기에 제공되는 스크린 샷 또는 질문은 참고용으로만 사용됩니다.

code-to-tree 사용

everthing 전에, 당신은 당신의에 코드-to-tree 실행을해야합니다 기계 (`code-to-tree.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Table of Contents

MCP Server: code-to-tree

The code-to-tree server’s goals are:

  1. Give LLMs the capability of accurately converting source code into AST(Abstract Syntax Tree), regardless of language.
  2. One standalone binary should be everything the MCP client needs.

These goals imply:

  1. The underlying syntax parser should be versatile enough. Here we choose tree-sitter, and languages are: C, C++, Rust, Ruby, Go, Java, Python.
  2. The server should be able to carry all capabilities within itself, imposing minimum software dependencies on the end user’s machine. Here we choose mcpc.

Screenshots:

The above screenshots are obtained by asking the question specified in q.md.

(IMPORTANT NOTE: LLMs have no responsibility of generating the identical result for the same question, you will likely get a completely different style or content. The screenshots or questions provided here are just for the reference)

Using code-to-tree

Before everthing, you need to have the code-to-tree executable on your machine (code-to-tree.exe for Windows, code-to-tree for macOS), you can download at GitHub release page or build it yourself. Once downloaded, you configure your MCP clients to install it, check the section “Configure MCP Clients” for more details.

Configure MCP Clients

Here we use Claude as the example.

Windows

In your Claude configuration (C:\Users\YOUR_NAME\AppData\Roaming\Claude\claude_desktop_config.json), specify the location of code-to-tree.exe:

{
    "mcpServers": {
	    "code-to-tree": { "command": "C:\\path\\to\\code-to-tree.exe" }
    }
}

macOS

In your Claude configuration, (~/Library/Application Support/Claude/claude_desktop_config.json) specify the location of code-to-tree

{
    "mcpServers": {
	    "code-to-tree": { "command": "/path/to/code-to-tree" }
    }
}

Building (Windows)

1. Prepare environment

  1. download & install MSYS2.
  2. open application “MSYS2 MINGW64”
  3. run pacman -S make gcc git

2. Prepare tree-sitter libraries

Here we need to compile and install tree-sitter and all related grammars.

Clone them:

git clone https://github.com/tree-sitter/tree-sitter
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →