
File
io.github.rog0x由 GitHub 账号 rog0x 发布v1.0.1更新于 Oct 24, 2026
Dir tree, file stats, duplicates, LOC for AI agents
概览
让助手检查本地目录:目录树、文件统计、重复文件检测、代码行数统计和文件搜索。
- 可以做什么
- 这个本地 MCP 服务器提供五个只读的文件系统分析工具。dir_tree 生成可视化目录树,可配置深度和忽略规则;file_stats 汇总目录内容,包括文件总数、按扩展名的大小分布以及最大、最新和最旧的文件。duplicate_finder 通过大小和 MD5 哈希找出重复文件并报告浪费空间,code_counter 统计 20 多种语言的代码、注释和空行,file_search 按文件名通配、内容正则、大小和修改日期查找文件。
- 适用场景
- 适合助手需要了解代码库或文件夹结构、审查磁盘占用、查找重复文件、按语言统计项目规模,或按名称、内容、日期定位文件而无需手动执行命令行操作的场景。
- 运行要求
- 以 npm 包(@rog0x/mcp-file-tools)通过 stdio 在本地运行,需要 Node.js;README 说明需克隆仓库、执行 npm install 和 npm run build,然后在客户端配置中以绝对路径注册构建产物 dist/index.js。仅限桌面端;未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 File,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@rog0x/mcp-file-tools
MCP server providing file and directory analysis tools for AI agents. Gives Claude (and other MCP-compatible AI) the ability to explore, analyze, and search file systems.
Tools
Installation
Configuration
Claude Code
Claude Desktop
Add to your claude_desktop_config.json:
Tool Details
dir_tree
Generate a visual directory tree like the tree command.
file_stats
Get a comprehensive analysis of a directory's contents.
Returns: total files, total size, file counts by extension, top 10 largest files, top 10 newest/oldest files.
duplicate_finder
Find duplicate files using size pre-filtering and MD5 hashing.
Returns: duplicate groups with file paths, sizes, and total wasted space.
code_counter
Count lines of code across 20+ languages with comment detection.
Supported languages: TypeScript, JavaScript, Python, Java, C/C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, HTML, CSS, JSON, YAML, Markdown, Shell, SQL, Lua.
file_search
Search for files using multiple criteria simultaneously.
License
MIT
来源:README.md,提交 c917eca
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分