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.0.tar.gz (6.2 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.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mcp_tree_explorer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 242bbc9377339c66d45f1d8fa57d8b9f8eb616eec4015de2c034d1014de5d6f3
MD5 69e53e6967da26df3d8f5522d752c345
BLAKE2b-256 06e63bee7d9bff2ae9670deefd5a3f1428f9cf9345846c12c8524b6f740fb9d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_tree_explorer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d1ca1351d9312a3716a536453b3d3a42796514eb44e2cd29483670b27edf822
MD5 e7f88fe43ac4f0e2ae2837545dfd1059
BLAKE2b-256 b59c5df06b0416fb65d25d46349206ce6fc281192dea8d0638a149b8849126ae

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