hatch-xclam 0.7.0.dev12__py3-none-any.whl → 0.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. hatch/cli_hatch.py +120 -18
  2. hatch/mcp_host_config/__init__.py +4 -2
  3. hatch/mcp_host_config/backup.py +62 -31
  4. hatch/mcp_host_config/models.py +125 -1
  5. hatch/mcp_host_config/strategies.py +268 -1
  6. {hatch_xclam-0.7.0.dev12.dist-info → hatch_xclam-0.7.1.dist-info}/METADATA +41 -32
  7. hatch_xclam-0.7.1.dist-info/RECORD +105 -0
  8. hatch_xclam-0.7.1.dist-info/top_level.txt +2 -0
  9. tests/integration/__init__.py +5 -0
  10. tests/integration/test_mcp_kiro_integration.py +153 -0
  11. tests/regression/__init__.py +5 -0
  12. tests/regression/test_mcp_codex_backup_integration.py +162 -0
  13. tests/regression/test_mcp_codex_host_strategy.py +163 -0
  14. tests/regression/test_mcp_codex_model_validation.py +117 -0
  15. tests/regression/test_mcp_kiro_backup_integration.py +241 -0
  16. tests/regression/test_mcp_kiro_cli_integration.py +141 -0
  17. tests/regression/test_mcp_kiro_decorator_registration.py +71 -0
  18. tests/regression/test_mcp_kiro_host_strategy.py +214 -0
  19. tests/regression/test_mcp_kiro_model_validation.py +116 -0
  20. tests/regression/test_mcp_kiro_omni_conversion.py +104 -0
  21. tests/test_data_utils.py +108 -0
  22. tests/test_mcp_cli_all_host_specific_args.py +194 -1
  23. tests/test_mcp_cli_direct_management.py +8 -5
  24. hatch_xclam-0.7.0.dev12.dist-info/RECORD +0 -152
  25. hatch_xclam-0.7.0.dev12.dist-info/top_level.txt +0 -3
  26. node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py +0 -45
  27. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -365
  28. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -206
  29. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -1272
  30. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -1547
  31. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -59
  32. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -152
  33. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -270
  34. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -574
  35. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -704
  36. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -709
  37. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -173
  38. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -169
  39. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -113
  40. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -55
  41. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
  42. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +0 -805
  43. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +0 -1172
  44. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +0 -1319
  45. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +0 -128
  46. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -104
  47. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -462
  48. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -89
  49. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -56
  50. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -2745
  51. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -3976
  52. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -44
  53. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -2965
  54. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -67
  55. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -1391
  56. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -26
  57. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -3112
  58. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -99
  59. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -767
  60. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -1260
  61. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -174
  62. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +0 -61
  63. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -373
  64. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -1939
  65. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +0 -54
  66. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +0 -303
  67. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -3196
  68. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -65
  69. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +0 -15
  70. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +0 -108
  71. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +0 -252
  72. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +0 -83
  73. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +0 -359
  74. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +0 -61
  75. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +0 -192
  76. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py +0 -252
  77. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +0 -825
  78. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
  79. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +0 -90
  80. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +0 -1030
  81. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py +0 -553
  82. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py +0 -172
  83. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py +0 -563
  84. node_modules/npm/node_modules/node-gyp/gyp/test_gyp.py +0 -261
  85. {hatch_xclam-0.7.0.dev12.dist-info → hatch_xclam-0.7.1.dist-info}/WHEEL +0 -0
  86. {hatch_xclam-0.7.0.dev12.dist-info → hatch_xclam-0.7.1.dist-info}/entry_points.txt +0 -0
  87. {hatch_xclam-0.7.0.dev12.dist-info → hatch_xclam-0.7.1.dist-info}/licenses/LICENSE +0 -0
@@ -8,12 +8,15 @@ strategies with decorator registration following Hatchling patterns.
8
8
 
9
9
  import platform
10
10
  import json
11
+ import tomllib # Python 3.11+ built-in
12
+ import tomli_w # TOML writing
11
13
  from pathlib import Path
12
- from typing import Optional, Dict, Any
14
+ from typing import Optional, Dict, Any, TextIO
13
15
  import logging
14
16
 
15
17
  from .host_management import MCPHostStrategy, register_host_strategy
16
18
  from .models import MCPHostType, MCPServerConfig, HostConfiguration
19
+ from .backup import MCPHostConfigBackupManager, AtomicFileOperations
17
20
 
18
21
  logger = logging.getLogger(__name__)
19
22
 
@@ -409,6 +412,101 @@ class VSCodeHostStrategy(MCPHostStrategy):
409
412
  return False
410
413
 
411
414
 
