MCP 文件系统协议服务器是一个能为每个工作目录提供文件资源,并及时发送文件更改通知的模型上下文协议 (MCP) 服务器。它极大地提升了文件管理与监控的效率,为开发者带来便利。
⚠️ 预 Beta 质量 ⚠️
“在我的机器上运行正常”。欢迎提出问题 ❤️
按照 https://golang.org/doc/install 的说明进行操作。
go install github.com/isaacphi/mcp-filesystem@latest
将以下内容添加到客户端配置文件(位于 ~/Library/Application Support/Claude/claude_desktop_config.json
对于 Claude Desktop):
{
"mcpServers": {
"filesystem": {
"command": "mcp-filesystem",
"args": ["--workspace", "/path/to/your/repository"]
}
}
}
请将 /path/to/your/repository
替换为项目的绝对路径。
您的客户端能够访问和引用工作区中的所有非忽略文件作为 MCP 资源。每个文件都会注册为具有适当 MIME 类型检测的独立资源。
您的客户端需要支持以下 MCP 特性:
notifications/resources/list_changed
事件。该项目使用了以下技术:
git clone https://github.com/isaacphi/mcp-filesystem.git
cd mcp-filesystem
go mod download
go build
{
"mcpServers": {
"filesystem": {
"command": "/full/path/to/your/mcp-filesystem/mcp-filesystem",
"args": ["--workspace", "/path/to/repository"],
"env": {
"DEBUG": "1"
}
}
}
}
请提交详细的问题,包含所有相关信息。设置 DEBUG
环境变量以启用详细日志记录:
"env": {
"DEBUG": "1"
}
info
, create
, edit
和 delete
工具