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.4.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.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_tree_explorer-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 8ab2b8eb458101c4e0cbad19cc16c8e922c0fe479da8efd4e6c69ca3d898505f
MD5 87936a857c95de2a10812f1a3b98e297
BLAKE2b-256 b9fd2c9c10f36a78bed8de552f3fc2d27fcb4d95dd81b62cdd1f87ba3f185054

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_tree_explorer-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 89e0b5d15d635dc079303f388d329de6be700b426579515dbcea98fa0a0e4083
MD5 1db708c03f6e4d39e630e132c5491904
BLAKE2b-256 6793a0be0f136f03bed0d4893f3cd6da45ceb345c4ce7e0ec93f9d07a78ffb0a

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