415
+ @register_host_strategy(MCPHostType.KIRO)
416
+ class KiroHostStrategy(MCPHostStrategy):
417
+ """Configuration strategy for Kiro IDE."""
418
+
419
+ def get_config_path(self) -> Optional[Path]:
420
+ """Get Kiro configuration path (user-level only per constraint)."""
421
+ return Path.home() / ".kiro" / "settings" / "mcp.json"
422
+
423
+ def get_config_key(self) -> str:
424
+ """Kiro uses 'mcpServers' key."""
425
+ return "mcpServers"
426
+
427
+ def is_host_available(self) -> bool:
428
+ """Check if Kiro is available by checking for settings directory."""
429
+ kiro_dir = Path.home() / ".kiro" / "settings"
430
+ return kiro_dir.exists()
431
+
432
+ def validate_server_config(self, server_config: MCPServerConfig) -> bool:
433
+ """Kiro validation - supports both local and remote servers."""
434
+ return server_config.command is not None or server_config.url is not None
435
+
436
+ def read_configuration(self) -> HostConfiguration:
437
+ """Read Kiro configuration file."""
438
+ config_path_str = self.get_config_path()
439
+ if not config_path_str:
440
+ return HostConfiguration(servers={})
441
+
442
+ config_path = Path(config_path_str)
443
+ if not config_path.exists():
444
+ return HostConfiguration(servers={})
445
+
446
+ try:
447
+ with open(config_path, 'r', encoding='utf-8') as f:
448
+ data = json.load(f)
449
+
450
+ servers = {}
451
+ mcp_servers = data.get(self.get_config_key(), {})
452
+
453
+ for name, config in mcp_servers.items():
454
+ try:
455
+ servers[name] = MCPServerConfig(**config)
456
+ except Exception as e:
457
+ logger.warning(f"Invalid server config for {name}: {e}")
458
+ continue
459
+
460
+ return HostConfiguration(servers=servers)
461
+
462
+ except Exception as e:
463
+ logger.error(f"Failed to read Kiro configuration: {e}")
464
+ return HostConfiguration(servers={})
465
+
466
+ def write_configuration(self, config: HostConfiguration, no_backup: bool = False) -> bool:
467
+ """Write configuration to Kiro with backup support."""
468
+ config_path_str = self.get_config_path()
469
+ if not config_path_str:
470
+ return False
471
+
472
+ config_path = Path(config_path_str)
473
+
474
+ try:
475
+ # Ensure directory exists
476
+ config_path.parent.mkdir(parents=True, exist_ok=True)
477
+
478
+ # Read existing configuration to preserve other settings
479
+ existing_data = {}
480
+ if config_path.exists():
481
+ with open(config_path, 'r', encoding='utf-8') as f:
482
+ existing_data = json.load(f)
483
+
484
+ # Update MCP servers section
485
+ servers_data = {}
486
+ for name, server_config in config.servers.items():
487
+ servers_data[name] = server_config.model_dump(exclude_unset=True)
488
+
489
+ existing_data[self.get_config_key()] = servers_data
490
+
491
+ # Use atomic write with backup support
492
+ backup_manager = MCPHostConfigBackupManager()
493
+ atomic_ops = AtomicFileOperations()
494
+
495
+ atomic_ops.atomic_write_with_backup(
496
+ file_path=config_path,
497
+ data=existing_data,
498
+ backup_manager=backup_manager,
499
+ hostname="kiro",
500
+ skip_backup=no_backup
501
+ )
502
+
503
+ return True
504
+
505
+ except Exception as e:
506
+ logger.error(f"Failed to write Kiro configuration: {e}")
507
+ return False
508
+
509
+
412
510
  @register_host_strategy(MCPHostType.GEMINI)
413
511
  class GeminiHostStrategy(MCPHostStrategy):
414
512
  """Configuration strategy for Google Gemini CLI MCP integration."""
@@ -511,3 +609,172 @@ class GeminiHostStrategy(MCPHostStrategy):
511
609
  except Exception as e:
512
610
  logger.error(f"Failed to write Gemini configuration: {e}")
513
611
  return False
