Skip to main content

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 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

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

mcp_tree_explorer-0.1.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_tree_explorer-0.1.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_tree_explorer-0.1.3.tar.gz.

File metadata

  • Download URL: mcp_tree_explorer-0.1.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.31

File hashes

Hashes for mcp_tree_explorer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 224df300a8404a31e9d490d56d1c2d77e4a1778aa3f9602485c7a322b9aed34b
MD5 e7ce54569cf032909409537a3cab4bc5
BLAKE2b-256 754469def9157fa9be72ec5e64bb1a4d0bf62214dce42244b4d8b22c7fbf5169

See more details on using hashes here.

File details

Details for the file mcp_tree_explorer-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_tree_explorer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 96e71b33438a7c92a77830079bf2693f74c09e279c1c4bcdc7ee4f61e374ba4d
MD5 a8b9f351fa1d7f4929d3b9d258e21748
BLAKE2b-256 63647d6b5cd78b4d01721c9ffc204edf8f5875562b76d32e675c1fe795ed43c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page