MCP tool that provides directory tree visualization for Cursor
Project description
MCP Tree Explorer
A lightweight MCP tool for directory tree visualization in Cursor.
Features
- Visualize directory structures with the
treecommand - Smart filtering of common large directories (node_modules, .git, etc.)
- Customizable ignore and keep patterns
- Automatic installation of the
treecommand if not available - Works on Windows, macOS, and Linux
Installation
# Using pip
pip install mcp-tree-explorer
# Using uv
uv pip install mcp-tree-explorer
Usage with Cursor
Configure Cursor to use this tool by editing your Cursor configuration file:
{
"tools": {
"mcp-tree-explorer": {
"command": "mcp-tree-explorer"
}
}
}
Tool Parameters
The project_tree tool accepts these parameters:
directory: The directory to examine (default: current directory)depth: Maximum depth of the tree (optional, unlimited if not specified)ignore: Additional patterns to ignore, comma-separated (optional)keep: Patterns to keep even if they match auto-ignore patterns, comma-separated (optional)
Example usage in Cursor:
- "Show me the directory structure of this project"
- "Run tree in the src directory but include node_modules"
- "Show me a tree of the project, ignoring test files but keeping the dist folder"
Development
# Clone the repository
git clone https://github.com/yourusername/mcp-tree-explorer.git
cd mcp-tree-explorer
# Install in development mode
uv pip install -e .
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_tree_explorer-0.1.2.tar.gz.
File metadata
- Download URL: mcp_tree_explorer-0.1.2.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.31
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b680485344a26e1c6779597b298cf7983748c9854fc6a13c02e5d8b4b44edbbc
|
|
| MD5 |
fb8c33376cc72f10b979c3dd95bca256
|
|
| BLAKE2b-256 |
d167c78aa3d96b1c65e8244945c0de7a305105fa73d1e830ed0aef72dd9e5a73
|
File details
Details for the file mcp_tree_explorer-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mcp_tree_explorer-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.31
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f3de56fa36c2b395ced218f5d60e2f93de507259b24fa7589ca6b4f90a09d88
|
|
| MD5 |
702f4653da19b5f23a9707e92d203421
|
|
| BLAKE2b-256 |
3e9a26120b9a5e80bd59ca341c93ce9e8d6d93f5c0eb9d82aa630dcf8fa826e5
|