MCP 源树服务器
这是一个在指定目录下生成文件树的 MCP 服务器。根据以 开头的目录排除特定的文件或目录.或.gitignore中列出的条件。与 Claude 集成可以让 Claude 快速查看项目结构并帮助他确定要编辑的文件。
功能
以 JSON 格式获取指定目录下的文件树。
根据
.gitignore条件排除文件/目录将目录结构表示为分层 JSON
设置
先决条件
Python 3.10 或更高版本
紫外线
安装
Claude 用于桌面设置
将以下内容添加到claude_desktop_config.json :
Claude 使用示例
请指定 src 上一级的根目录。当考虑.gitignore时,假定.gitignore直接存在于根目录下。 /Users/xxx/GitHub/xxx/ のソースツリーを確認してください,它将会起作用。
其回应如下:
这使得 Claude 能够快速了解项目结构。
文件排除
以 开头的目录.将被自动排除。与.gitignore中的模式匹配的文件和目录将自动从树中排除。例如,以下.gitignore配置是有效的:
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
从指定目录的“src”文件夹生成 JSON 文件树,遵守“.gitignore”规则,以便在 Claude 中快速审查项目结构。
Related Resources
Related MCP Servers
- Asecurity-licenseAqualityProvides tools for collecting and documenting code from directories.Last updated -47315MIT License
- Asecurity-licenseAqualityAnalyzes source code dependencies across multiple programming languages in the specified directory to identify file relationships, assisting in dependency management and project structure understanding.Last updated -11MIT License
- Asecurity-licenseAqualityA TypeScript-based server that visualizes project directory structures in Markdown format, automatically documenting file contents with syntax highlighting and supporting customizable exclusion patterns.Last updated -1143
- -security-license-qualityA tool that helps rank codebase files by importance (1-10 scale), track file dependencies, and provide summaries, all accessible through a simple JSON-based interface.