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.1.tar.gz (6.3 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.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mcp_tree_explorer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 61fc3c1c6fc1e2f89a3badafa0007b70050e7a476023648b46b300e7dcf34ef6
MD5 6de43daedddccb2dcfc7c3a6976850c8
BLAKE2b-256 b713b57f513c7f790101bbe02a0d233ea08850dee7407062f6ee6ab06106ac08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_tree_explorer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e58d95b4392b3521b85a9c783572e494c444b3118d8ea307e9f25dda96bbcd95
MD5 4f77f33a131b65ee6587da325b5d5071
BLAKE2b-256 e7132847d85a482f9935a7c781b4579a45bf884a7275fd9855a7352ff066d0d6

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