本MCP(多协议通信)服务器专注于分析和管理项目中的文件及其依赖关系。它能助力开发者迅速掌握项目结构、关键文件及其相互联系,还具备生成图表、设置文件摘要等实用功能。
此MCP服务器为开发者提供了强大的文件管理与分析能力,通过一系列功能模块和工具示例,能高效地处理项目文件。接下来将详细介绍其各功能模块和使用示例。
创建一个文件树配置:
create_file_tree(filename: "my-project.json", baseDirectory: "/path/to/project")
查找最重要的5个文件:
find_important_files(limit: 5, minImportance: 5)
获取某个文件的详细信息:
get_file_importance(filepath: "/path/to/project/src/main.ts")
阅读文件内容:
read_file_content(filepath: "/path/to/project/src/main.ts")
添加文件摘要:
set_file_summary(filepath: "/path/to/project/src/main.ts", summary: "主入口点,负责初始化应用程序、设置路由并启动服务器。")
获取文件摘要信息:
get_file_summary(filepath: "/path/to/project/src/main.ts")
创建项目结构图:
generate_diagram(style: "directory", maxDepth: 3, outputPath: "diagrams/project-structure", outputFormat: "mmd")
生成包含依赖关系的HTML图表:
generate_diagram(style: "hybrid", maxDepth: 2, minImportance: 5, showDependencies: true, outputPath: "diagrams/important-files", outputFormat: "html")
自定义布局参数:
generate_diagram(style: "dependency", layout: { direction: "LR", nodeSpacing: 50, rankSpacing: 70 }, outputPath: "diagrams/dependencies", outputFormat: "html")
开启文件自动监控:
toggle_file_watching(enabled: true)
更新监控配置:
update_file_watching_config(interval: 60, ignorePatterns: ["node_modules/**", "*.md"])
本项目遵循MIT开源协议,允许用户自由使用、修改和分发代码。