
cyanheads/filesystem-mcp-server 是从 https://github.com/cyanheads/filesystem-mcp-server. 导入的 MCP 服务器候选
概览
cyanheads/filesystem-mcp-server 是从 https://github.com/cyanheads/filesystem-mcp-server. 导入的 MCP 服务器候选
概述(AI 翻译)
为你的AI代理提供强大、平台无关的文件系统能力,现在还支持STDIO和可流式HTTP传输选项。
该模型上下文协议(MCP)服务器为 AI 代理与本地文件系统交互提供了一个安全可靠的接口。它支持读取、写入、更新和管理文件和目录,并以生产环境为基础的 TypeScript 支持,具备全面的日志记录、错误处理、安全措施,并支持STDIO和HTTP传输。
目录
- 概述
- 特色
- 安装
- 配置
- MCP客户端的使用
- 可用工具
- 项目结构
- 发展
- 许可证
概述
模型上下文协议(MCP)是一个标准框架,使人工智能模型能够安全地与外部工具和数据源(资源)交互。该服务器实现了MCP标准,将关键的文件系统操作暴露为工具,使人工智能代理能够:
- 读取和分析文件内容。
- 创建、修改或覆盖文件。
- 管理目录和文件路径。
- 在文件中进行有针对性的更新。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Filesystem MCP Server
Empower your AI agents with robust, platform-agnostic file system capabilities, now with STDIO & Streamable HTTP transport options.
This Model Context Protocol (MCP) server provides a secure and reliable interface for AI agents to interact with the local filesystem. It enables reading, writing, updating, and managing files and directories, backed by a production-ready TypeScript foundation featuring comprehensive logging, error handling, security measures, and now supporting both STDIO and HTTP transports.
Table of Contents
- Overview
- Features
- Installation
- Configuration
- Usage with MCP Clients
- Available Tools
- Project Structure
- Development
- License
Overview
The Model Context Protocol (MCP) is a standard framework allowing AI models to securely interact with external tools and data sources (resources). This server implements the MCP standard to expose essential filesystem operations as tools, enabling AI agents to:
- Read and analyze file contents.
- Create, modify, or overwrite files.
- Manage directories and file paths.
- Perform targeted updates within files.
Built with TypeScript, the server emphasizes type safety, modularity, and robust error handling, making it suitable for reliable integration into AI workflows. It now supports both STDIO for direct process communication and HTTP for network-based interactions.
Architecture
The server employs a layered architecture for clarity and maintainability:
flowchart TB
subgraph TransportLayer["Transport Layer"]
direction LR
STDIO["STDIO Transport"]
HTTP["HTTP Transport (Express, JWT Auth)"]
end
subgraph APILayer["API Layer"]
direction LR
MCP["MCP Protocol Interface"]
Val["Input Validation (Zod)"]
PathSan["Path Sanitization"]
MCP --> Val --> PathSan
end
subgraph CoreServices["Core Services"]
direction LR
Config["Configuration (Zod-validated Env Vars)"]
Logger["Logging (Winston, Context-aware)"]
ErrorH["Error Handling (McpError, ErrorHandler)"]
ServerLogic["MCP Server Logic"]
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"filesystem_stdio": {
"command": "node",
"args": ["/path/to/filesystem-mcp-server/dist/index.js"],
"env": {
"MCP_LOG_LEVEL": "debug"
// Other relevant env vars
},
"disabled": false,
"autoApprove": []
}
}
}