A single-binary MCP server that converts source code into AST, regardless of language.
Add to Claude Desktop config.json
{
"mcpServers": {
"micl2e2-code-to-tree": {
"command": "node",
"args": [
"~/.mcp/code-to-tree/index.js"
]
}
}
} Get the source and run locally
git clone https://github.com/micl2e2/code-to-tree.git ~/.mcp/code-to-tree
cd ~/.mcp/code-to-tree The code-to-tree server’s goals are:
These goals imply:
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)
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.
Here we use Claude as the example.
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" }
}
}
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" }
}
}
pacman -S make gcc gitHere we need to compile and install tree-sitter and all related grammars.
Clone them:
git clone https://github.com/tree-sitter/tree-sitter
git clone https://github.com/tree-sitter/tree-sitter-c
git clone https://github.com/tree-sitter/tree-sitter-cpp
git clone https://github.com/tree-sitter/tree-sitter-rust
git clone https://github.com/tree-sitter/tree-sitter-ruby
git clone https://github.com/tree-sitter/tree-sitter-go
git clone https://github.com/tree-sitter/tree-sitter-java
Compile and install them:
cd tree-sitter && OS=1 make install
cd tree-sitter-c && OS=1 make install
cd tree-sitter-cpp && OS=1 make install
cd tree-sitter-rust && OS=1 make install
cd tree-sitter-ruby && OS=1 make install
cd tree-sitter-go && OS=1 make install
cd tree-sitter-java && OS=1 make install
Install mcpc:
git clone https://github.com/micl2e2/mcpc
cd mcpc && make install
Compile code-to-tree:
cd mcpc/example/code-to-tree
CFLAGS="-I/usr/local/include -L/usr/local/lib" make
# Check the binary
file code-to-tree.exe
# Remember the binary's location
pwd
# Assume the output is: /c/path/to/code-to-tree.exe
Here we need to compile and install tree-sitter and all related grammars.
Clone them:
git clone https://github.com/tree-sitter/tree-sitter
git clone https://github.com/tree-sitter/tree-sitter-c
git clone https://github.com/tree-sitter/tree-sitter-cpp
git clone https://github.com/tree-sitter/tree-sitter-rust
git clone https://github.com/tree-sitter/tree-sitter-ruby
git clone https://github.com/tree-sitter/tree-sitter-go
git clone https://github.com/tree-sitter/tree-sitter-java
Compile and install them:
cd tree-sitter && make install
cd tree-sitter-c && make install
cd tree-sitter-cpp && make install
cd tree-sitter-rust && make install
cd tree-sitter-ruby && make install
cd tree-sitter-go && make install
cd tree-sitter-java && make install
Install mcpc:
git clone https://github.com/micl2e2/mcpc
cd mcpc && make install
Compile code-to-tree:
cd mcpc/example/code-to-tree
make
# Check the binary
file ./code-to-tree
# Remember the binary's location
pwd
# Assume the output is: /path/to/code-to-tree A fully-featured coding agent that relies on symbolic code operations by using language servers.
An MCP server that indexes local code into a graph database to provide context to AI assistants with a graphical code visualizations for humans.
Coding agent with basic read, write and command line tools.
Desktop GUI automation using accessibility APIs. Control Windows, macOS, and Linux applications without vision models or screenshots. Supports workflow recording, structured data extraction, and browser DOM inspection.
A framework for creating multi-agent systems using MCP for coordinated AI collaboration, featuring task management, shared context, and RAG capabilities.
A MCP Server that allows AI such as Claude to read from the directory structure in a VS Code workspace, see problems picked up by linter(s) and the language server, read code files, and make edits.