Back to MCP directory
publicPublicdnsLocal runtime

Tree Explorer

一个轻量级的MCP工具,用于在Cursor中可视化目录树结构。

article

README

🚀 MCP树浏览器

MCP树浏览器是一款轻量级的MCP工具,主要用于在Cursor中实现目录树的可视化展示。它能够帮助用户更直观地查看项目的目录结构,提高开发效率。

🚀 快速开始

本工具可在Cursor中对目录树进行可视化操作。通过简单的配置,即可在Cursor里轻松使用。

✨ 主要特性

  • 使用tree命令可视化目录结构,让项目结构一目了然。
  • 智能过滤常见大文件夹(如node_modules.git等),避免无关信息干扰。
  • 可自定义忽略和保留模式,满足个性化需求。
  • 如果未安装,会自动安装tree命令,无需手动操作。
  • 支持Windows、macOS和Linux系统,具有广泛的适用性。

📦 安装指南

使用pip安装

pip install mcp-tree-explorer

使用uv安装

uv pip install mcp-tree-explorer

💻 使用示例

基础用法

在Cursor中使用该工具,需要编辑Cursor配置文件,将工具添加到配置中:

{
  "tools": {
    "mcp-tree-explorer": {
      "command": "mcp-tree-explorer"
    }
  }
}

高级用法

project_tree工具支持以下参数: | 参数 | 详情 | | ---- | ---- | | directory | 要检查的目录(默认:当前目录) | | depth | 树的最大深度(可选,不指定则不限制深度) | | ignore | 额外忽略的模式,逗号分隔(可选) | | keep | 即使匹配自动忽略模式也要保留的模式,逗号分隔(可选) |

示例用法:

  • “显示这个项目的目录结构”
  • “在src目录中运行tree命令但包含node_modules”
  • “显示项目树,忽略测试文件但保留dist文件夹”

📚 详细文档

开发步骤

克隆仓库

git clone https://github.com/yourusername/mcp-tree-explorer.git
cd mcp-tree-explorer

以开发模式安装

uv pip install -e .

📄 许可证

本项目采用MIT许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client