Paths Tree Generator
About
Converts a flat list of filesystem paths into a JSON directory tree.
Details
- Author
- dakshlohar1
- Categories
- File Management, Developer Tools
Jump to
Setup
Install Paths Tree Generator in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/dakshlohar1/paths-to-tree-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
Converts a flat list of filesystem paths into a JSON directory tree.
This repository contains aminimalModel Context Protocolserverthat exposes one tool –paths_to_tree– which converts a flat list of filesystem paths into a JSON directory tree.
A Python ≥ 3.9 interpreter is required. It's best to work inside a virtual-env:
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
# a) Development mode – auto-reload & web inspector mcp dev main.py # b) Plain stdio mode – good for Cursor / Claude Desktop integrations python main.py
When started withmcp devtheMCP Inspectorwill open athttp://localhost:6274/and allow you to invoke the tool from the browser.
paths_to_tree(paths: list[str]) -> str
[ "config/webpack.config.js", "components/Modal", "components/Form", "components/Table", "pages/home", "pages/app", "pages/help", "package.json", "package-lock.json" ]
project-root ├── components │ ├── Form │ ├── Modal │ └── Table ├── config │ └── webpack.config.js ├── pages │ ├── app │ ├── help │ └── home ├── package-lock.json └── package.json
Using the server in Cursor or Claude Desktop
Add an entry to your MCP configuration (examples shown for Cursor):
{ "mcpServers": { "paths-tree": { "command": "/absolute/path/to/python", "args": ["/absolute/path/to/main.py"] } } }
Restart your host application and thepaths_to_treetool will be available for use.
Feel free to extend the project with additional tools (e.g. serialisation to Markdown, filtering, etc.) – just decorate functions with@mcp.tool()and they will automatically be exposed through MCP.
A local server that allows AI to execute Windows CMD commands, read/write files, and manage directories within a specified path.
Securely browse and read files within an Android project, with built-in validation and access controls for sensitive directories.
An MCP server for viewing, editing, and creating text files, based on the Claude built-in text editor tool.
A cross-platform filesystem server for Linux, macOS, and Windows with secure path restrictions.
Visualize directory structures with real-time updates, configurable depth, and smart exclusions for efficient project navigation.
A Node.js MCP server for managing local files, processes, and terminal sessions.
A high-performance Model Context Protocol (MCP) server that provides secure filesystem access and AI-optimized code development tools for Claude and other AI assistants.
A server for programmatic exploration of local files and folders.
A file mover tool that stages and executes file moves safely. Works as both a CLI tool and an MCP server for AI agents.
A secure server for filesystem operations with controlled access to specified directories.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





