LabscoMCP early access ↗
owayoMCP SERVER

MCP Source Tree Server

Give the assistant a project's file tree with .gitignore already applied.

by owayo ↗Codebase Context Packing & CompressionCommunity

LABSCO SUMMARY

The exclusions are the reason to use it.

A raw recursive listing of a real project is mostly node_modules and build output, and it arrives before the model has read a single line of your code. Reusing .gitignore means the filter is already written and already correct, and stays correct as the project changes.

What it is

A file-tree server for a directory you name. It walks the project and returns the structure as JSON, leaving out the noise that would otherwise fill the context window.

What you get

  • The file tree under a directory, returned as hierarchical JSON
  • Directories beginning with a dot excluded automatically
  • Anything matching the project's .gitignore excluded too — patterns like __pycache__/, node_modules/ and *.log never reach the model

Requirements

The project mcp-src-tree, version 0.1.0, run from a checkout: uv sync to install, then have the client launch tree.py with uv against the project directory. Python 3.10 or above and uv. Point it at the root directory one level above src; .gitignore filtering assumes that file sits in that root.

Setup effort

Build from source — git clone https://github.com/owayo/mcp-src-tree