文件系统 MCP 服务器
模型上下文协议 (MCP) 服务器实现通过标准化工具接口提供文件系统操作、分析和操控功能。
建筑学
该服务器基于 MCP SDK 构建,并分为不同的层:
成分
服务器层:处理MCP协议通信和工具调度
工具注册表:管理工具注册和执行
操作层:实现核心功能
文件系统接口:提供安全的文件系统访问
安装
克隆存储库:
安装依赖项:
构建服务器:
配置 MCP 设置(cline_mcp_settings.json):
工具参考
目录操作
列表目录
列出带有元数据的目录内容。
创建目录
创建新目录。
文件操作
读取文件
读取具有编码支持的文件内容。
写入文件
将内容写入文件。
追加文件
将内容附加到文件。
分析操作
分析文本
分析文本文件属性。
计算哈希
使用指定的算法计算文件哈希值。
查找重复项
识别目录中的重复文件。
压缩操作
创建_zip
创建一个 ZIP 档案。
提取压缩文件
提取 ZIP 档案。
错误处理
服务器使用标准 MCP 错误代码:
错误响应包括:
错误代码
人类可读的消息
附加上下文(如有)
错误示例:
发展
项目结构
运行测试
运行测试套件:
覆盖运行:
开发模式
以监视模式运行:
代码质量
检查代码库:
类型检查:
依赖项
核心依赖项:
@modelcontextprotocol/sdk:MCP 服务器实现
file-type:文件类型检测
mime-types:MIME 类型查找
crypto-js:文件哈希
归档器:ZIP 创建
extract-zip:ZIP 提取
iconv-lite:文本编码
chardet:编码检测
开发依赖项:
typescript:类型系统
开玩笑:测试
eslint:Lint
更漂亮:格式化
ts-node:TypeScript 执行
nodemon:开发服务器
贡献
分叉存储库
创建你的功能分支
为新功能编写测试
确保所有测试通过
提交拉取请求
执照
麻省理工学院
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
通过标准化工具接口提供文件系统操作、分析和操控功能的模型上下文协议服务器。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables enhanced file system operations including reading, writing, copying, moving files with streaming capabilities, directory management, file watching, and change tracking.Last updated -16MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides secure and intelligent interaction with files and filesystems, offering smart context management and token-efficient operations for working with large files and complex directory structures.Last updated -2147MIT License
- AsecurityAlicenseAqualityA server implementing the Model Context Protocol that provides filesystem operations (read/write, directory management, file movement) through a standardized interface with security controls for allowed directories.Last updated -93MIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server that provides over 50 file and system management tools for AI models, including navigation, file operations, search, compression, and system information capabilities.Last updated -