Commit de661e2
LittleCoinCoin
feat: implement MCP host configuration backup system
Add comprehensive backup and restore functionality for MCP host configuration files with atomic operations and Pydantic data validation.
Key components:
- MCPHostConfigBackupManager: Core backup management with timestamped backups
- AtomicFileOperations: Safe file operations with rollback capability
- BackupInfo/BackupResult: Pydantic models with validation
- BackupAwareOperation: Base class for backup-aware operations
Features:
- Automatic backup creation before configuration changes
- Manual backup restoration by hostname
- Backup listing and management with cleanup capabilities
- Atomic file operations preventing data corruption
- Support for all MCP host types (claude-desktop, claude-code, vscode, cursor, lmstudio, gemini)
- Microsecond-precision timestamps for unique backup identification
Backup location: ~/.hatch/mcp_host_config_backups/
Naming convention: mcp.json.<hostname>.<timestamp>
Resolves core backup system requirements from final design specification.1 parent ea6ecb2 commit de661e2
2 files changed
+440
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments