scopweb/mcp-filesystem-server-ultra
If you are the rightful owner of mcp-filesystem-server-ultra and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP Filesystem Server Ultra is an advanced server designed for high-performance file operations, featuring intelligent caching, memory mapping, and robust search capabilities.
MCP Filesystem Server Ultra
Ultra-fast MCP Filesystem Server with intelligent caching, memory mapping, and advanced search capabilities designed for Claude Desktop.
๐ Features
Core Performance
- Memory Mapping (mmap): Zero-copy file access for large files
- Intelligent Caching: Smart caching system that adapts to access patterns
- Goroutine Pool: Optimized concurrent operations with controlled resource usage
- Batch Operations: Multiple file operations in single requests
Advanced Operations
- Smart Search: Regex support, content matching, file type filtering
- Safe Editing: Atomic file operations with backup support
- File Comparison: Advanced diff generation and similarity analysis
- Project Analysis: Comprehensive project structure analysis
- Refactoring Assistance: Safe code refactoring with dependency analysis
- Performance Monitoring: Built-in performance analysis and bottleneck detection
Developer Experience
- Chunked Operations: Handle large files without memory limits
- Real-time Monitoring: File system watching capabilities
- Duplicate Detection: Content-based duplicate file detection
- Report Generation: JSON, HTML, and Markdown reports
- Benchmark Suite: Built-in performance benchmarking
๐ Performance Benchmarks
Based on comprehensive testing with various file sizes and operations:
Small Files (< 1KB)
- Read: ~150 ops/ms
- Write: ~120 ops/ms
- Search: ~200 ops/ms
Medium Files (1-100KB)
- Read: ~80 ops/ms
- Write: ~60 ops/ms
- Search: ~100 ops/ms
Large Files (> 1MB)
- Read (mmap): ~40 ops/ms
- Write (chunked): ~25 ops/ms
- Search (indexed): ~50 ops/ms
Batch Operations
- Multi-file read: 5-10x faster than sequential
- Batch writes: 3-5x faster than individual operations
๐ ๏ธ Installation
Pre-built Binaries
Download from Releases
Build from Source
git clone https://github.com/scopweb/mcp-filesystem-server-ultra.git
cd mcp-filesystem-server-ultra
go build -o mcp-filesystem-ultra
โ๏ธ Configuration
Claude Desktop Integration
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"filesystem-enhanced": {
"command": "path/to/mcp-filesystem-ultra",
"args": [
"--allowed-dirs", "C:\\Users\\YourUser\\Documents",
"--allowed-dirs", "C:\\Users\\YourUser\\Projects",
"--cache-size", "100MB",
"--enable-mmap"
]
}
}
}
Command Line Options
--allowed-dirs Directories accessible to the server (required)
--cache-size Cache size limit (default: 50MB)
--enable-mmap Enable memory mapping for large files
--goroutine-limit Max concurrent goroutines (default: 100)
--log-level Logging level: debug, info, warn, error
--benchmark Run performance benchmarks
๐ API Reference
Core Operations
read_file
- Read single file with optional encodingwrite_file
- Write file with contentwrite_file_safe
- Atomic write with backup optionread_multiple_files
- Batch read multiple fileslist_directory
- Enhanced directory listingcreate_directory
- Create directories recursively
Advanced Operations
smart_search
- Intelligent search with filterssearch_files
- Pattern-based file searchcompare_files
- File comparison with diffanalyze_file
- Deep file analysisanalyze_project
- Project structure analysisbatch_operations
- Multiple operations in one call
Editing & Refactoring
edit_file
- Replace text without full rewriteassist_refactor
- Safe refactoring assistancemove_file
- Move/rename with validationcopy_file
- Copy files/directoriesdelete_file
- Safe deletion with confirmation
Performance & Analysis
performance_analysis
- Benchmark file operationsfind_duplicates
- Content-based duplicate detectiongenerate_report
- Comprehensive reportsplan_task
- Task planning for complex operations
Advanced Features
chunked_write
- Handle large files in chunkssplit_file
- Split large filesjoin_files
- Combine file chunkssmart_sync
- Intelligent file synchronization
๐ง Architecture
Core Components
Engine (core/engine.go
)
- Central coordination of all operations
- Memory management and resource pooling
- Performance monitoring and optimization
Caching System (cache/intelligent.go
)
- LRU cache with intelligent eviction
- Access pattern analysis
- Memory-aware cache sizing
Search Operations (core/search_operations.go
)
- Regex-based content search
- File type filtering
- Parallel search execution
Memory Mapping (core/mmap.go
)
- Zero-copy file access for large files
- Platform-specific optimizations
- Automatic fallback for small files
Performance Optimizations
- Memory Mapping: Large files accessed via mmap for zero-copy operations
- Goroutine Pooling: Controlled concurrency prevents resource exhaustion
- Intelligent Caching: Adaptive cache that learns from access patterns
- Batch Processing: Multiple operations combined for efficiency
- Incremental Search: Resume interrupted searches from last position
๐งช Benchmarking
Run performance tests:
# Basic benchmarks
./mcp-filesystem-ultra --benchmark
# Custom benchmark with specific directory
./mcp-filesystem-ultra --benchmark --test-dir /path/to/test/directory
# Memory profiling
go run main.go --benchmark --profile-memory
Benchmark Results Format
{
"overall_performance": {
"total_operations": 5000,
"avg_response_time_ms": 12.3,
"operations_per_second": 406,
"memory_efficiency": 94.2
},
"operation_breakdown": {
"read_operations": 85.3,
"write_operations": 67.8,
"search_operations": 124.5
}
}
๐ Security Features
- Directory Restrictions: Access limited to explicitly allowed directories
- Path Validation: Prevents directory traversal attacks
- Safe Operations: Atomic writes with rollback capability
- Input Sanitization: All inputs validated and sanitized
- Resource Limits: Memory and CPU usage controls
๐ค Contributing
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature
- Run tests:
go test ./...
- Run benchmarks:
go run main.go --benchmark
- Commit changes:
git commit -m 'Add amazing feature'
- Push branch:
git push origin feature/amazing-feature
- Open Pull Request
Development Setup
# Install dependencies
go mod download
# Run tests with coverage
go test -v -cover ./...
# Run benchmarks
go test -bench=. ./bench
# Profile memory usage
go run main.go --benchmark --profile-memory
๐ License
MIT License - see file for details.
๐ Troubleshooting
Common Issues
High Memory Usage
- Reduce cache size:
--cache-size 25MB
- Disable mmap for small files: add size threshold
Permission Errors
- Verify allowed directories in configuration
- Check file/directory permissions
Performance Issues
- Enable mmap for large files:
--enable-mmap
- Increase goroutine limit:
--goroutine-limit 200
- Use batch operations for multiple files
Debug Mode
./mcp-filesystem-ultra --log-level debug --allowed-dirs /your/path
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
Built for Claude Desktop โข Optimized for Performance โข Production Ready