Skip to content

Changelog

CHANGELOG - MCP Filesystem Server Ultra-Fast

Section titled “CHANGELOG - MCP Filesystem Server Ultra-Fast”

Major upgrade to execute_pipeline expanding from 9 to 12 actions with conditional logic, template variables, DAG-based parallel execution, and structured error reporting.

  • Conditional Steps: 9 condition types (has_matches, no_matches, count_gt/lt/eq, file_exists/not_exists, step_succeeded/failed) — skip steps based on prior results
  • Template Variables: {{step_id.field}} syntax resolves to prior step results (count, files_count, files, risk, edits)
  • Parallel Execution: parallel: true enables DAG-based scheduling — independent steps run concurrently, destructive actions auto-serialized
  • 3 New Actions: aggregate (combine multiple steps), diff (unified file diff), merge (union/intersection of file lists)
  • Multi-Step References: input_from_all: ["s1", "s2"] for aggregate/merge actions
  • Structured Errors: PipelineStepError with StepID, Action, Param, Message, Suggestion
  • SubOp Tracking: Full execution path visible in dashboard (e.g., pipeline:3_steps → search → edit)
  • Progress Streaming: Per-step audit entries for real-time dashboard visibility
  • 43 new tests across 4 test files

Self-Learning Request Normalizer + Bug #22-23

Section titled “Self-Learning Request Normalizer + Bug #22-23”
  • Request Normalizer: Data-driven rules engine with 14 built-in rules that auto-corrects Claude Desktop parameter mismatches (old_strold_text, string "true"→bool, raw JSON arrays→strings, pipeline typeaction)
  • auditWrap() middleware: All 16 tool handlers wrapped with normalization + audit logging
  • Dashboard pages: Normalizer stats (by tool, by rule, recent normalizations) + Error Patterns (trend analysis, rule suggestions)
  • External rules: --normalizer-rules rules.json flag for custom normalization rules
  • Bug #22: Claude Desktop sends wrong parameter names/types — handled automatically by normalizer
  • Bug #23: CRLF/LF mismatch in edit risk assessment — normalizeLineEndings() added to CalculateChangeImpact() entry point
  • 19 new tests (normalizer_test.go, bug22_multi_edit_test.go, bug23_test.go)

  • Bug #18: Literal \n/\t normalization as fallback in edit matching; old_str/new_str parameter aliases
  • Bug #19: NormalizePath() missing in search_files handler — WSL paths not converted
  • Bug #20: batchManager.SetEngine() not called — batch operations panicked on nil engine
  • Bug #21: formatPipelineResult() silent failures in compact mode — nil map access, missing fields
  • New analyze_operation(operation:"compare") for file diffing

Tool Consolidation — 59 tools reduced to 16

Section titled “Tool Consolidation — 59 tools reduced to 16”

Major refactor to eliminate redundant MCP tool registrations. 59 v3.x tools consolidated to 16 unified tools with MCP spec-compliant annotations. All engine functions unchanged; only the MCP tool surface was restructured.


Three internal optimizations that reduce syscalls and CPU work on every operation:

1. Cache resolved AllowedPaths in isPathAllowed()

Section titled “1. Cache resolved AllowedPaths in isPathAllowed()”
  • Before: filepath.EvalSymlinks() called per allowed path in loop, on every operation. 5 allowed paths x 1,000 ops = 5,000 unnecessary I/O syscalls.
  • After: Allowed paths resolved once at engine startup. Loop uses pre-resolved strings with zero syscalls. Target path still resolved per-call (symlink escape prevention unchanged).
  • Files changed: core/engine.go

2. Use CompileRegex cache in search functions

Section titled “2. Use CompileRegex cache in search functions”
  • Before: performSmartSearch(), performAdvancedTextSearch(), and CountOccurrences() called regexp.Compile() directly, recompiling the same pattern on every call.
  • After: All three now use e.CompileRegex() with RWMutex-protected cache. Repeated searches skip compilation entirely.
  • Files changed: core/search_operations.go

3. Replace isTextFile()/isBinaryFile() O(n) with O(1) map lookup

Section titled “3. Replace isTextFile()/isBinaryFile() O(n) with O(1) map lookup”
  • Before: Standalone functions scanned 45-entry slices linearly on every call.
  • After: Deleted both functions. Callers use textExtensionsMap (70+ entries) and new binaryExtensionsMap — both O(1). Added 3 missing extensions (.lock, .pl, .emacs).
  • Files changed: core/streaming_operations.go, core/claude_optimizer.go, core/search_operations.go

  • mcp_edit was a stripped alias of edit_file missing the force parameter entirely. The tool schema did not declare it; the handler hardcoded false. Any edit exceeding the 30% threshold was permanently blocked.
  • Fix: Added force parameter to schema and handler, matching edit_file, intelligent_edit, and auto_recovery_edit. Risk thresholds unchanged.
  • Files changed: main.go

Bug #14: edit_file rejected valid edits due to trailing whitespace

Section titled “Bug #14: edit_file rejected valid edits due to trailing whitespace”
  • validateEditContext used byte-exact check that rejected edits when file had trailing spaces but old_text did not.
  • Fix: Added Level 2 whitespace-tolerant check; improved error message with actionable root causes.
  • Files changed: core/edit_operations.go

Bug #13: smart_search slow on large projects

Section titled “Bug #13: smart_search slow on large projects”
  • Called filepath.EvalSymlinks on every file in walk, traversed build artifact directories, and opened files with unknown extensions.
  • Fix: Removed per-file validatePath; added searchSkipDirs map; added 14 ASP.NET/MSBuild extensions to textExtensionsMap.
  • Files changed: core/search_operations.go

Bug #12: batch_operations edit replaced entire file

Section titled “Bug #12: batch_operations edit replaced entire file”
  • executeEdit was an unfinished placeholder that wrote new_text as entire file content, ignoring old_text.
  • Fix: Replaced with strings.Replace on existing content; returns error if old_text not found.
  • Files changed: core/batch_operations.go

  • verbose flag in pipeline requests: returns intermediate data (file contents, per-file counts) instead of compact summary
  • Compact mode (verbose: false, default): OK: 3/3 steps | 2 files | 0 edits
  • Verbose mode (verbose: true): full step details with file contents (truncated at 50 lines), per-file occurrence counts, and complete file lists
  • Updated PipelineRequest and PipelineResult structs with Verbose bool field
  • Updated execute_pipeline tool description and parameter docs
  • TestPipeline_DependencyChain: Fixed path key mismatch — test used filepath.Join() keys but pipeline returns NormalizePath() + filepath.Walk() keys. Now uses actual keys from pipeline results
  • TestPipeline_RiskAssessment: Two fixes:
    • File generation bug: string(rune('A'+i%26)) generated only 26 unique files instead of 60 (overwrites on cycle). Changed to fmt.Sprintf("file%03d.txt", i)
    • Pipeline success logic: StopOnError: false (default) marked pipeline as success when completedSteps > 0, even if edit was blocked by risk. Added StopOnError: true to test
  • core/pipeline_types.go — Added Verbose field to request and result structs
  • core/pipeline.go — Propagate Verbose flag to result
  • main.go — Verbose bypasses compact mode, includes per-file counts, file contents (truncated), and full file lists
  • tests/pipeline_test.go — Fixed DependencyChain and RiskAssessment tests, added fmt import and mapKeys/mapKeys2 helpers

Execute complex multi-step file transformations in a single MCP call, reducing token consumption by 4x and round-trips by 5-22x.

  • search — Find files by content pattern with optional file type filtering
  • read_ranges — Read file contents from previous step results
  • edit — Simple find-and-replace across matched files
  • multi_edit — Multiple find-and-replace operations in one pass
  • count_occurrences — Count pattern matches per file
  • regex_transform — Advanced regex-based transformations with capture groups
  • copy — Copy matched files to destination
  • rename — Rename/move matched files
  • delete — Soft-delete matched files
  • Automatic backup/rollback: Creates batch backup before destructive operations, auto-rollback on failure
  • Risk assessment: Calculates LOW/MEDIUM/HIGH/CRITICAL risk based on file count and edit count thresholds
  • Dry-run mode: Preview all changes without modifying files
  • Validation system: Step ID format, duplicate detection, forward reference prevention, required parameter checks
  • Configurable limits: MaxPipelineSteps=20, MaxPipelineFiles=100
  • 4x token reduction: 4000-8000 → 1000-2000 tokens per workflow
  • Single MCP call vs 20+ sequential round-trips
  • In-memory data passing between steps via input_from

Risk Thresholds (configurable in core/config.go)

Section titled “Risk Thresholds (configurable in core/config.go)”
LevelFilesEdits
MEDIUM30+100+
HIGH50+500+
CRITICAL80+1000+
  • core/pipeline_types.go (449 lines) — Request/result types, validation, context management
  • core/pipeline.go (875 lines) — Execution engine with 9 action handlers
  • tests/pipeline_test.go (686 lines) — 8 comprehensive test cases (all passing)
  • core/config.go — 13 pipeline constants
  • core/engine.goExecutePipeline() wrapper method
  • main.go — Registered execute_pipeline MCP tool + formatter

  • Toolchain: go1.24.6 -> go1.24.12 - fixes 8 CVEs in Go standard library:
    • GO-2026-4340: crypto/tls handshake messages processed at incorrect encryption level
    • GO-2025-4175: crypto/x509 improper wildcard DNS name constraint validation
    • GO-2025-4155: crypto/x509 excessive resource consumption on error string printing
    • GO-2025-4013: crypto/x509 panic when validating DSA public keys
    • GO-2025-4011: encoding/asn1 DER payload memory exhaustion
    • GO-2025-4010: net/url insufficient IPv6 hostname validation
    • GO-2025-4008: crypto/tls ALPN negotiation information leak
    • GO-2025-4007: crypto/x509 quadratic complexity in name constraint checks
  • Symlink traversal bypass (core/engine.go): isPathAllowed() now resolves symlinks via filepath.EvalSymlinks() before performing containment checks, preventing sandbox escape through symlinks pointing outside allowed paths
  • Missing access control on EditFile() (core/edit_operations.go): Added isPathAllowed() check - previously edits bypassed allowed-path restrictions entirely
  • Missing access control on StreamingWriteFile() (core/streaming_operations.go): Large file writes (>MediumFileThreshold) now enforce allowed-path restrictions
  • Missing access control on ChunkedReadFile() (core/streaming_operations.go): Large file reads now enforce allowed-path restrictions
  • Missing access control on SmartEditFile() (core/streaming_operations.go): Smart edit operations now enforce allowed-path restrictions
  • Missing access control on MultiEdit() (core/edit_operations.go): Batch edit operations now enforce allowed-path restrictions
  • Deadlock in ListBackups() (core/backup_manager.go): Fixed dangerous RLock->RUnlock->Lock->Unlock->RLock pattern that could cause deadlocks or unlock-of-unlocked-mutex panics under concurrent access
  • Path traversal via backup IDs (core/backup_manager.go): Added sanitizeBackupID() validation to prevent directory traversal attacks through crafted backup IDs (e.g., ../../etc) in GetBackupInfo, RestoreBackup, CompareWithBackup, GetBackupPath
  • Predictable temp file names (core/engine.go, core/edit_operations.go): All temporary files now use crypto/rand via secureRandomSuffix() instead of predictable timestamps or counters, preventing symlink attacks on temp file paths
  • Weak backup ID generation (core/backup_manager.go): Backup IDs now use crypto/rand (8 bytes / 16 hex chars) instead of time.Now().UnixNano()%0xFFFFFF
  • File permission preservation (core/engine.go, core/edit_operations.go, core/streaming_operations.go): Write operations now preserve original file permissions instead of always using hardcoded 0644, preventing sensitive files from becoming world-readable after edits
  • Symlink following in copyDirectory() (core/file_operations.go): Directory copy now skips symlinks to prevent sandbox escape and infinite loops from circular symlinks
  • Restrictive backup metadata permissions (core/backup_manager.go): Backup metadata.json files now created with 0600 instead of 0644
  • Build fix: tests/security/*.go changed from package main to package security and renamed security_tests.go -> security_tests_test.go (pre-existing build error)
  • All dependencies verified at latest stable versions (bigcache v3.1.0, fsnotify v1.9.0, mcp-go v0.43.2, ants v2.11.4)
  • All tests passing (core, tests, tests/security including fuzzing)

Code Editing Excellence: Phase 1 - Coordinate Tracking

Section titled “Code Editing Excellence: Phase 1 - Coordinate Tracking”

Enable precise code location and targeting through character-level coordinate tracking in search results. Foundation for v3.12.0’s 70-80% token reduction goal.

New Feature: Character Offset Tracking

  • Added calculateCharacterOffset() helper function
    • Uses regexp.FindStringIndex() for precise position detection
    • Handles multiple occurrences correctly (Bug #2 fix)
    • 0-indexed character offsets relative to line start
  • Populates MatchStart and MatchEnd fields in SearchMatch struct
  • Passes compiled regex pattern for accurate coordinate calculation

Search Operations Enhanced

  • performSmartSearch(): Now calculates and returns character coordinates
  • performAdvancedTextSearch(): Both memory-efficient and context paths now track coordinates
  • Results include exact position within each matched line
  • Correctly handles multiple pattern occurrences on same line

Test Coverage

  • New file: tests/coordinate_tracking_test.go
  • 7 new test cases covering:
    • SmartSearch coordinate accuracy
    • AdvancedTextSearch with coordinates
    • Coordinates with context lines
    • Edge cases (special characters, multiple occurrences)
    • Bug #2 Fix: Multiple occurrences on same line (TestMultipleOccurrencesOnSameLine)
    • Backward compatibility
    • Position accuracy verification
  • All tests passing (53 total: 47 existing + 7 new), zero regressions

Impact

  • Claude Desktop can pinpoint exact edit locations
  • Enables sub-line-level targeting
  • Foundation for Phase 2 diff-based edits
  • 100% backward compatible (no breaking changes)
  • Modified: core/search_operations.go
    • Added calculateCharacterOffset(line, regexPattern) function (lines 707-721)
      • Uses regexp.FindStringIndex() instead of strings.Index()
      • Correctly handles multiple pattern occurrences (Bug #2 fix)
      • Returns (startOffset, endOffset) for accurate positioning
    • Enhanced performSmartSearch() to pass regex pattern (line 310)
    • Enhanced performAdvancedTextSearch() - both paths (lines 502, 520)
      • Memory-efficient path: uses bufio.Scanner
      • Context path: uses strings.Split
  • Created: tests/coordinate_tracking_test.go (384 lines)
    • 7 test functions covering all scenarios
    • Specific test for Bug #2: TestMultipleOccurrencesOnSameLine
  • No new dependencies, no API changes

Performance & Modernization: P0 & P1 Optimization Initiative

Section titled “Performance & Modernization: P0 & P1 Optimization Initiative”

Comprehensive modernization and performance optimization of the core engine, achieving 30-40% memory savings and modernizing codebase to Go 1.21+ standards.

P0-1a: Error Handling Modernization

  • New file: core/errors.go
  • Custom error types: PathError, ValidationError, CacheError, EditError, ContextError
  • Go 1.13+ error wrapping with %w instead of %v
  • Better error inspection and debugging

P0-1b: Context Cancellation

  • Added context cancellation checks in search operations
  • Prevents unnecessary work after context timeout
  • Improved responsiveness under cancellation

P0-1c: Environment Detection Caching

  • Environment cache with 5-minute TTL
  • 2-3x faster environment detection (WSL, Windows user detection)
  • Thread-safe with RWMutex

P1-1: Buffer Pool Helper

  • New method: CopyFileWithBuffer()
  • Uses sync.Pool for 64KB buffer reuse
  • Reduces allocation overhead in I/O operations

P1-2: BigCache Configuration Fix

  • MaxEntrySize: 500 bytes → 1 MB (CRITICAL FIX)
  • Optimized shards from 1024 → 256
  • Optimized TTLs for faster refresh
  • Cache now actually effective for real files

P1-3: Regex Compilation Cache

  • New cache: regexCache with LRU eviction
  • Max 100 compiled patterns
  • 2-3x faster repeated pattern searches
  • Thread-safe with RWMutex

P1-Config: Streaming Thresholds

  • New file: core/config.go
  • Centralized streaming threshold constants
  • SmallFileThreshold (100KB), MediumFileThreshold (500KB), LargeFileThreshold (5MB)
  • Easier performance tuning

P1-3: bufio.Scanner Memory Optimization

  • Replaced strings.Split with bufio.Scanner in:
    • edit_operations.go:355 (line-by-line processing)
    • search_operations.go:297, 476 (smart split: scanner for basic search, strings.Split only when context needed)
  • Memory savings: 30-40% for large files
  • Pre-allocated strings.Builder for result reconstruction

P1-4: Go 1.21+ Built-in min/max

  • Removed custom helpers: min(), max(), maxInt()
  • Use Go 1.21+ built-in min/max functions
  • Cleaner code, slight performance improvement
  • Code reduction: 12 lines removed

P1-5: Structured Logging with slog

  • Migrated 25 log.Printf() calls to structured slog
  • Files updated: engine.go, streaming_operations.go, claude_optimizer.go, hooks.go, watcher.go
  • Benefits:
    • Parseable logs with key-value pairs
    • Better integration with monitoring tools (Splunk, ELK, Datadog)
    • Suitable for machine-readable log processing
    • Debug logs conditionally executed

Memory Usage

  • 30-40% reduction for large file operations (bufio.Scanner)
  • 50% reduction in regex cache memory (LRU eviction)
  • Smaller environment detection overhead (cache reuse)

Speed

  • 2-3x faster environment detection (caching)
  • 2-3x faster regex operations (compiled cache)
  • No regression in any operation

Code Quality

  • 12 lines of code removed (min/max helpers)
  • 25 log statements modernized (slog)
  • Better error handling (custom error types)
  • Improved maintainability

✅ All 47 tests passing ✅ 0 regressions ✅ Security tests: PASS ✅ Performance benchmarks: Pass (no regression)

  • Created: core/errors.go, core/config.go
  • Modified: core/engine.go, core/edit_operations.go, core/search_operations.go, core/path_detector.go, core/streaming_operations.go, core/claude_optimizer.go, core/hooks.go, core/watcher.go, cache/intelligent.go, plan_mode.go
  • Tests Updated: core/engine_test.go, tests/bug5_test.go

None - All changes are backward compatible.

099c98f perf(P1-5): Convert log.Printf to slog structured logging
11d56b7 perf(P1-4): Use Go 1.21+ built-in min/max functions
1a14f3b perf(P1-3): Replace strings.Split with bufio.Scanner for memory efficiency
facd580 perf(P1-Config): Add streaming threshold constants to core/config.go
45fa199 perf(P1-Regex): Add regex compilation cache to engine
9ccfdef perf(P1-Cache): Fix BigCache configuration parameters
9ceb629 perf(P1-Buffer): Add CopyFileWithBuffer helper for io operations
0841527 refactor(P0): Complete P0 Critical Modernization phase
5ef8265 refactor(P0-1c): Implement environment detection cache
a12e4a0 refactor(P0-1b): Add context cancellation to search loops
  • Simply pull and rebuild - no API changes required
  • Optional: Enable debug logging with slog for better observability

Critical Fix: File Destruction Prevention (Bug #8)

Section titled “Critical Fix: File Destruction Prevention (Bug #8)”

Claude Desktop would sometimes delete ALL file content except the edited portion when using multiline old_text with edit tools. This was a critical data loss vulnerability occurring when:

  • Using recovery_edit() with multiline text
  • Line endings were inconsistent (CRLF vs LF)
  • File had been modified since last read
  • Fuzzy matching failed silently

Solution: Complete Safety Layer Implementation

Section titled “Solution: Complete Safety Layer Implementation”

New File: core/edit_safety_layer.go (400+ lines)

  • EditSafetyValidator: Comprehensive validation before every edit
  • Pre-validates that old_text exists exactly as provided
  • Detects and handles line ending variations
  • Provides detailed diagnostics for debugging
  • Suggests recovery strategies if validation fails

New File: SAFE_EDITING_PROTOCOL.md

  • Quick reference guide (3-layer approach)
  • Copy-paste checklist for every file edit
  • Decision tree for choosing safe tools
  • Complete workflow examples from Bug #8 scenario
  • Troubleshooting guide with common mistakes
  • Emergency procedures for corrupted files

New File: docs/BUG8_FIX.md

  • Complete technical documentation
  • Root cause analysis
  • Blindaje protocol explanation
  • Migration guide for users
  • Performance benchmarks

New File: tests/edit_safety_test.go (350+ lines)

  • 6 comprehensive test suites:
    • Exact multiline matching
    • Single line replacements
    • Nonexistent text detection
    • Line ending variations (CRLF, LF, mixed)
    • Large file handling (100+ line edits)
    • Bug #8 exact reproduction scenario
  • Verification tests
  • Detailed logging tests
  • All tests: ✅ PASS

RULE 1: Never edit without prior verification

  • Use read_file_range() to see exact content
  • Use count_occurrences() to confirm pattern exists
  • Use tools only after validation

RULE 2: Capture literal code to replace

  • Copy EXACTLY from read_file_range() output
  • Include all spaces, tabs, line endings
  • Never use fuzzy matching for critical edits

RULE 3: Atomic operations with backup

  • ALWAYS use atomic: true in batch_operations
  • ALWAYS create backup before edits
  • Rollback immediately if edit fails

RULE 4: Recovery strategy

  • Simple edits → recovery_edit()
  • Multiple changes → batch_operations
  • Critical files → validate with tools first

RULE 5: Post-edit validation

  • Use count_occurrences() after editing
  • Verify old text is gone
  • Confirm new text is present
  • Before (v3.8.0): Risk of complete file destruction on multiline edits
  • After (v3.10.0): Pre-validation prevents ALL file corruption scenarios

✅ Pre-validation of all edits ✅ Line ending normalization (CRLF/LF/mixed) ✅ Whitespace handling ✅ Context detection for modified files ✅ Detailed diagnostics for every edit ✅ Post-edit verification ✅ Atomic operations with backup ✅ Recovery strategy recommendations

⚠️ Function signatures updated (added force parameter):

  • IntelligentEdit(ctx, path, oldText, newText, force bool)
  • AutoRecoveryEdit(ctx, path, oldText, newText, force bool)
  • EditFile(path, oldText, newText, force bool)

Before (❌ Unsafe):

response = client.call_tool("recovery_edit", {
"path": "file.cs",
"old_text": "...multiline...",
"new_text": "..."
})
# May fail silently or corrupt file

After (✅ Safe):

# STEP 1: Read exact content
response = client.call_tool("read_file_range", {"path": "file.cs", "start_line": 10, "end_line": 20})
# STEP 2: Verify pattern exists
response = client.call_tool("count_occurrences", {"path": "file.cs", "pattern": "exact_text"})
# STEP 3: Use batch_operations for safety
response = client.call_tool("batch_operations", {
"operations": [{
"type": "edit",
"path": "file.cs",
"old_text": "exact_text_from_read",
"new_text": "replacement"
}],
"atomic": true
})
# STEP 4: Verify result
response = client.call_tool("count_occurrences", {"path": "file.cs", "pattern": "exact_text"})
# Should return 0
  • core/edit_safety_layer.go (NEW)
  • tests/edit_safety_test.go (NEW)
  • docs/BUG8_FIX.md (NEW)
  • SAFE_EDITING_PROTOCOL.md (NEW)
  • tests/mcp_functions_test.go (Updated)

✅ All 6 edit safety test suites: PASS ✅ Line ending variations: PASS ✅ Multiline scenarios (Bug #8 exact): PASS ✅ Verification tests: PASS ✅ Large file handling: PASS ✅ Detailed logging: PASS


Security: Dependency Updates & Enhanced Security Test Suite

Section titled “Security: Dependency Updates & Enhanced Security Test Suite”
  • Updated github.com/mark3labs/mcp-go: v0.42.0 → v0.43.2
    • Includes latest MCP protocol improvements and security patches
  • Updated golang.org/x/sync: v0.17.0 → v0.19.0
    • Enhanced synchronization primitives and performance
  • Updated golang.org/x/sys: v0.37.0 → v0.39.0
    • Latest system call bindings and OS-level security fixes

New Tests Added:

  • TestOWASPTop10_2024: Comprehensive OWASP Top 10 2024 vulnerability assessment
  • TestIntegerOverflowProtection: CWE-190 integer overflow/wraparound detection
  • TestNullPointerDefense: CWE-476 null pointer dereference protection
  • FuzzPathValidation: Fuzzing with path traversal attempts and edge cases
  • FuzzInputValidation: Fuzzing for command injection protection
  • FuzzFilePathHandling: Fuzzing file path handling with special characters

New Test File:

  • tests/security/fuzzing_test.go (200+ lines)
    • Security tools integration guide
    • Vulnerability reporting process documentation
    • Secure development practices guidelines

Updated Tests:

  • TestSecurityAuditLog: Enhanced to v2 format with dependency update tracking
  • TestMainDependencies: Updated version expectations to latest releases
  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0
  • All Security Tests: PASS
  • Path Traversal (CWE-22)
  • Command Injection (CWE-78)
  • Integer Overflow (CWE-190)
  • Null Pointer Dereference (CWE-476)
  • OWASP Top 10 2024 (A01-A10)
  • Race Conditions (CWE-362)
  • Cryptographic Failures (A02:2024)
  1. Run security tests regularly: go test -v ./tests/security/...
  2. Run race detection: go test -race ./...
  3. Install security tools:
    • gosec for static analysis
    • nancy for CVE detection
    • syft for SBOM generation
  4. Monitor dependency updates monthly

Critical Fix: Risk Assessment Not Blocking Operations (Bug #10 Follow-up)

Section titled “Critical Fix: Risk Assessment Not Blocking Operations (Bug #10 Follow-up)”

After implementing the backup and recovery system (v3.8.0), testing revealed a critical bug:

  • Risk assessment was calculating change impact correctly (e.g., “220.9% change, HIGH risk”)
  • BUT it was NOT blocking the operations as documented
  • All three edit tools (edit_file, intelligent_edit, recovery_edit) executed HIGH/CRITICAL risk operations without warning or requiring force: true

The EditFile function calculated risk using CalculateChangeImpact() but never validated it:

// Calculate change impact for risk assessment
impact := CalculateChangeImpact(string(content), oldText, newText, e.riskThresholds)
// ❌ MISSING: No validation here - operation continued regardless of risk level
// ❌ BUG: Never checked impact.IsRisky

Added risk validation after impact calculation:

// Calculate change impact for risk assessment
impact := CalculateChangeImpact(string(content), oldText, newText, e.riskThresholds)
// ⚠️ RISK VALIDATION: Block HIGH/CRITICAL risk operations unless force=true
if impact.IsRisky && !force {
warning := impact.FormatRiskWarning()
return nil, fmt.Errorf("OPERATION BLOCKED - %s\n\nTo proceed anyway, add \"force\": true to the request", warning)
}

Added force parameter to all edit tools:

  • edit_file(path, old_text, new_text, force: bool)
  • intelligent_edit(path, old_text, new_text, force: bool)
  • recovery_edit(path, old_text, new_text, force: bool) (deprecated alias)

Updated function signatures:

  • EditFile(path, oldText, newText string, force bool)
  • IntelligentEdit(ctx, path, oldText, newText string, force bool)
  • AutoRecoveryEdit(ctx, path, oldText, newText string, force bool)
  • Before (v3.8.0): Risk assessment was “cosmetic” - calculated but never enforced
  • After (v3.8.1): HIGH/CRITICAL risk operations are blocked unless explicitly forced
// Without force - BLOCKED
edit_file({
path: "main.go",
old_text: "func", // 50 occurrences, 220% change
new_text: "function"
})
// → ❌ Error: OPERATION BLOCKED - HIGH RISK: 220.9% of file will change (50 occurrences)
// Recommendation: Use analyze_edit first or add force: true
// With force - ALLOWED
edit_file({
path: "main.go",
old_text: "func",
new_text: "function",
force: true
})
// → ✅ Success, backup created: 20241204-120000-xyz789
  • core/edit_operations.go - Added risk validation after impact calculation
  • core/claude_optimizer.go - Updated IntelligentEdit and AutoRecoveryEdit signatures
  • core/engine.go - Updated wrapper method signatures
  • core/streaming_operations.go - Updated SmartEditFile to pass force=false
  • main.go - Added force parameter to 3 MCP tools
  • tests/bug5_test.go, tests/bug8_test.go - Updated all test calls

🔴 CRITICAL - Risk assessment was completely non-functional in v3.8.0

All v3.8.0 users should upgrade immediately to v3.8.1


Major Feature: Backup and Recovery System (Bug #10)

Section titled “Major Feature: Backup and Recovery System (Bug #10)”

Complete backup and recovery system to prevent code loss from destructive operations. Backups are now persistent, accessible by MCP, and include comprehensive metadata.

1. Persistent Backup System

  • Backups stored in accessible location: %TEMP%\mcp-batch-backups
  • Complete metadata with timestamps, SHA256 hashes, and operation context
  • No automatic deletion - backups persist for recovery
  • Configurable retention: max age (default: 7 days) and max count (default: 100)
  • Smart cleanup with dry-run preview mode

2. Risk Assessment & Validation

  • Automatic impact analysis before destructive operations
  • 4 risk levels: LOW, MEDIUM, HIGH, CRITICAL
  • Blocks risky operations unless force: true is specified
  • Configurable thresholds:
    • MEDIUM risk: 30% file change or 50 occurrences
    • HIGH risk: 50% file change or 100 occurrences
    • CRITICAL: 90%+ file change
  • Clear warnings with actionable recommendations

3. Five New MCP Tools

list_backups - List available backups with filtering

{
"limit": 20,
"filter_operation": "edit",
"filter_path": "main.go",
"newer_than_hours": 24
}

restore_backup - Restore files from backup

{
"backup_id": "20241203-153045-abc123",
"file_path": "path/to/file.go",
"preview": true
}

compare_with_backup - Compare current vs backup

{
"backup_id": "20241203-153045-abc123",
"file_path": "path/to/file.go"
}

cleanup_backups - Clean old backups

{
"older_than_days": 7,
"dry_run": true
}

get_backup_info - Get detailed backup information

{
"backup_id": "20241203-153045-abc123"
}

edit_file, recovery_edit, intelligent_edit

  • Automatic backup creation before editing
  • Risk assessment with change percentage calculation
  • Returns backup_id in response for easy recovery
  • Blocks HIGH/CRITICAL risk without force: true

batch_operations

  • New force parameter for risk override
  • Batch-level risk assessment
  • Persistent backup ID in results
  • Enhanced validation with impact analysis

New Command-Line Flags:

Terminal window
--backup-dir # Backup storage directory
--backup-max-age 7 # Max backup age in days
--backup-max-count 100 # Max number of backups
--risk-threshold-medium 30.0
--risk-threshold-high 50.0
--risk-occurrences-medium 50
--risk-occurrences-high 100

Environment Setup (claude_desktop_config.json):

{
"mcpServers": {
"filesystem-ultra": {
"args": [
"--backup-dir=C:\\Users\\DAVID\\AppData\\Local\\Temp\\mcp-batch-backups"
],
"env": {
"ALLOWED_PATHS": "C:\\__REPOS;C:\\Users\\DAVID\\AppData\\Local\\Temp\\mcp-batch-backups"
}
}
}
}

⚠️ IMPORTANT: Backup directory MUST be in ALLOWED_PATHS

{
"backup_id": "20241203-153045-abc123",
"timestamp": "2024-12-03T15:30:45Z",
"operation": "edit_file",
"user_context": "Edit: 12 occurrences, 35.2% change",
"files": [{
"original_path": "C:\\__REPOS\\project\\main.go",
"size": 12345,
"hash": "sha256:abc123...",
"modified_time": "2024-12-03T15:29:30Z"
}],
"total_size": 12345
}

Scenario 1: Prevented Disaster

edit_file({path: "main.go", old_text: "func", new_text: "function"})
// → ⚠️ HIGH RISK: 65.3% of file will change (200 occurrences)
// → Recommendation: Use analyze_edit first or add force: true
analyze_edit({path: "main.go", old_text: "func", new_text: "function"})
// → Preview shows exactly what will change
edit_file({path: "main.go", old_text: "func", new_text: "function", force: true})
// → ✅ Success, backup created: 20241203-153045-abc123

Scenario 2: Quick Recovery

list_backups({newer_than_hours: 2, filter_path: "main.go"})
// → Shows recent backups
compare_with_backup({backup_id: "...", file_path: "main.go"})
// → Shows what changed
restore_backup({backup_id: "...", file_path: "main.go"})
// → ✅ Code recovered!

New Files:

  • core/backup_manager.go (650 lines) - Complete backup system
  • core/impact_analyzer.go (350 lines) - Risk assessment engine
  • docs/BUG10_RESOLUTION.md - Comprehensive documentation

Modified Files:

  • core/engine.go - BackupManager integration
  • core/edit_operations.go - Persistent backups, impact validation
  • core/batch_operations.go - Risk assessment for batches
  • main.go - 5 new tools, configuration flags

Performance:

  • Backup overhead: ~5-10ms for small files, ~50ms for 1MB
  • Impact analysis: ~1-3ms (negligible)
  • No degradation in normal operations
  • Metadata cached for fast listing (5min refresh)
  • SHA256 hash verification for integrity
  • Automatic rollback on backup failure
  • Pre-restore backup of current state
  • Respects ALLOWED_PATHS restrictions
  • Total tools: 55 (50 original + 5 backup tools)
  • New code: ~2,600 lines
  • Test coverage: Full integration tests recommended
  • Backward compatible: All new features are optional
  1. No more code loss - Safety net before Git
  2. Intelligent protection - Warns before risky changes
  3. Fast recovery - Restore with one command
  4. Full audit trail - Complete operation history
  5. Zero config needed - Sensible defaults work out of box

Bug Fix: Optional Search Parameters Not Exposed (Bug #9)

Section titled “Bug Fix: Optional Search Parameters Not Exposed (Bug #9)”
  • smart_search and advanced_text_search parameter exposure
    • Fixed issue where optional advanced parameters were supported internally but NOT exposed in MCP tool definitions
    • Claude Desktop could not use include_content, file_types, case_sensitive, whole_word, include_context, and context_lines parameters
    • These parameters were hardcoded in handlers instead of being extracted from requests

smart_search - New Optional Parameters:

  • include_content (boolean): Search within file content (default: false)
  • file_types (string): Filter by comma-separated extensions (e.g., “.go,.txt”)

advanced_text_search - New Optional Parameters:

  • case_sensitive (boolean): Case-sensitive search (default: false)
  • whole_word (boolean): Match whole words only (default: false)
  • include_context (boolean): Include context lines around matches (default: false)
  • context_lines (number): Number of context lines to show (default: 3)
  • Efficiency: Claude can now perform advanced searches in a single call instead of multiple operations
  • Token Reduction: Eliminates need for multiple read_file calls to filter results
  • Better UX: More precise search results with filtering and context
{
"tool": "smart_search",
"arguments": {
"path": "./src",
"pattern": "TODO",
"include_content": true,
"file_types": ".go,.js"
}
}
{
"tool": "advanced_text_search",
"arguments": {
"path": "./src",
"pattern": "function",
"case_sensitive": true,
"whole_word": true,
"include_context": true,
"context_lines": 5
}
}
  • Before: Parameters hardcoded in main.go handlers (include_content: false, file_types: [])
  • After: Parameters extracted from request.Params.Arguments with proper defaults
  • Backward Compatible: All parameters are optional with sensible defaults
  • main.go: Updated tool definitions and handlers for smart_search and advanced_text_search
  • README.md: Updated documentation with parameter descriptions and examples
  • tests/bug9_test.go: Comprehensive tests validating all new parameters (285 lines)
  • docs/BUG9_RESOLUTION.md: Detailed technical documentation

✅ All tests passing:

  • TestSmartSearchWithIncludeContent
  • TestSmartSearchWithFileTypes
  • TestAdvancedTextSearchCaseSensitive
  • TestAdvancedTextSearchWithContext

MCP-Prefixed Tool Aliases + Self-Learning Help System

Section titled “MCP-Prefixed Tool Aliases + Self-Learning Help System”

Added 5 new tool aliases with mcp_ prefix and a comprehensive get_help tool for AI agent self-learning.

New: get_help Tool - AI Self-Learning System

Section titled “New: get_help Tool - AI Self-Learning System”

AI agents can now call get_help(topic) to learn how to use tools optimally:

get_help("overview") → Quick start guide
get_help("workflow") → The 4-step efficient workflow
get_help("tools") → Complete list of 50 tools
get_help("edit") → Editing files (most important!)
get_help("search") → Finding content in files
get_help("batch") → Multiple operations at once
get_help("errors") → Common errors and fixes
get_help("examples") → Practical code examples
get_help("tips") → Pro tips for efficiency
get_help("all") → Everything (comprehensive)

Benefits:

  • AI agents can self-learn optimal workflows
  • No need to include full documentation in system prompts
  • Dynamic help that stays up-to-date with tool changes
  • Reduces token usage by loading help only when needed
  • guides/AI_AGENT_INSTRUCTIONS.md - Complete guide for AI agents (English)
  • guides/AI_AGENT_INSTRUCTIONS_ES.md - Complete guide (Spanish)
  • guides/SYSTEM_PROMPT_COMPACT.txt - Minimal system prompt (English)
  • guides/SYSTEM_PROMPT_COMPACT_ES.txt - Minimal system prompt (Spanish)

New Tool Aliases (Same Functionality, Better Naming)

Section titled “New Tool Aliases (Same Functionality, Better Naming)”
New NameOriginalPurpose
mcp_readread_fileRead with WSL↔Windows auto-conversion
mcp_writewrite_fileAtomic write with path conversion
mcp_editedit_fileSmart edit with backup + path conversion
mcp_listlist_directoryCached directory listing
mcp_searchsmart_searchFile/content search
  • No Breaking Changes: Original tools (read_file, write_file, etc.) still work
  • Clear Differentiation: mcp_ prefix makes it obvious these are MCP tools
  • Enhanced Descriptions: Include [MCP-PREFERRED] tag to guide Claude
  • WSL Compatibility: All descriptions mention WSL↔Windows path support
  • Self-Learning: AI can call get_help() to learn usage
  • 50 tools total (44 original + 5 mcp_ aliases + get_help)

Performance Optimizations for Claude Desktop

Section titled “Performance Optimizations for Claude Desktop”

Major performance improvements focused on making file editing faster and more efficient for Claude Desktop.

  • multi_edit tool: Apply multiple edits to a single file atomically
    • MUCH faster than calling edit_file multiple times
    • File is read once, all edits applied in memory, then written once
    • Only one backup is created
    • Usage: multi_edit(path, edits_json) where edits_json is [{"old_text": "...", "new_text": "..."}, ...]
  • Optimized performIntelligentEdit:

    • Uses pre-allocated strings.Builder for zero-copy string operations
    • Single-pass replacement instead of ReplaceAll for known match counts
    • Reduced memory allocations by ~60% for typical edits
  • Improved streaming operations:

    • Uses pooled 64KB buffers for I/O operations
    • StreamingWriteFile now uses bufio.Writer with pooled buffers
    • ChunkedReadFile uses bufio.Reader for better read performance
    • Added throughput logging (MB/s) for large file operations
  • Intelligent cache prefetching:

    • Tracks file access patterns
    • After 3 accesses to a file, automatically prefetches sibling files
    • Background prefetch worker to avoid blocking main operations
    • Optimized cache expiration times for Claude Desktop usage patterns
  • Buffer pool integration:

    • All file operations now use a shared 64KB buffer pool
    • Reduces GC pressure significantly during heavy file operations
    • Uses sync.Pool for efficient buffer reuse
  • Before (single edit): Read file → Replace → Write file → Repeat N times
  • After (multi_edit): Read file once → Apply N edits in memory → Write file once

Estimated speedup for multiple edits:

  • 2 edits: ~1.8x faster
  • 5 edits: ~4x faster
  • 10 edits: ~8x faster
  • core/edit_operations.go: Optimized edit algorithm, added MultiEdit function
  • core/streaming_operations.go: Added buffered I/O with pooled buffers
  • cache/intelligent.go: Added prefetching system
  • core/engine.go: Integrated access tracking for prefetching
  • main.go: Registered multi_edit tool (now 44 tools total)

Bug Fix: WSLWindowsCopy now supports /mnt/c/ paths

Section titled “Bug Fix: WSLWindowsCopy now supports /mnt/c/ paths”
  • wsl_to_windows_copy and windows_to_wsl_copy path handling
    • Fixed issue where wsl_to_windows_copy would fail with “source does not exist” error when given a /mnt/c/ source path
    • Root cause: Function only accepted /home/ style paths, but files edited via Windows paths are accessible through /mnt/c/
    • Solution: Added automatic path conversion from /mnt/c/... to Windows path format (C:…) when checking file existence and copying
  • Workflow Support: Users can now use wsl_to_windows_copy with /mnt/c/ paths (files edited from Windows)
  • Consistency: Function now handles all valid WSL path formats consistently
  • Interoperability: Better WSL/Windows integration when working with files edited from both environments
  • core/wsl_sync.go: Enhanced WSLWindowsCopy() function
    • Added detection for /mnt/ prefixed paths
    • Auto-converts /mnt/c/... to Windows path for file operations

Bug Fix: Silent Failures in intelligent_* Functions on Windows

Section titled “Bug Fix: Silent Failures in intelligent_* Functions on Windows”
  • intelligent_read, intelligent_write, intelligent_edit path handling
    • Fixed silent failures in Claude Desktop on Windows with error: “No result received from client-side tool execution”
    • Root cause: These functions called os.Stat() BEFORE normalizing Windows paths, causing silent failures or timeouts
    • Solution: Added NormalizePath() at the beginning of all intelligent_* functions before any filesystem operations
    • Also fixed: GetOptimizationSuggestion() now normalizes paths before os.Stat()
  • Reliability: intelligent_read, intelligent_write, and intelligent_edit now work correctly in Claude Desktop on Windows
  • Consistency: All intelligent_* functions now match the behavior of basic functions (read_file, write_file) which already normalized paths
  • Developer Experience: Eliminates mysterious “No result received” errors and timeouts when using intelligent operations
  • Fallback Unnecessary: Users no longer need to fall back to basic functions with max_lines workaround
  • Before:
    • intelligent_reados.Stat(path) → fails with incorrect Windows path → silent timeout
    • Users had to use read_file with max_lines as workaround
  • After:
    • intelligent_readNormalizePath(path)os.Stat(normalized_path) → success
    • Path normalization happens before any filesystem operations
  • core/claude_optimizer.go: Added path normalization to 4 functions
    • IntelligentRead() (line 70-71)
    • IntelligentWrite() (line 55-56)
    • IntelligentEdit() (line 98-99)
    • GetOptimizationSuggestion() (line 114-115)

Performance Optimization: Memory-Efficient I/O

Section titled “Performance Optimization: Memory-Efficient I/O”
  • copyFile() / CopyFile() - Now uses io.CopyBuffer with pooled buffers instead of loading entire files into RAM

    • Memory usage reduced from file-size to constant 64KB regardless of file size
    • Leverages OS optimizations like sendfile() on Linux/WSL for zero-copy operations
    • 90-98% memory reduction for large files (>100MB)
  • copyDirectoryRecursive() (WSL sync) - Optimized with io.CopyBuffer and buffer pooling

    • Eliminates memory spikes when copying large directories
    • Reduces GC pressure during mass copy operations
  • SyncWorkspace() (WSL ↔ Windows sync) - Memory-efficient file synchronization

    • Uses streaming copy instead of buffering entire files
    • Enables reliable sync of multi-GB workspace directories
  • ReadFileRange() / read_file_range - Rewritten to use bufio.Scanner

    • Previously read entire file to extract a few lines (e.g., 31k lines to get lines 26630-26680)
    • Now reads line-by-line, stopping when target range is reached
    • 90-99% memory reduction for large files
    • Dramatically faster for reading ranges at the end of large files
  • Buffer Pool System - sync.Pool for 64KB I/O buffers
    • Reduces garbage collection pressure by reusing buffers across operations
    • Buffers automatically scale with concurrent operations
    • Zero allocation overhead for steady-state operations
  • Before:

    • CopyFile() loaded entire file into RAM (e.g., 500MB file = 500MB RAM)
    • ReadFileRange() read 31,248 lines (250k tokens) to extract 50 lines
    • High GC pressure from allocating new buffers for each operation
  • After:

    • CopyFile() uses constant 64KB memory regardless of file size
    • ReadFileRange() reads only necessary lines (2.5k tokens)
    • Buffer pool eliminates repeated allocations
  • Copy Operations: 90-98% memory reduction for files >100MB
  • Range Reads: 95-99% memory and token reduction
  • GC Pressure: Significantly reduced, improving overall responsiveness
  • WSL Performance: Better I/O performance across DrvFs (WSL ↔ Windows filesystem)
  • No API changes - all optimizations are internal
  • Backward compatible with all existing tools and operations
  • All 45 tools continue to work without changes
  • Files modified: 3 (file_operations.go, wsl_sync.go, engine.go)
  • Lines added: ~150 (including comments)
  • Test results: All tests passing (100% success rate)
  • Memory optimization: Up to 99% reduction for targeted operations

  • recovery_edit / smart_edit_file context validation
    • Fixed an issue where multiline edits failed with “context validation failed” due to line ending differences (CRLF vs LF).
    • Now normalizes line endings before validating context, ensuring robust editing across Windows/WSL environments.
    • batch_operations remains unaffected as it uses a different validation path.
  • Reliability: Multiline code replacements now work reliably regardless of file encoding (Windows/Unix).
  • Developer Experience: Eliminates false positive “file has changed” errors when editing files with mixed line endings.

  • recovery_edit is now a safe alias for intelligent_edit.
    • The original recovery_edit logic was deprecated due to causing timeouts and instability on Windows with Claude Desktop.
    • To ensure backward compatibility, the recovery_edit tool is preserved.
    • All calls to recovery_edit are now internally redirected to the stable intelligent_edit function.
    • A log warning (⚠️ DEPRECATED: 'recovery_edit' was called...) is issued when the alias is used.
  • Silent MCP Timeouts: Resolved an issue where recovery_edit could cause silent timeouts (“No result received from client-side tool execution”) by removing its unstable multi-step recovery logic.
  • Improved Stability: Prevents production environments from hanging due to unstable recovery attempts.
  • Backward Compatibility: Older versions of Claude Desktop that might still call recovery_edit will continue to function without errors, using the stable edit logic instead.
  • Developer Experience: The tool’s description is updated to mark it as [DEPRECATED], guiding users towards intelligent_edit.

  • Windows path recognition - Binary now compiles correctly for Windows with GOOS=windows
  • Path normalization - Windows paths (C:…) now recognized correctly on native Windows (not WSL)
  • build-windows.sh - Build script for Windows from WSL/Linux
  • build-windows.bat - Build script for Windows from Windows
  • WINDOWS_PATH_FIX.md - Technical documentation of the problem and solution
  • GUIA_RAPIDA_WINDOWS.md - Quick reference guide for Windows users
  • Before: Binary compiled from WSL thought it was running on Linux

    • Input: C:\temp\hol.txt
    • Internal conversion: /mnt/c/temp/hol.txt (incorrect for Windows)
    • Result: File not found ❌
  • After: Binary properly compiled for Windows with GOOS=windows

    • Input: C:\temp\hol.txt
    • Internal handling: C:\temp\hol.txt (correct)
    • Result: File found ✅
  • Root cause: Binary was compiled in WSL without specifying target OS
  • The code was always correct - only the compilation method needed fixing
  • Now uses proper cross-compilation: GOOS=windows GOARCH=amd64 go build
  • runtime.GOOS now correctly reports “windows” instead of “linux”
  • os.PathSeparator now correctly uses \ instead of /
  • Claude Desktop users on Windows: Now works correctly with Windows paths
  • WSL users: No change, WSL paths continue to work as before
  • Configuration: No changes needed to claude_desktop_config.json
  • Files modified: 0 (code was already correct)
  • Files created: 4 (2 build scripts, 2 documentation files)
  • Executable size: 5.67 MB (unchanged)
  • Total tools: 45 tools (unchanged)

Automatic WSL ↔ Windows Sync (Silent Auto-Copy)

Section titled “Automatic WSL ↔ Windows Sync (Silent Auto-Copy)”
  • configure_autosync - Enable/disable automatic sync with configurable options
  • autosync_status - Show current auto-sync configuration status
  • core/autosync_config.go - Complete real-time auto-sync system (343 lines)
  • WriteFileContent() - Auto-sync after write
  • StreamingWriteFile() - Auto-sync after streaming
  • EditFile() - Auto-sync after edit
  • ReplaceNthOccurrence() - Auto-sync after replace
  • Auto-Sync Configuration System - Configuration stored in ~/.config/mcp-filesystem-ultra/autosync.json
  • Integrated hooks - Automatic sync on all write/edit operations
  • Environment variable - MCP_WSL_AUTOSYNC=true to enable in one line
  • Async operations - Never block the main operation
  • Silent failure - Sync errors never break file operations
  • Backwards compatible - Disabled by default
  • Total tools: 43 → 45 tools (+2 new)
  • Files modified: 3 (core/engine.go +46 lines, core/streaming_operations.go +5, core/edit_operations.go +10)
  • Files created: 1 (core/autosync_config.go 343 lines)
  • Before: Files created in WSL did not automatically appear in Windows Explorer
  • After: Automatic silent sync after each write/edit

  • wsl_to_windows_copy - Copy files/directories from WSL to Windows with automatic path conversion
  • windows_to_wsl_copy - Copy files/directories from Windows to WSL with automatic path conversion
  • sync_claude_workspace - Sync complete workspaces between WSL and Windows
  • wsl_windows_status - Show WSL/Windows integration status and file locations
  • Automatic path conversion - Destination paths calculated automatically if not specified
  • Recursive copy - Full support for directories and individual files
  • Filtered sync - Sync only files matching patterns (*.txt, *.go, etc.)
  • Dry-run mode - Preview changes without executing
  • Environment detection - Automatically identifies whether running in WSL or Windows
  • Directory creation - Automatically creates destination directories if they do not exist
  • Total tools: 37 → 41 tools (+4 new)
  • New modules: 3 (path_detector.go, path_converter.go, wsl_sync.go)

Windows/WSL Path Normalization + create_file Alias

Section titled “Windows/WSL Path Normalization + create_file Alias”
  • create_file alias - Alias para write_file (compatibilidad Claude Desktop)
  • Path normalization - All 18 file operations now support automatic WSL ↔ Windows path conversion
  • Intelligent OS detection
  • Bidirectional support: /mnt/c/...C:\...
  • Automatic path normalization - Converts /mnt/c/...C:\... based on the OS
  • Intelligent detection - Works on Windows, WSL, and Linux without configuration
  • 18 functions updated - All file operations support both path formats
  • Zero configuration required - Works automatically
  • Total tools: 35 → 36 tools (+1 alias)

  • read_file_range - Read specific line ranges (90-98% token savings vs full read_file)
  • count_occurrences - Count occurrences with optional line numbers (95% token savings)
  • replace_nth_occurrence - Surgical replacement of a specific occurrence (first, last, nth)
  • Efficient range reads - Reads only the necessary lines without loading the entire file
  • Accurate counter - Counts all occurrences including multiple per line
  • Surgical replacement - Changes only the occurrence you specify
  • Strict validation - With automatic rollback
  • Dual format - Compact (production) and verbose (debug)
  • Regex or literal - Supports both pattern types
  • Total tools: 32 → 36 tools (includes create_file alias)
  • Token savings: 90-99% on large file operations
  • Executable size: 5.5 MB

  • Smart Truncation - Intelligent reading with head/tail/all mode
  • 77% reduction in typical sessions (58k → 13k tokens)
  • 90-98% savings on large file reads
  • 60% reduction in tool overhead

  • Batch operation support with atomic rollback
  • Multi-file operations with consistency guarantees

  • analyze_write - Analyzes a write operation without executing it
  • analyze_edit - Analyzes an edit operation without executing it
  • analyze_delete - Analyzes a delete operation without executing it

  • 12 Hook Events - Pre/post para write, edit, delete, create, move, copy
  • Pattern Matching - Target specific files using exact matches or wildcards

  • create_directory - Create directories with automatic parents
  • delete_file - Permanent deletion of files/directories
  • move_file - Move files or directories between locations
  • copy_file - Copy files or directories recursively
  • get_file_info - Detailed information (size, permissions, timestamps)
  • Total tools: 23 → 28 tools (+5 new)

  • --compact-mode flag - Minimal responses without decorative formatting
  • 65-75% token reduction in typical sessions

  • min redeclared in this block error
  • undefined: log imports
  • time.Since variable shadowing issue
  • mcp.WithInt undefined → migrated to mcp.WithNumber
  • request.GetInt API → migrated to mcp.ParseInt
  • mcp-go: v0.33.0 → v0.40.0
  • Go: 1.23.0 → 1.24.0

  • 32 MCP tools ultra-optimized for Claude Desktop
  • Intelligent System - 6 intelligent tools for auto-optimization
  • Streaming Operations - 4 streaming tools for large files
  • Smart Cache - Intelligent caching with 98.9% hit rate
  • 2016.0 ops/sec throughput
  • 98.9% cache hit rate

Current Version: 4.1.0 Last Updated: 2026-03-16 Status: Production Ready