Back to MCP directory
publicPublicdnsLocal runtime

deep-directory-tree-mcp

一个用于可视化和分析目录结构的强大工具,支持AI助手高效导航项目文件。

article

README

🚀 深度目录树 MCP 🌳

一个强大的模型上下文协议(MCP)实现,用于可视化和分析目录结构。借助它,AI 助手能高效理解并导航你的项目结构,进而实现更智能的代码导航和项目组织洞察。

Smithery 工具调用 NPM 版本 NPM 下载量

✨ 主要特性

  • 深度目录树可视化
  • 可配置深度的树生成
  • 智能模式基于文件/目录排除
  • 清洁可读的树输出格式
  • 实时目录结构更新
  • 针对目录的智能分析

DEMO:

Cursor + 深度目录树 MCP DEMO

🚀 快速开始

先决条件

Smithery 安装

使用Smithery最简单的方式:

npx -y @smithery/cli install @andredezzy/deep-directory-tree-mcp --client cursor

手动安装

Cursor IDE 设置

  1. 打开 Cursor 设置 → MCP → 添加新的 MCP 服务器
  2. 使用以下配置设置:
{
  "deep-directory-tree": {
    "command": "npx",
    "args": ["-y", "@andredezzy/deep-directory-tree-mcp"]
  }
}

Claude Desktop 设置

将以下内容添加到你的 MCP 配置中:

{
  "mcpServers": {
    "deep-directory-tree": {
      "command": "npx",
      "args": ["-y", "@andredezzy/deep-directory-tree-mcp"]
    }
  }
}

💻 使用示例

AI 助手常用命令:

  • “显示目录结构”
  • “可视化项目树直到深度4”
  • “排除测试目录的文件”

📦 安装指南

开发先决条件

# 克隆仓库
git clone https://github.com/andredezzy/deep-directory-tree-mcp.git
cd deep-directory-tree-mcp

# 安装依赖
bun install

# 构建项目
bun run build

开发手动安装

Cursor IDE 设置

  1. 打开 Cursor 设置 → MCP → 添加新的 MCP 服务器
  2. 使用以下配置设置:
{
  "deep-directory-tree": {
    "command": "node",
    "args": ["ABSOLUTE_PATH_TO_MCP_SERVER/bin/deep-directory-tree.js"]
  }
}

Claude Desktop 设置

将以下内容添加到你的 MCP 配置中:

{
  "mcpServers": {
    "deep-directory-tree": {
      "command": "node",
      "args": ["ABSOLUTE_PATH_TO_MCP_SERVER/bin/deep-directory-tree.js"]
    }
  }
}

📚 详细文档

贡献指南

提交问题和反馈

  • 如果遇到任何问题,请在Issues中提交。
  • 如果有任何建议或功能请求,请随时提出。

创建分支

  • 在克隆仓库后,创建新的功能分支:
git checkout -b feature/new-feature
  • 提交你的更改并推送到该分支。
  • 创建拉取请求到主分支。

支持

如果你发现这个项目对你有帮助,请考虑支持它。你可以通过以下方式提供支持:

  • 星标仓库:表示你对项目的认可。
  • 提供反馈:帮助改进项目。
  • 贡献代码:参与项目开发。

感谢你的支持!

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