๐ Tafa MCP Server
Tafa (meaning "quick" in several African languages) is a production-ready Model Context Protocol (MCP) server that provides comprehensive file system management capabilities for seamless integration with Claude Desktop.
โจ Features
๐๏ธ File Operations
- read_file - Read complete file contents with UTF-8 encoding
- write_file - Create new files or overwrite existing ones (with backup)
- append_file - Add content to existing files
- copy_file - Copy files to new locations
- move_file - Move/rename files
- delete_file - Remove files with confirmation and backup
- get_file_info - Get detailed file metadata (size, dates, permissions, hash)
๐ Directory Operations
- create_directory - Create directories with parent creation
- list_directory - List contents with file/directory indicators (recursive option)
- delete_directory - Remove directories with confirmation and backup
- get_directory_info - Get directory metadata and statistics
๐ Search Operations
- search_files - Recursive file search with pattern matching
- search_content - Search within file contents (grep-like functionality)
- find_duplicates - Find duplicate files by content hash
๐ Security Features
- Sandboxed Operations - Only allow operations within specified directories
- Automatic Backups - Creates backups before destructive operations
- Path Validation - Prevents directory traversal attacks
- File Size Limits - Prevents operations on extremely large files
- Permission Checks - Validates read/write permissions before operations
๐ ๏ธ Installation
Quick Install (NPM)
npm install -g tafa-mcp
Manual Installation
git clone https://github.com/your-org/tafa-mcp.git
cd tafa-mcp
npm install
npm run install-global
โ๏ธ Configuration
Claude Desktop Configuration
Add to your Claude Desktop configuration file:
macOS/Linux: ~/.config/claude/claude_desktop_config.json
Windows: %APPDATA%\claude\claude_desktop_config.json
{
"mcpServers": {
"tafa-mcp": {
"command": "tafa-mcp",
"args": [
"/Users/username/Documents",
"/Users/username/Desktop",
"/Users/username/Downloads"
]
}
}
}
Docker Configuration
{
"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"
]
}
}
}
๐ Usage
Starting the Server
tafa-mcp /path/to/directory1 /path/to/directory2
Example Usage with Claude
Once configured, you can use Claude to perform file operations:
"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"
๐ง Available Tools
File Operations
read_file(path)
- Read file contentswrite_file(path, content, backup=true)
- Write file with optional backupappend_file(path, content)
- Append content to filecopy_file(source, destination)
- Copy filemove_file(source, destination)
- Move/rename filedelete_file(path, backup=true)
- Delete file with optional backupget_file_info(path)
- Get file metadata
Directory Operations
create_directory(path)
- Create directorylist_directory(path, recursive=false, showHidden=false)
- List directory contentsdelete_directory(path, backup=true)
- Delete directory with backup
Search Operations
search_files(directory, pattern, recursive=true)
- Search files by name patternsearch_content(directory, searchTerm, filePattern="*", recursive=true)
- Search file contents
Utility
get_server_info()
- Get server information and available tools
๐ Security
Tafa MCP implements several security measures:
- Directory Sandboxing: Operations are restricted to specified directories
- Path Validation: Prevents directory traversal attacks
- Permission Checks: Validates file system permissions
- File Size Limits: Prevents operations on extremely large files (100MB default)
- Automatic Backups: Creates backups before destructive operations
๐๏ธ Project Structure
tafa-mcp/
โโโ package.json
โโโ README.md
โโโ src/
โ โโโ index.js # Main server entry point
โ โโโ tools/
โ โโโ fileOperations.js # File operation handlers
โ โโโ directoryOperations.js # Directory operation handlers
โ โโโ searchOperations.js # Search operation handlers
โ โโโ securityManager.js # Security and validation
โโโ config/
โ โโโ claude_desktop_config.example.json
โโโ tests/
โโโ basic-tests.js
๐งช Testing
Run basic tests:
npm test
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
๐ License
MIT License - see LICENSE file for details.
๐ Support
For issues and support:
- GitHub Issues: Report a bug
- Documentation: Full documentation
๐ Roadmap
- Archive operations (ZIP/TAR)
- File synchronization
- Batch operations
- File organization tools
- Git integration
- Extended search capabilities
Tafa MCP - Making file system operations fast and efficient for Claude Desktop! ๐