Tafa(在几种非洲语言中意为“快速”)是一个可用于生产环境的模型上下文协议(MCP)服务器,它具备全面的文件系统管理能力,可与 Claude Desktop 无缝集成。
你可以通过以下步骤快速安装并配置 Tafa MCP 服务器,以实现与 Claude Desktop 的无缝集成。
npm install -g tafa-mcp
git clone https://github.com/your-org/tafa-mcp.git
cd tafa-mcp
npm install
npm run install-global
将以下内容添加到你的 Claude Desktop 配置文件中:
~/.config/claude/claude_desktop_config.json
%APPDATA%\claude\claude_desktop_config.json
{
"mcpServers": {
"tafa-mcp": {
"command": "tafa-mcp",
"args": [
"/Users/username/Documents",
"/Users/username/Desktop",
"/Users/username/Downloads"
]
}
}
}
{
"mcpServers": {
"tafa-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"--mount", "type=bind,src=/Users/username/Documents,dst=/workspace/Documents",
"--mount", "type=bind,src=/Users/username/Desktop,dst=/workspace/Desktop",
"tafa-mcp",
"/workspace"
]
}
}
}
tafa-mcp /path/to/directory1 /path/to/directory2
npm install -g tafa-mcp
git clone https://github.com/your-org/tafa-mcp.git
cd tafa-mcp
npm install
npm run install-global
配置完成后,你可以使用 Claude 执行文件操作:
"Can you read the contents of my README.md file?"
"Please create a new file called notes.txt with some sample content"
"Search for all JavaScript files in my project directory"
"Find duplicate files in my Downloads folder"
read_file(path)
- 读取文件内容write_file(path, content, backup=true)
- 写入文件,可选备份append_file(path, content)
- 向文件追加内容copy_file(source, destination)
- 复制文件move_file(source, destination)
- 移动/重命名文件delete_file(path, backup=true)
- 删除文件,可选备份get_file_info(path)
- 获取文件元数据create_directory(path)
- 创建目录list_directory(path, recursive=false, showHidden=false)
- 列出目录内容delete_directory(path, backup=true)
- 备份后删除目录search_files(directory, pattern, recursive=true)
- 按文件名模式搜索文件search_content(directory, searchTerm, filePattern="*", recursive=true)
- 搜索文件内容get_server_info()
- 获取服务器信息和可用工具Tafa MCP 实施了多项安全措施:
tafa-mcp/
├── package.json
├── README.md
├── src/
│ ├── index.js # 主服务器入口点
│ └── tools/
│ ├── fileOperations.js # 文件操作处理程序
│ ├── directoryOperations.js # 目录操作处理程序
│ ├── searchOperations.js # 搜索操作处理程序
│ └── securityManager.js # 安全和验证
├── config/
│ └── claude_desktop_config.example.json
└── tests/
└── basic-tests.js
运行基本测试:
npm test
本项目采用 MIT 许可证,详情请参阅 LICENSE 文件。
如有问题或需要支持:
Tafa MCP - 为 Claude Desktop 提供快速高效的文件系统操作! 🚀