Source Tree

Generates a hierarchical JSON file tree for a given directory, excluding dot-directories and .gitignore patterns.
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "owayo-mcp-src-tree": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-src-tree",
        "run",
        "tree.py"
      ]
    }
  }
}

The MCP Source Tree Server lets you generate a JSON representation of a project’s file tree, automatically excluding hidden directories and patterns defined in .gitignore. It helps you quickly inspect a repository’s structure and identify which files Claude should focus on editing, keeping project navigation fast and reliable.

How to use

You run the MCP Source Tree Server as a local process and connect to it with your MCP client. The server executes a Python script that walks your project directory, builds a hierarchical JSON tree, and filters out files and directories that begin with a dot or match your .gitignore rules. The resulting structure can be displayed by Claude to help you understand the project layout and determine which files Claude should edit.

How to install

# Install the runtime helper for MCP servers
$ curl -LsSf https://astral.sh/uv/install.sh | sh

# Change to your project directory
$ cd /path/to/mcp-src-tree

# Install required libraries for the MCP server
$ uv sync

Additional configuration and usage notes

{
  "mcpServers": {
    "src-tree": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-src-tree",
        "run",
        "tree.py"
      ]
    }
  }
}

Claude for Desktop setup

Configure Claude to run the MCP Source Tree Server by adding the following to your Claude Desktop configuration. This enables Claude to request a live view of your project’s directory structure.

{
  "mcpServers": {
    "src-tree": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-src-tree",
        "run",
        "tree.py"
      ]
    }
  }
}

Files to exclude and behavior

Directories that start with a dot are automatically excluded. Files and directories matching patterns in .gitignore are also excluded from the tree. This keeps the tree focused on relevant source and configuration files, making Claude’s analysis faster and more accurate.

Available tools

generateTree

Creates a hierarchical JSON representation of a directory tree, applying exclusion rules for dot-directories and .gitignore patterns.

applyGitIgnore

Applies .gitignore patterns to filter out files and directories from the resulting tree.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Source Tree MCP Server - owayo/mcp-src-tree | VeilStrat