Skip to content

Commit de661e2

Browse files
author
LittleCoinCoin
committed
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

File tree

2 files changed

+440
-0
lines changed

2 files changed

+440
-0
lines changed

hatch/mcp/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""MCP (Model Context Protocol) support for Hatch.
2+
3+
This module provides MCP host configuration management functionality,
4+
including backup and restore capabilities for MCP server configurations.
5+
"""

0 commit comments

Comments
 (0)