MC

micl2e2/code-to-tree

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

90 stars 12 forks 品質 53 トレンド 0MIT

micl2e2/code-to-tree は [https://github.com/micl2e2/code-to-tree.] からインポートされた MCP サーバー候補です

概要

micl2e2/code-to-tree は [https://github.com/micl2e2/code-to-tree.] からインポートされた MCP サーバー候補です

概要(AI 翻訳)

  • MCP サーバー: コード・トゥ・ツリー
  • コード・トゥ・ツリーの使用
  • MCPクライアントの設定
  • 建物(Windows)
  • 建物(macOS)

MCP サーバー: コード・トゥ・ツリー

code-to-tree サーバーの目的は次のとおりです。

  1. LLM にソースコードを変換する accurately の機能を LLM に与える AST(Abstract Syntax Tree)は、言語に関係なく。 2。 One スタンドアロンバイナリは、MCPクライアントのニーズすべてでなければなりません。

これらの目標は、

  1. 根本的な構文のパーサーは十分にversatileであるべきです。 詳細はこちら C、C++、Rust、Ruby、Go、Java、Python の C、C++、Rust、Rust、Ruby、Go、Java、Python を選択します。 2。 サーバは、内部のすべての機能を運ぶことができるはずです それ自体は、minimumソフトウェアの依存性をエンドユーザのものにする マシン。 mcpc を選択します。

スクリーンショット:

上記のスクリーンショットは、指定された質問を要求することによって取得されます [[q.md]]で。

(重要注:LLMは同一の発生の責任を負わない 同じ質問の結果、あなたは完全に異なる得るでしょう スタイルまたはコンテンツ。 ここで提供されるスクリーンショットや質問は参考のためだけです)

コード・トゥ・ツリーを使用する

これまでは、コード・トゥ・ツリーの実行ファイルが必要です。 マシン(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 のガイドから始めましょう →