这是一个用 Go 语言实现的服务器,遵循模型上下文协议(MCP),专门用于文件系统操作。它为文件系统的各类操作提供了便捷、高效的解决方案。
go install github.com/mark3labs/mcp-filesystem-server
将以下内容添加到 claude_desktop_config.json
中:
{
"mcpServers": {
"filesystem": {
"command": "mcp-filesystem-server",
"args": [
"/Users/username/Desktop",
"/path/to/other/allowed/dir"
]
}
}
}
⚠️ 重要提示
该服务器仅允许在通过
args
指定的目录中执行操作。
file://system
:文件系统操作接口read_file
path
(字符串)read_multiple_files
paths
(字符串数组)write_file
path
(字符串):文件路径content
(字符串):文件内容create_directory
path
(字符串)list_directory
path
(字符串)move_file
source
(字符串)destination
(字符串)search_files
path
(字符串):起始目录pattern
(字符串):搜索模式get_file_info
path
(字符串)list_allowed_directories
此 MCP 服务器根据 MIT 许可证发布。这意味着您可以自由使用、修改和分发软件,但需遵守 MIT 许可证的条款和条件。有关更多详细信息,请参阅项目存储库中的 LICENSE 文件。