612
+
613
+
614
+ @register_host_strategy(MCPHostType.CODEX)
615
+ class CodexHostStrategy(MCPHostStrategy):
616
+ """Configuration strategy for Codex IDE with TOML support.
617
+
618
+ Codex uses TOML configuration at ~/.codex/config.toml with a unique
619
+ structure using [mcp_servers.<server-name>] tables.
620
+ """
621
+
622
+ def __init__(self):
623
+ self.config_format = "toml"
624
+ self._preserved_features = {} # Preserve [features] section
625
+
626
+ def get_config_path(self) -> Optional[Path]:
627
+ """Get Codex configuration path."""
628
+ return Path.home() / ".codex" / "config.toml"
629
+
630
+ def get_config_key(self) -> str:
631
+ """Codex uses 'mcp_servers' key (note: underscore, not camelCase)."""
632
+ return "mcp_servers"
633
+
634
+ def is_host_available(self) -> bool:
635
+ """Check if Codex is available by checking for config directory."""
636
+ codex_dir = Path.home() / ".codex"
637
+ return codex_dir.exists()
638
+
639
+ def validate_server_config(self, server_config: MCPServerConfig) -> bool:
640
+ """Codex validation - supports both STDIO and HTTP servers."""
641
+ return server_config.command is not None or server_config.url is not None
642
+
643
+ def read_configuration(self) -> HostConfiguration:
644
+ """Read Codex TOML configuration file."""
645
+ config_path = self.get_config_path()
646
+ if not config_path or not config_path.exists():
647
+ return HostConfiguration(servers={})
648
+
649
+ try:
650
+ with open(config_path, 'rb') as f:
651
+ toml_data = tomllib.load(f)
652
+
653
+ # Preserve [features] section for later write
654
+ self._preserved_features = toml_data.get('features', {})
655
+
656
+ # Extract MCP servers from [mcp_servers.*] tables
657
+ mcp_servers = toml_data.get(self.get_config_key(), {})
658
+
659
+ servers = {}
660
+ for name, server_data in mcp_servers.items():
661
+ try:
662
+ # Flatten nested env section if present
663
+ flat_data = self._flatten_toml_server(server_data)
664
+ servers[name] = MCPServerConfig(**flat_data)
665
+ except Exception as e:
666
+ logger.warning(f"Invalid server config for {name}: {e}")
667
+ continue
668
+
669
+ return HostConfiguration(servers=servers)
670
+
671
+ except Exception as e:
672
+ logger.error(f"Failed to read Codex configuration: {e}")
673
+ return HostConfiguration(servers={})
674
+
675
+ def write_configuration(self, config: HostConfiguration, no_backup: bool = False) -> bool:
676
+ """Write Codex TOML configuration file with backup support."""
677
+ config_path = self.get_config_path()
678
+ if not config_path:
679
+ return False
680
+
681
+ try:
682
+ config_path.parent.mkdir(parents=True, exist_ok=True)
683
+
684
+ # Read existing configuration to preserve non-MCP settings
685
+ existing_data = {}
686
+ if config_path.exists():
687
+ try:
688
+ with open(config_path, 'rb') as f:
689
+ existing_data = tomllib.load(f)
690
+ except Exception:
691
+ pass
692
+
693
+ # Preserve [features] section
694
+ if 'features' in existing_data:
695
+ self._preserved_features = existing_data['features']
696
+
697
+ # Convert servers to TOML structure
698
+ servers_data = {}
699
+ for name, server_config in config.servers.items():
700
+ servers_data[name] = self._to_toml_server(server_config)
701
+
702
+ # Build final TOML structure
703
+ final_data = {}
704
+
705
+ # Preserve [features] at top
706
+ if self._preserved_features:
707
+ final_data['features'] = self._preserved_features
708
+
709
+ # Add MCP servers
710
+ final_data[self.get_config_key()] = servers_data
711
+
712
+ # Preserve other top-level keys
713
+ for key, value in existing_data.items():
714
+ if key not in ('features', self.get_config_key()):
715
+ final_data[key] = value
716
+
717
+ # Use atomic write with TOML serializer
718
+ backup_manager = MCPHostConfigBackupManager()
719
+ atomic_ops = AtomicFileOperations()
720
+
721
+ def toml_serializer(data: Any, f: TextIO) -> None:
722
+ # tomli_w.dumps returns a string, write it to the file
723
+ toml_str = tomli_w.dumps(data)
724
+ f.write(toml_str)
725
+
726
+ atomic_ops.atomic_write_with_serializer(
727
+ file_path=config_path,
728
+ data=final_data,
729
+ serializer=toml_serializer,
730
+ backup_manager=backup_manager,
731
+ hostname="codex",
732
+ skip_backup=no_backup
733
+ )
734
+
735
+ return True
736
+
737
+ except Exception as e:
738
+ logger.error(f"Failed to write Codex configuration: {e}")
739
+ return False
740
+
741
+ def _flatten_toml_server(self, server_data: Dict[str, Any]) -> Dict[str, Any]:
742
+ """Flatten nested TOML server structure to flat dict.
743
+
744
+ TOML structure:
745
+ [mcp_servers.name]
746
+ command = "npx"
747
+ args = ["-y", "package"]
748
+ [mcp_servers.name.env]
749
+ VAR = "value"
750
+
751
+ Becomes:
752
+ {"command": "npx", "args": [...], "env": {"VAR": "value"}}
753
+
754
+ Also maps Codex-specific 'http_headers' to universal 'headers' field.
755
+ """
756
+ # TOML already parses nested tables into nested dicts
757
+ # So [mcp_servers.name.env] becomes {"env": {...}}
758
+ data = dict(server_data)
759
+
760
+ # Map Codex 'http_headers' to universal 'headers' for MCPServerConfig
761
+ if 'http_headers' in data:
762
+ data['headers'] = data.pop('http_headers')
763
+
764
+ return data
765
+
766
+ def _to_toml_server(self, server_config: MCPServerConfig) -> Dict[str, Any]:
767
+ """Convert MCPServerConfig to TOML-compatible dict structure.
768
+
769
+ Maps universal 'headers' field back to Codex-specific 'http_headers'.
770
+ """
771
+ data = server_config.model_dump(exclude_unset=True)
772
+
773
+ # Remove 'name' field as it's the table key in TOML
774
+ data.pop('name', None)
775
+
776
+ # Map universal 'headers' to Codex 'http_headers' for TOML
777
+ if 'headers' in data:
778
+ data['http_headers'] = data.pop('headers')
779
+
780
+ return data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hatch-xclam
3
- Version: 0.7.0.dev12
3
+ Version: 0.7.1
4
4
  Summary: Package manager for the Cracking Shells ecosystem
5
5
  Author: Cracking Shells Team
6
6
  Project-URL: Homepage, https://github.com/CrackingShells/Hatch
