
code-to-tree
code-to-tree is a single-binary Model Context Protocol (MCP) server that converts source code into an abstract syntax tree (AST) representation, regardless of the programming language. It enables MCP-compatible clients to analyze and navigate code structure programmatically via a unified server interface.
About this tool
code-to-tree
Category: Repository – Code Analysis MCP Servers
Tags: code-analysis, AST, multi-language
Source: https://github.com/micl2e2/code-to-tree
Overview
code-to-tree is a single-binary, runtime-free Model Context Protocol (MCP) server that converts source code into an abstract syntax tree (AST) representation, regardless of the programming language. It exposes this functionality through a unified MCP-compatible interface so clients can analyze and navigate code structure programmatically.
Features
-
MCP server implementation
- Implements the Model Context Protocol for tool/server interoperability.
- Usable by any MCP-compatible client.
-
Single-binary, runtime-free design
- Distributed as a single compiled binary.
- Does not require an external runtime environment at execution time.
-
Language-agnostic AST generation
- Converts source code into an abstract syntax tree independently of programming language.
- Provides a unified structural representation suitable for multi-language codebases.
-
Programmatic code structure access
- Lets clients inspect and navigate code structure via AST.
- Supports automated code analysis and tooling workflows over MCP.
-
Example configurations and tool calls
- Includes sample JSON tool call files (
toolcall-1.json,toolcall-2.json,toolcall-3.json) andtoolslist.jsonillustrating how to interact with the server through MCP. - Example patch file (
ts1.patch) demonstrating AST-related usage or integration scenarios.
- Includes sample JSON tool call files (
-
Documentation and assets
README.md/README.orgdescribing setup and usage (in-repo).- Screenshot assets (
chathistory.png,wholeast.png) showing example interactions and AST visualizations.
Licensing
- License file:
LICENSE(specific terms are in the repository license file).
Technical Artifacts
- Core implementation mainly in
code-to-tree.c. - Build configuration via
Makefile. - GitHub Actions workflows under
.github/workflowsfor CI-related tasks.
Pricing
- Not applicable; this is an open-source GitHub repository. No pricing plans are specified in the provided content.
Loading more......
