Skip to main content

MCP Tree Explorer

A lightweight MCP tool for directory tree visualization in Cursor.

Features

  • Visualize directory structures with the tree command
  • Smart filtering of common large directories (node_modules, .git, etc.)
  • Customizable ignore and keep patterns
  • Automatic installation of the tree command 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

Metadata

Release files for mcp-tree-explorer 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-tree-explorer 0.1.4
File Size Uploaded
mcp_tree_explorer-0.1.4.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-tree-explorer 0.1.4
File Interpreter ABI Platform
mcp_tree_explorer-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / mcp_tree_explorer-0.1.4.tar.gz

Download URL mcp_tree_explorer-0.1.4.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8ab2b8eb458101c4e0cbad19cc16c8e922c0fe479da8efd4e6c69ca3d898505f
BLAKE2b-256 checksum
How to use checksums
b9fd2c9c10f36a78bed8de552f3fc2d27fcb4d95dd81b62cdd1f87ba3f185054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.31

Release files / mcp_tree_explorer-0.1.4-py3-none-any.whl

Download URL mcp_tree_explorer-0.1.4-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89e0b5d15d635dc079303f388d329de6be700b426579515dbcea98fa0a0e4083
BLAKE2b-256 checksum
How to use checksums
6793a0be0f136f03bed0d4893f3cd6da45ceb345c4ce7e0ec93f9d07a78ffb0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.31

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page