@@ -17,6 +17,7 @@ Requires-Dist: packaging>=20.0
17
17
  Requires-Dist: docker>=7.1.0
18
18
  Requires-Dist: pydantic>=2.0.0
19
19
  Requires-Dist: hatch-validator>=0.8.0
20
+ Requires-Dist: tomli-w>=1.0.0
20
21
  Provides-Extra: docs
21
22
  Requires-Dist: mkdocs>=1.4.0; extra == "docs"
22
23
  Requires-Dist: mkdocstrings[python]>=0.20.0; extra == "docs"
@@ -26,13 +27,36 @@ Dynamic: license-file
26
27
 
27
28
  # Hatch
28
29
 
29
- ![Hatch Logo](./docs/resources/images/Logo/hatch_wide_dark_bg_transparent.png)
30
+ ![Hatch Logo](https://raw.githubusercontent.com/CrackingShells/Hatch/refs/heads/main/docs/resources/images/Logo/hatch_wide_dark_bg_transparent.png)
30
31
 
31
- Hatch is the package manager for the Cracking Shells ecosystem, designed specifically for managing Model Context Protocol (MCP) servers. It handles complex dependency resolution across system packages, Python packages, Docker containers, and other Hatch packages — all in isolated environments.
32
+ ## Introduction
33
+
34
+ Hatch is the package manager for managing Model Context Protocol (MCP) servers with environment isolation, multi-type dependency resolution, and multi-host deployment. Deploy MCP servers to Claude Desktop, VS Code, Cursor, Kiro, Codex, and other platforms with automatic dependency management.
32
35
 
33
36
  The canonical documentation is at `docs/index.md` and published at <https://hatch.readthedocs.io/en/latest/>.
34
37
 
35
- ## Quick start
38
+ ## Key Features
39
+
40
+ - **Environment Isolation** — Create separate, isolated workspaces for different projects without conflicts
41
+ - **Multi-Type Dependency Resolution** — Automatically resolve and install system packages, Python packages, Docker containers, and Hatch packages
42
+ - **Multi-Host Deployment** — Configure MCP servers on multiple host platforms
43
+ - **Package Validation** — Ensure packages meet schema requirements before distribution
44
+ - **Development-Focused** — Optimized for rapid development and testing of MCP server ecosystems
45
+
46
+ ## Supported MCP Hosts
47
+
48
+ Hatch supports deployment to the following MCP host platforms:
49
+
50
+ - **Claude Desktop** — Anthropic's desktop application for Claude with native MCP support
51
+ - **Claude Code** — Claude integration for VS Code with MCP capabilities
52
+ - **VS Code** — Visual Studio Code with the MCP extension for tool integration
53
+ - **Cursor** — AI-first code editor with built-in MCP server support
54
+ - **Kiro** — Kiro IDE with MCP support
55
+ - **Codex** — OpenAI Codex with MCP server configuration support
56
+ - **LM Studio** — Local LLM inference platform with MCP server integration
57
+ - **Google Gemini CLI** — Command-line interface for Google's Gemini model with MCP support
58
+
59
+ ## Quick Start
36
60
 
37
61
  ### Install from PyPI
38
62
 
@@ -72,41 +96,26 @@ hatch validate ./my_mcp_server
72
96
 
73
97
  ### Deploy MCP servers to your tools
74
98
 
75
- Add a Hatch package and automatically configure it on Claude Desktop and Cursor:
99
+ **Package-First Deployment (Recommended)** — Add a Hatch package and automatically configure it on Claude Desktop and Cursor:
76
100
 
77
101
  ```bash
78
102
  hatch package add ./my_mcp_server --host claude-desktop,cursor
79
103
  ```
80
104
 
81
- Configure an arbitrary MCP server (non-Hatch package) on Claude Desktop:
105
+ **Direct Configuration (Advanced)** — Configure arbitrary MCP servers on your hosts:
82
106
 
83
107
  ```bash
84
- # Local server with command and arguments
85
- hatch mcp configure my-weather-server --host claude-desktop \
86
- --command python --args weather_server.py \
87
- --env-var API_KEY=your_key
88
-
89
- # Remote server with URL
90
- hatch mcp configure api-server --host gemini \
91
- --httpUrl https://api.example.com \
92
- --header Authorization="Bearer token"
108
+ # Remote server example: GitHub MCP Server with authentication
109
+ export GIT_PAT_TOKEN=your_github_personal_access_token
110
+ hatch mcp configure github-mcp --host gemini \
111
+ --httpUrl https://api.github.com/mcp \
112
+ --header Authorization="Bearer $GIT_PAT_TOKEN"
113
+
114
+ # Local server example: Context7 via npx
115
+ hatch mcp configure context7 --host vscode \
116
+ --command npx --args "-y @upstash/context7-mcp"
93
117
  ```
94
118
 
95
- List configured servers and hosts:
96
-
97
- ```bash
98
- hatch mcp list servers
99
- hatch mcp list hosts --detailed
100
- ```
101
-
102
- ## Key features
103
-
104
- - **Environment isolation**: Create separate workspaces for different projects
105
- - **Multi-type dependencies**: Automatically resolve and install system packages, Python packages, Docker containers, and Hatch packages
106
- - **MCP host configuration**: Deploy MCP servers to Claude Desktop, Cursor, VSCode, and other platforms
107
- - **Package validation**: Ensure packages meet schema requirements before distribution
108
- - **Development-focused**: Optimized for rapid development and testing of MCP server ecosystems
109
-
110
119
  ## Documentation
111
120
 
112
121
  - **[Full Documentation](https://hatch.readthedocs.io/en/latest/)** — Complete reference and guides
@@ -128,12 +137,12 @@ We welcome contributions! See the [How to Contribute](./docs/articles/devs/contr
128
137
  3. **Create a feature branch**: `git checkout -b feat/your-feature`
129
138
  4. **Make changes** and add tests
130
139
  5. **Use conventional commits**: `npm run commit` for guided commits
131
- 6. **Run tests**: `python -m pytest tests/`
140
+ 6. **Run tests**: `wobble`
132
141
  7. **Create a pull request**
133
142
 
134
143
  We use [Conventional Commits](https://www.conventionalcommits.org/) for automated versioning. Use `npm run commit` for guided commit messages.
135
144
 
136
- ## Getting help
145
+ ## Getting Help
137
146
 
138
147
  - Search existing [GitHub Issues](https://github.com/CrackingShells/Hatch/issues)
139
148
  - Read [Troubleshooting](./docs/articles/users/Troubleshooting/ReportIssues.md) for common problems
@@ -0,0 +1,105 @@
1
+ hatch/__init__.py,sha256=5JFQZiaZQewEWg8WktQKEdT8IeH0KstndZf27VH7sq4,594
2
+ hatch/cli_hatch.py,sha256=Z7-N0DdWT1xK23EL0Gr5mx2wjqhDFzFROt1nUxPAnZM,112093
3
+ hatch/environment_manager.py,sha256=9R9PJYPKQLmWeGXBrOzXxty20la33LgCCYY8o2aMFBQ,60757
4
+ hatch/package_loader.py,sha256=Sa2JIoio1QlMT2tOGwZhC6pFJIs419cYyoodzyaTDl4,11269
5
+ hatch/python_environment_manager.py,sha256=guU3zz4_WG3ptuX_ATGCRIi_fDxNHlaQtMv3kiRSo8k,28894
6
+ hatch/registry_explorer.py,sha256=XAHUUYNUtUnHeQc4J3HInzzpZBXuYJmCYKIEWzG-dDM,6636
7
+ hatch/registry_retriever.py,sha256=e-6F_QcPVRvZfi9IxTAaWYxdE9qGZu0m8hhII1pVvM0,14524
8
+ hatch/template_generator.py,sha256=SuZyi-_JhnRLKxpSdKppeNh2FbpSLNfyEFu_IypDaVs,5467
9
+ hatch/installers/__init__.py,sha256=THz3NGO9lxFicFooY5HYuxH5u_kIrNhJkzsJnNI5Z3g,1190
10
+ hatch/installers/dependency_installation_orchestrator.py,sha256=-K8PdI8BOcAhkwDmlDoH7U2T5pGIsAySbll25e8QVBo,30221
11
+ hatch/installers/docker_installer.py,sha256=j4IJUczIHGzpCldszUdrmtONpqCtktPoQE9XY8PWUsY,21537
12
+ hatch/installers/hatch_installer.py,sha256=DL9NR_UhhlYy7zqwGBZ9OiGz7eIL8rWREiChzJoLTeQ,8483
13
+ hatch/installers/installation_context.py,sha256=TXM67kJhZZXynAfnorqZBV5-2uDOc2yfyzMqeVV6C8w,3513
14
+ hatch/installers/installer_base.py,sha256=mId6Q_DLOQPZriq3wu3BCU-ckouom3EZgbWJQqo8Of0,8295
15
+ hatch/installers/python_installer.py,sha256=MS9Q8wKjMAy7MEWk7zcAAiFgN0KzOVJFmMzXt1MSH8g,13632
16
+ hatch/installers/registry.py,sha256=ZOEEMJy_kL5LVj5Mf7s1_CIovDnUVag6nB01dEU9Xeg,6831
17
+ hatch/installers/system_installer.py,sha256=bdrmw3I9g2EU2E94-4vtJj01RhmekX9GxylU1RPT3Lk,22869
18
+ hatch/mcp_host_config/__init__.py,sha256=STHzYwcyO6blKSwcMRibcD_4VKHgpEjru-uY1OQM9yA,1781
19
+ hatch/mcp_host_config/backup.py,sha256=X6wnLkPFYv4e5ObrWQSgQ_a_6rcmsFgysQwBZF_osWM,17831
20
+ hatch/mcp_host_config/host_management.py,sha256=sXyGluFQpfXKggxAVvV9riGRis29JnoEM2dTWSIwb24,23905
21
+ hatch/mcp_host_config/models.py,sha256=1Nd3PDyGGbBm4oTgMEQ67j4b_qy23iibv9N4Tm4d9oE,29110
22
+ hatch/mcp_host_config/reporting.py,sha256=Q8UKBJRfvJTbb5PM9xwLEOh3OJjf19AKpWKxs-2622k,6889
23
+ hatch/mcp_host_config/strategies.py,sha256=NdA8hcbAi5xGkFRy51csmdEJESg25L8JkwTDVg2AeMw,30302
24
+ hatch_xclam-0.7.1.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
25
+ tests/__init__.py,sha256=4I3aQWv143Y1QY_nRIBWnY9MIL-aoQOJuVlpoPQz24E,53
26
+ tests/run_environment_tests.py,sha256=bWCr8UsPgU80SM8f_VSi0TCwDI6JNqZpvZ2W9-b2Lqk,7302
27
+ tests/test_cli_version.py,sha256=lU8TBZfzn_8AenFNXYrLMARht91fI5twBN13L-iJebc,4778
28
+ tests/test_data_utils.py,sha256=ROexE3H4Cjk8maR-r6x8s5507d0vWF5xJteO_YN78SU,21876
29
+ tests/test_dependency_orchestrator_consent.py,sha256=lA9Qu-3dFdXKmU8mzOS0tjM8j0yy9qMQXJJcgEoy12g,12652
30
+ tests/test_docker_installer.py,sha256=pcWev4fGf1p-pR5T8tDswGVZqIprC86puLEl6t8yY2w,22305
31
+ tests/test_env_manip.py,sha256=f3LjBX0y0wzTDjc52QDan3Fgcgtld7CvuzH5gYKxGhs,47941
32
+ tests/test_hatch_installer.py,sha256=qHCEcKpbe0fHvkzib2rcUJUw1Z-PCRBBJhbjoyOYiVM,8231
33
+ tests/test_installer_base.py,sha256=0xZiPDMf8LeFJs2SmnYhbIgL7mgvG_HKwL1myQovEZI,11818
34
+ tests/test_mcp_atomic_operations.py,sha256=QmwUDRNZUz6b2i50yRAMBntRDaMMYZt6flHFJfVkzNE,10563
35
+ tests/test_mcp_backup_integration.py,sha256=Auw6Bx1EXGwmCA-mRIy31DRLuRWyV33eB7GJiOvIPXQ,12360
36
+ tests/test_mcp_cli_all_host_specific_args.py,sha256=hvXUetFyoZFtHsEjpzZ0GNdEuvci3Hv8P8thVjBPm-A,18748
37
+ tests/test_mcp_cli_backup_management.py,sha256=GlUUNu5K1w8S2jTQ6YISp5KeXH5c-H9F0lJX2SG0JWM,14019
38
+ tests/test_mcp_cli_direct_management.py,sha256=7GRwHXezmImCUfpHhVjvSkGfT-OBi1tMMLgExMXjals,22184
39
+ tests/test_mcp_cli_discovery_listing.py,sha256=kdrCU6POLyGW9ejowNV-dUVDFVseMd_vibvgIDjZUCM,26595
40
+ tests/test_mcp_cli_host_config_integration.py,sha256=dD6maHP0wHWnFZwxJ5LgSK1GsrYqB4WdicZkotqIANo,32512
41
+ tests/test_mcp_cli_package_management.py,sha256=YFMhyh3dueel1f2R5_VMNr9AewDmVrqGbU1kj5bhdeo,14590
42
+ tests/test_mcp_cli_partial_updates.py,sha256=zbzW_TfmQz7umzMdGkGmRwzstWM0bwCf0OzTscMv86Q,35785
43
+ tests/test_mcp_environment_integration.py,sha256=_VaAaHH-CyA1p0o3mc21x7QuAnLGcPF0JV2Q5ajs2Ss,23098
44
+ tests/test_mcp_host_config_backup.py,sha256=HiavPCfXRv3gCg3BZ7xiAwHREh0Kr7b5pDMGALnU_Zw,10675
45
+ tests/test_mcp_host_configuration_manager.py,sha256=TGbdPY4IRhwZtn6QwZ665Tjfja3PLYgX9N6w2JZy1BY,12248
46
+ tests/test_mcp_host_registry_decorator.py,sha256=RfluDYDan252HWxlRmjRY8j6ZVdNmomLwmW3L5whe8A,14038
47
+ tests/test_mcp_pydantic_architecture_v4.py,sha256=cVMC2EPLn6eG52B4UeOdD1j6gF93o3MOm_J-dDBx0N8,21334
48
+ tests/test_mcp_server_config_models.py,sha256=zxMsVmUTtpt57ffK7Pz2QRQtSdSeiVw8x77GGa_1yHM,9595
49
+ tests/test_mcp_server_config_type_field.py,sha256=jix0Y_5DV5wAxAooZzPZiNXXfLzH7poqwG5TVK64H-g,7748
50
+ tests/test_mcp_sync_functionality.py,sha256=7K16gdJfI74E8ngQn12YtZZvGHzqBUmbGflgjL_hyMA,12960
51
+ tests/test_mcp_user_feedback_reporting.py,sha256=k_pg4vuWSO7V50TqG8NlW4U6xur939nUpANSY7WC3rY,12339
52
+ tests/test_non_tty_integration.py,sha256=TrDOS64tmGSpBHIAfZh3FGCIcrcZmGv0X5zk777up4c,10981
53
+ tests/test_online_package_loader.py,sha256=KAGa1e9B1AZ4f0ZUXI8DAZ99ps3Y4uCC5rwB5CNJj14,9214
54
+ tests/test_python_environment_manager.py,sha256=AHEooqVL_1hDX1yKxN2Md7_rWqskxmLvw2OlnbeLwYs,38972
55
+ tests/test_python_installer.py,sha256=DXBy7hNJk5313_dDXiHTLEH7UJSPUnyGs4IEr7Hn_5E,13009
56
+ tests/test_registry.py,sha256=nFHwRIx9n8y0nHwW9j8X3DZ07Y0BLYZMKduTXo-xXTc,2261
57
+ tests/test_registry_retriever.py,sha256=6mQQuqy2tQdw4j3VOkC_DxWqtKwaCjGPgXsdL-w48Yw,10775
58
+ tests/test_system_installer.py,sha256=bWuyEKakhvi51iM8xHJh62zv83HUTd8QnPlqUUMWx9c,28102
59
+ tests/integration/__init__.py,sha256=2mG53dv1VqjxZYHuglneK9VgDMoWCxpfmPByXXd3zVM,125
60
+ tests/integration/test_mcp_kiro_integration.py,sha256=9y2XPacd3Y6zkqUUcCDjzj8Jv2Humby2LZ5CLSeFYCg,5566
61
+ tests/regression/__init__.py,sha256=0pFnFuEaMf7gPFFXMv-b_vNRNyLV-wU2lYspZHFH_Uo,127
62
+ tests/regression/test_mcp_codex_backup_integration.py,sha256=15G8tCPFtukEcZvE5NBI8BvxlD27KwmE3z8-8ZZ3GxM,7107
63
+ tests/regression/test_mcp_codex_host_strategy.py,sha256=6ehG8IruT9U-fO7kDMoJfogXbpq7JV4XYl-Ho68nt1U,6413
64
+ tests/regression/test_mcp_codex_model_validation.py,sha256=LkGexJrDusxRg_5Bpsm7sXRt7LYwhqqj4Y7VIynslyw,4512
65
+ tests/regression/test_mcp_kiro_backup_integration.py,sha256=oBEnSSLrnHIurkrBtjSG-HT6DyODV2z9tZeZotnsR1k,9584
66
+ tests/regression/test_mcp_kiro_cli_integration.py,sha256=jDQE73yJTRb2e6MPShxLHmLDtN5VBMHMAUBojPEnVBI,5123
67
+ tests/regression/test_mcp_kiro_decorator_registration.py,sha256=_H9FdKdKCv__IYBS0tfnZGUP574KoDjqKInmFiDEKPc,2556
68
+ tests/regression/test_mcp_kiro_host_strategy.py,sha256=t3EbNgUkDC-tF_Ztrjlrx8aDkmML2zZiPnl3iLvKWcg,8235
69
+ tests/regression/test_mcp_kiro_model_validation.py,sha256=bCWzkP6gDxD4tJ6bXnyC6BNGPk3FwX5MQVJt_kK-Hsg,3877
70
+ tests/regression/test_mcp_kiro_omni_conversion.py,sha256=u0g-NFKDpyVxguNHc_RxJXhBvUvABljx-IZqeOjpJZw,3559
71
+ tests/test_data/packages/basic/base_pkg/hatch_mcp_server.py,sha256=nn9XJQz7Owq_AKZ35bUV-l5eThauxTvIQZdQmcZqbQg,350
72
+ tests/test_data/packages/basic/base_pkg/mcp_server.py,sha256=gzXj-n0NbcS1TF-ebKOdXQRyuVIC0Gn_b8ZB-9RckrM,422
73
+ tests/test_data/packages/basic/base_pkg_v2/hatch_mcp_server.py,sha256=VmGpeLPpsNyFyePNtcRQCSscLOHdZgXsGDulA4_9CJA,356
74
+ tests/test_data/packages/basic/base_pkg_v2/mcp_server.py,sha256=73NQIbSaJ9Ou7UTASW-jr1BmGBvPJVQAZdTOESFlmMo,437
75
+ tests/test_data/packages/basic/utility_pkg/hatch_mcp_server.py,sha256=7JkdHdsudXgfcVc8oDOUY2lm2HsZVNYynAMHvF-6o0Q,356
76
+ tests/test_data/packages/basic/utility_pkg/mcp_server.py,sha256=bciy9KS6xfXEClf0MhKEV2ov6cPX0UrSxRjbwZoqGSk,437
77
+ tests/test_data/packages/dependencies/complex_dep_pkg/hatch_mcp_server.py,sha256=4tsMAwqBlLQnVK-o2zCKQJdFdK_Gf-wa-WnzDGkZYTs,364
78
+ tests/test_data/packages/dependencies/complex_dep_pkg/mcp_server.py,sha256=-uPYTLNwxy-ESddSr3WtJGB5jlQXzyv-hPTj-8kKvTw,457
79
+ tests/test_data/packages/dependencies/docker_dep_pkg/hatch_mcp_server.py,sha256=UdAwxCqNdkJfT9eAKsJXRhn08Fr0mV1whMQ04Js8lRw,362
80
+ tests/test_data/packages/dependencies/docker_dep_pkg/mcp_server.py,sha256=NIV5QJdq8VYN9MI5E7-ly9qWyhbYEvwfwXMfkOWmnk8,452
81
+ tests/test_data/packages/dependencies/mixed_dep_pkg/hatch_mcp_server.py,sha256=ME3U787o6-WViUWrWh7TpI9XSnMl1gBD-_4Jgu2WjgA,360
82
+ tests/test_data/packages/dependencies/mixed_dep_pkg/mcp_server.py,sha256=6Pa1bIp_FsEBhWDXQAfCCC35l6LPeDzh79zVmMgvSAc,447
83
+ tests/test_data/packages/dependencies/python_dep_pkg/hatch_mcp_server.py,sha256=2ACrRr-uSt6VhVVjEcQ79yOk7Y9pUzH27TdlYJ1OY3A,362
84
+ tests/test_data/packages/dependencies/python_dep_pkg/mcp_server.py,sha256=s_z_0-w0XiqU45Ujzrn62YoTHWH-x_jKq88dh8hPHgs,452
85
+ tests/test_data/packages/dependencies/simple_dep_pkg/hatch_mcp_server.py,sha256=d-h1olfMIn8OBn8FKMcljerBqTXSNYpBl0NrPsulGEA,362
86
+ tests/test_data/packages/dependencies/simple_dep_pkg/mcp_server.py,sha256=T1rMSjhu91oo0EKdUjd6J6WYWiwAA69t6MgjrUnEkLU,452
87
+ tests/test_data/packages/dependencies/system_dep_pkg/hatch_mcp_server.py,sha256=CzykT89AkO2ROYQPncFdLSaLtOTcMZA-DPqgARJllOA,362
88
+ tests/test_data/packages/dependencies/system_dep_pkg/mcp_server.py,sha256=1B67KE5GwrQiA2wx5fDiNslz-0o1LmLzt5m3Mgihx0E,452
89
+ tests/test_data/packages/error_scenarios/circular_dep_pkg/hatch_mcp_server.py,sha256=1-j-7YRZ0LB5UlTXpg4st2HGmnuY7tvWb25y8sgvZjc,366
90
+ tests/test_data/packages/error_scenarios/circular_dep_pkg/mcp_server.py,sha256=JnQW_659fc7YoNxo-SkAfOt0X34rvtsx37rUKbW7X9E,462
91
+ tests/test_data/packages/error_scenarios/circular_dep_pkg_b/hatch_mcp_server.py,sha256=b4cim_becARqQWBZVVgruBtecdJdL6ggLSSii-mbrXo,370
92
+ tests/test_data/packages/error_scenarios/circular_dep_pkg_b/mcp_server.py,sha256=xfR3F8rhlI4ERaKu7XX3kjawVMaJ1D07ufEKYpx2_ss,472
93
+ tests/test_data/packages/error_scenarios/invalid_dep_pkg/hatch_mcp_server.py,sha256=V5Mj7zQmQzB2O-tVjQ4u8RICCXYHOWV05ThJotPk87E,364
94
+ tests/test_data/packages/error_scenarios/invalid_dep_pkg/mcp_server.py,sha256=6e8_sbaCfe94rN1qrthHUZvBm8LpSc2l_3d0LMefDh8,457
95
+ tests/test_data/packages/error_scenarios/version_conflict_pkg/hatch_mcp_server.py,sha256=5QsMT3FgqPi4RUEIn1JlMKhIip3Mb9Ctm_yAUZo5cWE,374
96
+ tests/test_data/packages/error_scenarios/version_conflict_pkg/mcp_server.py,sha256=3H14Ys_jt8YVH8685d47lVPDudIICzFiwZxUrgXuP38,482
97
+ tests/test_data/packages/schema_versions/schema_v1_1_0_pkg/main.py,sha256=_B5aqXK4ZgCKc2R6907s1UyCgAvelczcbC_ZOzednHc,238
98
+ tests/test_data/packages/schema_versions/schema_v1_2_0_pkg/main.py,sha256=rinhVySJpjXKd2sRCS0ps7xTrVqImWcZ8l4aYbidYR8,238
99
+ tests/test_data/packages/schema_versions/schema_v1_2_1_pkg/hatch_mcp_server.py,sha256=FT14llzHlA4i8I__8GugzBRowhg_CbLmsOwjq0IWFsY,368
100
+ tests/test_data/packages/schema_versions/schema_v1_2_1_pkg/mcp_server.py,sha256=BRPAyyAseE2CGR3W647SwjlluYfi7ejhZck0An5581I,467
101
+ hatch_xclam-0.7.1.dist-info/METADATA,sha256=RfpwtyksekYsi6tz0Jsd36Ssgo789woFnpjyhnam8hA,5942
102
+ hatch_xclam-0.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
103
+ hatch_xclam-0.7.1.dist-info/entry_points.txt,sha256=6xbkwFUtr7nRa56vUFMyJk2wjwFQ_XVaU53ruecWKI0,47
104
+ hatch_xclam-0.7.1.dist-info/top_level.txt,sha256=GZP3Ivciwal8jVITQkQr7dSNlLJRzfNOhA76VN7Jp4Y,12
105
+ hatch_xclam-0.7.1.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ hatch
2
+ tests
@@ -0,0 +1,5 @@
1
+ """
2
+ Integration tests for Hatch MCP functionality.
3
+
4
+ These tests validate component interactions and end-to-end workflows.
5
+ """