Codetree

v1.0.0Developer Toolsstable

MCP server with 23 tools for structured code understanding via tree-sitter. 10 languages. 999 tests. One-command install.

aiastclaudecode-analysiscoding-agents
Share:
25
Stars
0
Downloads
0
Weekly
0/5

What is Codetree?

Codetree is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server with 23 tools for structured code understanding via tree-sitter. 10 languages. 999 tests. one-command install.

MCP server with 23 tools for structured code understanding via tree-sitter. 10 languages. 999 tests. One-command install.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP server with 23 tools for structured code understanding v

Use Cases

Structured code analysis via tree-sitter
Multi-language AST parsing
Code understanding for AI
ThinkyMiner

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedApr 23, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx codetree

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Codetree

Codetree is an MCP server that gives AI coding assistants deep structural understanding of codebases through 23 tree-sitter-powered tools, supporting 10 programming languages including Python, TypeScript, JavaScript, Rust, Go, and Java. Instead of consuming thousands of tokens reading raw source files, AI agents use Codetree to extract function skeletons, call graphs, blast radii, dead code, clone detection, dataflow analysis, and repository maps — achieving up to 25x token reduction. It ships with 999 tests and installs in a single command.

Prerequisites

  • Python 3.10+ installed on your system
  • uv package manager (recommended) or pip
  • An MCP-compatible client such as Claude Desktop, Cursor, or GitHub Copilot
  • A code repository to analyze (passed via the --root flag)
1

Add the Codetree server to Claude via the CLI (recommended)

The fastest installation is via the 'claude mcp add' command, which registers the server and its --root argument pointing to your project directory.

claude mcp add codetree -- uvx --from mcp-server-codetree codetree --root .
2

Alternatively, configure manually in claude_desktop_config.json

For Claude Desktop or other clients without a CLI, add the server configuration manually. Set the --root value to the absolute path of the project you want to analyze.

{
  "mcpServers": {
    "codetree": {
      "command": "uvx",
      "args": ["--from", "mcp-server-codetree", "codetree", "--root", "/path/to/your/project"]
    }
  }
}
3

Verify the server is running and tools are registered

Restart your MCP client. Ask Claude to call get_repository_map — it should return a structural overview of the project. If successful, all 23 tools are available.

4

Start using structural analysis instead of raw file reads

Replace 'read this file' requests with targeted Codetree queries. Use get_file_skeleton to see all classes and functions at a glance, then get_symbol to fetch only the specific implementation you need.

Codetree Examples

Client configuration

Claude Desktop configuration using uvx to run the mcp-server-codetree package against a local project directory.

{
  "mcpServers": {
    "codetree": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-server-codetree",
        "codetree",
        "--root",
        "/Users/me/projects/my-app"
      ]
    }
  }
}

Prompts to try

Structural code queries using Codetree's 23 tools for navigation, quality analysis, refactoring impact, and test discovery.

- "Get the skeleton of src/auth/service.py — show all classes and functions with line numbers"
- "Show me the full source of the 'divide' function in calculator.py"
- "Find all references to the 'UserRepository' class across the codebase"
- "What is the blast radius if I change the 'processPayment' function?"
- "Detect any dead code — functions defined but never called"
- "Generate a call graph for the checkout workflow starting from 'placeOrder'"
- "Find all tests related to the 'AuthService' module"

Troubleshooting Codetree

uvx --from mcp-server-codetree fails with package not found

Ensure uv is installed: 'pip install uv' or follow instructions at https://astral.sh/uv. The PyPI package name is 'mcp-server-codetree' (with hyphens). Run 'uvx --from mcp-server-codetree codetree --help' directly in the terminal to confirm the package resolves before adding it to your MCP config.

get_file_skeleton returns an empty result or language not recognized

Codetree supports 10 languages via tree-sitter. Check that your file extension is one of the supported types (Python, TypeScript, JavaScript, Rust, Go, Java, C, C++, Ruby, or PHP). Files with non-standard extensions may not be parsed — rename or specify the language explicitly in the tool call.

Tools work but are very slow on a large monorepo

Point --root at a specific subdirectory rather than the repository root to reduce the analysis scope. For example, '--root /project/src/backend' instead of '--root /project'. This dramatically reduces tree-sitter parsing time for large codebases.

Frequently Asked Questions about Codetree

What is Codetree?

Codetree is a Model Context Protocol (MCP) server that mcp server with 23 tools for structured code understanding via tree-sitter. 10 languages. 999 tests. one-command install. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Codetree?

Follow the installation instructions on the Codetree GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Codetree?

Codetree works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Codetree free to use?

Yes, Codetree is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "codetree": { "command": "npx", "args": ["-y", "codetree"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Codetree?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides