{"id":29448996,"url":"https://github.com/micl2e2/code-to-tree","last_synced_at":"2026-01-14T19:57:54.875Z","repository":{"id":293821544,"uuid":"985216643","full_name":"micl2e2/code-to-tree","owner":"micl2e2","description":"A MCP server that converts source code into AST🌲, regardless of language.","archived":false,"fork":false,"pushed_at":"2025-05-17T10:46:06.000Z","size":574,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T11:26:40.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micl2e2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-17T09:55:01.000Z","updated_at":"2025-05-17T10:46:09.000Z","dependencies_parsed_at":"2025-05-17T23:31:56.560Z","dependency_job_id":null,"html_url":"https://github.com/micl2e2/code-to-tree","commit_stats":null,"previous_names":["micl2e2/code-to-tree"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/micl2e2/code-to-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micl2e2%2Fcode-to-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micl2e2%2Fcode-to-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micl2e2%2Fcode-to-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micl2e2%2Fcode-to-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micl2e2","download_url":"https://codeload.github.com/micl2e2/code-to-tree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micl2e2%2Fcode-to-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28433829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-13T19:02:27.491Z","updated_at":"2026-01-14T19:57:54.870Z","avatar_url":"https://github.com/micl2e2.png","language":"C","readme":"\n# Table of Contents\n\n-   [MCP Server: code-to-tree](#orgf542482)\n-   [Using code-to-tree](#org862e7dc)\n-   [Configure MCP Clients](#orge54fa87)\n-   [Building (Windows)](#org48a8180)\n-   [Building (macOS)](#orgbaa740e)\n\n\n\n\u003ca id=\"orgf542482\"\u003e\u003c/a\u003e\n\n# MCP Server: code-to-tree\n\nThe code-to-tree server's goals are:\n\n1.  Give LLMs the capability of **accurately** converting source code into\n    AST(Abstract Syntax Tree), regardless of language.\n2.  One **standalone** binary should be everything the MCP client needs.\n\nThese goals imply:\n\n1.  The underlying syntax parser should be **versatile** enough. Here we\n    choose [tree-sitter](https://github.com/tree-sitter/tree-sitter), and languages are: C, C++, Rust, Ruby, Go, Java, Python.\n2.  The server should be able to carry all capabilities within\n    itself, imposing **minimum** software dependencies on the end user's\n    machine. Here we choose [mcpc](https://github.com/micl2e2/mcpc).\n\n**Screenshots:**\n\n\u003cimg src=\"./chathistory.png\" width=\"450px\" /\u003e\u003cimg src=\"./wholeast.png\" width=\"200px\" /\u003e\n\nThe above screenshots are obtained by asking the question specified\nin `q.md`. \n\n(**IMPORTANT NOTE**: LLMs have no responsibility of generating the identical\nresult for the same question,  you will likely get a completely different\nstyle or content. The screenshots or questions provided here are just for the reference)\n\n\n\u003ca id=\"org862e7dc\"\u003e\u003c/a\u003e\n\n# Using code-to-tree\n\nBefore everthing, you need to have the code-to-tree executable on your\nmachine (`code-to-tree.exe` for Windows, `code-to-tree` for macOS),\nyou can download at GitHub release [page](https://github.com/micl2e2/code-to-tree/releases) or build it yourself. Once\ndownloaded, you configure your MCP clients to install it, check the section\n*\"Configure MCP Clients\"* for more details.\n\n\n\u003ca id=\"orge54fa87\"\u003e\u003c/a\u003e\n\n# Configure MCP Clients\n\nHere we use Claude as the example.\n\n\n## Windows\n\nIn your Claude configuration\n(`C:\\Users\\YOUR_NAME\\AppData\\Roaming\\Claude\\claude_desktop_config.json`),\nspecify the location of `code-to-tree.exe`:\n\n    {\n        \"mcpServers\": {\n    \t    \"code-to-tree\": { \"command\": \"C:\\\\path\\\\to\\\\code-to-tree.exe\" }\n        }\n    }\n\n\n## macOS\n\nIn your Claude configuration,\n(`~/Library/Application Support/Claude/claude_desktop_config.json`)\nspecify the location of `code-to-tree`\n\n    {\n        \"mcpServers\": {\n    \t    \"code-to-tree\": { \"command\": \"/path/to/code-to-tree\" }\n        }\n    }\n\n\n\u003ca id=\"org48a8180\"\u003e\u003c/a\u003e\n\n# Building (Windows)\n\n\n## 1. Prepare environment\n\n1.  download \u0026 install MSYS2.\n2.  open application \"MSYS2 MINGW64\"\n3.  run `pacman -S make gcc git`\n\n\n## 2. Prepare tree-sitter libraries\n\nHere we need to compile and install tree-sitter and all related grammars.\n\nClone them:\n\n    git clone https://github.com/tree-sitter/tree-sitter\n    \n    git clone https://github.com/tree-sitter/tree-sitter-c\n    \n    git clone https://github.com/tree-sitter/tree-sitter-cpp\n    \n    git clone https://github.com/tree-sitter/tree-sitter-rust\n    \n    git clone https://github.com/tree-sitter/tree-sitter-ruby\n    \n    git clone https://github.com/tree-sitter/tree-sitter-go\n    \n    git clone https://github.com/tree-sitter/tree-sitter-java\n\nCompile and install them:\n\n    cd tree-sitter \u0026\u0026 OS=1 make install\n    \n    cd tree-sitter-c \u0026\u0026 OS=1 make install\n    \n    cd tree-sitter-cpp \u0026\u0026 OS=1 make install\n    \n    cd tree-sitter-rust \u0026\u0026 OS=1 make install\n    \n    cd tree-sitter-ruby \u0026\u0026 OS=1 make install\n    \n    cd tree-sitter-go \u0026\u0026 OS=1 make install\n    \n    cd tree-sitter-java \u0026\u0026 OS=1 make install\n\n\n## 3. Build code-to-tree\n\nInstall mcpc:\n\n    git clone https://github.com/micl2e2/mcpc\n    cd mcpc \u0026\u0026 make install\n\nCompile code-to-tree:\n\n    cd mcpc/example/code-to-tree\n    \n    CFLAGS=\"-I/usr/local/include -L/usr/local/lib\" make\n    \n    # Check the binary\n    file code-to-tree.exe\n    \n    # Remember the binary's location\n    pwd\n    # Assume the output is: /c/path/to/code-to-tree.exe\n\n\n\u003ca id=\"orgbaa740e\"\u003e\u003c/a\u003e\n\n# Building (macOS)\n\n\n## 1. Prepare environment\n\n1.  Xcode Command Line Tools\n\n\n## 2. Prepare tree-sitter libraries\n\nHere we need to compile and install tree-sitter and all related grammars.\n\nClone them:\n\n    git clone https://github.com/tree-sitter/tree-sitter\n    \n    git clone https://github.com/tree-sitter/tree-sitter-c\n    \n    git clone https://github.com/tree-sitter/tree-sitter-cpp\n    \n    git clone https://github.com/tree-sitter/tree-sitter-rust\n    \n    git clone https://github.com/tree-sitter/tree-sitter-ruby\n    \n    git clone https://github.com/tree-sitter/tree-sitter-go\n    \n    git clone https://github.com/tree-sitter/tree-sitter-java\n\nCompile and install them:\n\n    cd tree-sitter \u0026\u0026 make install\n    \n    cd tree-sitter-c \u0026\u0026 make install\n    \n    cd tree-sitter-cpp \u0026\u0026 make install\n    \n    cd tree-sitter-rust \u0026\u0026 make install\n    \n    cd tree-sitter-ruby \u0026\u0026 make install\n    \n    cd tree-sitter-go \u0026\u0026 make install\n    \n    cd tree-sitter-java \u0026\u0026 make install\n\n\n## 3. Build code-to-tree\n\nInstall mcpc:\n\n    git clone https://github.com/micl2e2/mcpc\n    cd mcpc \u0026\u0026 make install\n\nCompile code-to-tree:\n\n    cd mcpc/example/code-to-tree\n    \n    make\n    \n    # Check the binary\n    file ./code-to-tree\n    \n    # Remember the binary's location\n    pwd\n    # Assume the output is: /path/to/code-to-tree\n\n","funding_links":[],"categories":["Developer Tools","Repository \u0026 Code Analysis Mcp Servers","📦 Other","サーバー実装","C","Coding Agents"],"sub_categories":["Code Analysis","🤖 \u003ca name=\"coding-agents\"\u003e\u003c/a\u003eコーディングエージェント"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicl2e2%2Fcode-to-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicl2e2%2Fcode-to-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicl2e2%2Fcode-to-tree/lists"}