Skip to content

Commit b8093b5

Browse files
Merge pull request #43 from CrackingShells/dev
Add Kiro and Codex MCP Host Support
2 parents cbc222d + 0f618ff commit b8093b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2876
-397
lines changed

.augmentignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__reports__/

.github/workflows/prerelease-discord-notification.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
⚠️ **This is a pre-release** - expect potential bugs and breaking changes
2323
🔬 Perfect for testing new features and providing feedback
2424
📋 Click [here](${{ github.event.release.html_url }}) to view what's new and download
25+
26+
💻 Install with pip:
27+
```bash
28+
pip install hatch-xclam=${{ github.event.release.tag_name }}
29+
```
2530
2631
Help us make *Hatch!* better by testing and reporting [issues](https://github.com/CrackingShells/Hatch/issues)! 🐛➡️✨
2732
color: 0xff9500 # Orange color for pre-release

.github/workflows/release-discord-notification.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ jobs:
2121
2222
🚀 Get the latest features and improvements
2323
📚 Click [here](${{ github.event.release.html_url }}) to view the changelog and download
24+
25+
💻 Install with pip:
26+
```bash
27+
pip install hatch-xclam
28+
```
2429
2530
Happy MCP coding with *Hatch!* 🐣
2631
color: 0x00ff88
2732
username: "Cracking Shells Release Bot"
28-
image: "https://raw.githubusercontent.com/CrackingShells/.github/main/resources/images/hatch_icon_dark_bg_transparent.png"
29-
avatar_url: "https://raw.githubusercontent.com/CrackingShells/.github/main/resources/images/cs_core_dark_bg.png"
33+
image: "https://raw.githubusercontent.com/CrackingShells/.github/main/resources/images/hatch_icon_light_bg_transparent.png"
34+
avatar_url: "https://raw.githubusercontent.com/CrackingShells/.github/main/resources/images/cs_icon_light_bg.png"

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ envs/
55
Laghari/
66
__temp__/
77

8+
# IDEs
9+
## Kiro
10+
.kiro/
11+
12+
## VS Code
13+
.vscode/
14+
15+
816
# vvvvvvv Default Python Ignore vvvvvvvv
917
# Byte-compiled / optimized / DLL files
1018
__pycache__/

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
## <small>0.7.1-dev.3 (2025-12-18)</small>
2+
3+
* fix(cli): prevent unwanted defaults ([8a9441b](https://github.com/CrackingShells/Hatch/commit/8a9441b))
4+
5+
## <small>0.7.1-dev.2 (2025-12-15)</small>
6+
7+
* Merge branch 'feat/codex-support' into dev ([b82bf0f](https://github.com/CrackingShells/Hatch/commit/b82bf0f))
8+
* chore: augment code ignore __reports__/ ([bed11cd](https://github.com/CrackingShells/Hatch/commit/bed11cd))
9+
* chore: remove dev debug scripts ([f1880ce](https://github.com/CrackingShells/Hatch/commit/f1880ce))
10+
* chore: remove dev reports ([8c3f455](https://github.com/CrackingShells/Hatch/commit/8c3f455))
11+
* chore: update gitignore ([cd1934a](https://github.com/CrackingShells/Hatch/commit/cd1934a))
12+
* docs(cli): add host labels to configure command help ([842e771](https://github.com/CrackingShells/Hatch/commit/842e771))
13+
* docs(codex): add CLI reference and usage examples ([a68e932](https://github.com/CrackingShells/Hatch/commit/a68e932))
14+
* docs(codex): update to mention support for Codex ([7fa2bdb](https://github.com/CrackingShells/Hatch/commit/7fa2bdb))
15+
* docs(reports): add implementation completion report ([7b67225](https://github.com/CrackingShells/Hatch/commit/7b67225))
16+
* docs(reports): codex CLI enhancement analysis and implementation ([c5327d2](https://github.com/CrackingShells/Hatch/commit/c5327d2))
17+
* docs(reports): dev specs for Codex MCP config support via Hatch! ([330c683](https://github.com/CrackingShells/Hatch/commit/330c683))
18+
* test(codex): add comprehensive CLI argument tests ([0e15301](https://github.com/CrackingShells/Hatch/commit/0e15301))
19+
* test(codex): fix Omni model field name in conversion test ([21efc10](https://github.com/CrackingShells/Hatch/commit/21efc10))
20+
* feat(codex): add CLI arguments for Codex ([88e81fe](https://github.com/CrackingShells/Hatch/commit/88e81fe))
21+
* feat(codex): add MCPServerConfigCodex model and infrastructure ([061ae53](https://github.com/CrackingShells/Hatch/commit/061ae53))
22+
* feat(codex): add tomli-w dependency for TOML support ([00b960f](https://github.com/CrackingShells/Hatch/commit/00b960f))
23+
* feat(codex): implement CodexHostStrategy with TOML support ([4e55b34](https://github.com/CrackingShells/Hatch/commit/4e55b34))
24+
* feat(mcp-models): map shared tool filtering flags to Codex ([b2e6103](https://github.com/CrackingShells/Hatch/commit/b2e6103))
25+
* fix(backup): preserve original filename in backup creation ([c2dde46](https://github.com/CrackingShells/Hatch/commit/c2dde46))
26+
* fix(codex): map http_headers to universal headers field ([7c5e2cb](https://github.com/CrackingShells/Hatch/commit/7c5e2cb))
27+
* tests(codex): add comprehensive Codex host strategy test suite ([2858ba5](https://github.com/CrackingShells/Hatch/commit/2858ba5))
28+
29+
## <small>0.7.1-dev.1 (2025-12-15)</small>
30+
31+
* Merge branch 'feat/kiro-support' into dev ([d9c11ca](https://github.com/CrackingShells/Hatch/commit/d9c11ca))
32+
* docs: add Kiro to supported MCP hosts across all documentation ([1b1dd1a](https://github.com/CrackingShells/Hatch/commit/1b1dd1a))
33+
* docs(dev): enhance MCP host configuration extension guidance ([3bdae9c](https://github.com/CrackingShells/Hatch/commit/3bdae9c))
34+
* fix: config path handling ([63efad7](https://github.com/CrackingShells/Hatch/commit/63efad7))
35+
* test(kiro): add comprehensive backup integration tests ([65b4a29](https://github.com/CrackingShells/Hatch/commit/65b4a29))
36+
* test(kiro): implement comprehensive test suite for Kiro MCP integration ([a55b48a](https://github.com/CrackingShells/Hatch/commit/a55b48a))
37+
* test(kiro): implement test data infrastructure for Kiro MCP integration ([744219f](https://github.com/CrackingShells/Hatch/commit/744219f))
38+
* feat(cli): add Kiro-specific arguments to mcp configure command ([23c1e9d](https://github.com/CrackingShells/Hatch/commit/23c1e9d))
39+
* feat(kiro): add configuration file backup support ([49007dd](https://github.com/CrackingShells/Hatch/commit/49007dd))
40+
* feat(mcp-host-config): add Kiro IDE support to model layer ([f8ede12](https://github.com/CrackingShells/Hatch/commit/f8ede12))
41+
* feat(mcp-host-config): implement KiroHostStrategy for configuration management ([ab69e2a](https://github.com/CrackingShells/Hatch/commit/ab69e2a))
42+
143
## 0.7.0 (2025-12-11)
244

345
* Merge pull request #42 from CrackingShells/dev ([be3a9a3](https://github.com/CrackingShells/Hatch/commit/be3a9a3)), closes [#42](https://github.com/CrackingShells/Hatch/issues/42)

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
## Introduction
66

7-
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, and other platforms with automatic dependency management.
7+
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.
88

99
The canonical documentation is at `docs/index.md` and published at <https://hatch.readthedocs.io/en/latest/>.
1010

1111
## Key Features
1212

1313
- **Environment Isolation** — Create separate, isolated workspaces for different projects without conflicts
1414
- **Multi-Type Dependency Resolution** — Automatically resolve and install system packages, Python packages, Docker containers, and Hatch packages
15-
- **Multi-Host Deployment**Deploy MCP servers to Claude Desktop, Claude Code, VS Code, Cursor, LM Studio, and Google Gemini CLI
15+
- **Multi-Host Deployment**Configure MCP servers on multiple host platforms
1616
- **Package Validation** — Ensure packages meet schema requirements before distribution
1717
- **Development-Focused** — Optimized for rapid development and testing of MCP server ecosystems
1818

@@ -24,6 +24,8 @@ Hatch supports deployment to the following MCP host platforms:
2424
- **Claude Code** — Claude integration for VS Code with MCP capabilities
2525
- **VS Code** — Visual Studio Code with the MCP extension for tool integration
2626
- **Cursor** — AI-first code editor with built-in MCP server support
27+
- **Kiro** — Kiro IDE with MCP support
28+
- **Codex** — OpenAI Codex with MCP server configuration support
2729
- **LM Studio** — Local LLM inference platform with MCP server integration
2830
- **Google Gemini CLI** — Command-line interface for Google's Gemini model with MCP support
2931

docs/articles/devs/architecture/mcp_host_configuration.md

Lines changed: 60 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ This article is about:
99

1010
## Overview
1111

12-
The MCP host configuration system provides centralized management of Model Context Protocol server configurations across multiple host platforms (Claude Desktop, VS Code, Cursor, etc.). It uses a decorator-based architecture with inheritance patterns for clean code organization and easy extension.
12+
The MCP host configuration system provides centralized management of Model Context Protocol server configurations across multiple host platforms (Claude Desktop, VS Code, Cursor, Kiro, etc.). It uses a decorator-based architecture with inheritance patterns for clean code organization and easy extension.
13+
14+
> **Adding a new host?** See the [Implementation Guide](../implementation_guides/mcp_host_configuration_extension.md) for step-by-step instructions.
1315
1416
## Core Architecture
1517

@@ -45,8 +47,9 @@ Host strategies are organized into families for code reuse:
4547
- **Implementations**: Cursor, LM Studio
4648

4749
#### Independent Strategies
48-
- **VSCode**: Nested configuration structure (`mcp.servers`)
50+
- **VSCode**: User-wide configuration (`~/.config/Code/User/mcp.json`), uses `servers` key
4951
- **Gemini**: Official configuration path (`~/.gemini/settings.json`)
52+
- **Kiro**: User-level configuration (`~/.kiro/settings/mcp.json`), full backup manager integration
5053

5154
### Consolidated Data Model
5255

@@ -111,15 +114,51 @@ class MCPHostStrategy(ABC):
111114

112115
## Integration Points
113116

114-
### Backup System Integration
117+
Every host strategy must integrate with these systems. Missing any integration point will result in incomplete functionality.
118+
119+
### Backup System Integration (Required)
115120

116-
All configuration operations integrate with the backup system:
121+
All configuration write operations **must** integrate with the backup system via `MCPHostConfigBackupManager` and `AtomicFileOperations`:
117122

123+
```python
124+
from .backup import MCPHostConfigBackupManager, AtomicFileOperations
125+
126+
def write_configuration(self, config: HostConfiguration, no_backup: bool = False) -> bool:
127+
# ... prepare data ...
128+
backup_manager = MCPHostConfigBackupManager()
129+
atomic_ops = AtomicFileOperations()
130+
atomic_ops.atomic_write_with_backup(
131+
file_path=config_path,
132+
data=existing_data,
133+
backup_manager=backup_manager,
134+
hostname="your-host", # Must match MCPHostType value
135+
skip_backup=no_backup
136+
)
137+
```
138+
139+
**Key requirements:**
118140
- **Atomic operations**: Configuration changes are backed up before modification
119-
- **Rollback capability**: Failed operations can be reverted
120-
- **Multi-host support**: Separate backups per host platform
141+
- **Rollback capability**: Failed operations can be reverted automatically
142+
- **Hostname identification**: Each host uses its `MCPHostType` value for backup tracking
121143
- **Timestamped retention**: Backup files include timestamps for tracking
122144

145+
### Model Registry Integration (Required for host-specific fields)
146+
147+
If your host has unique configuration fields (like Kiro's `disabled`, `autoApprove`, `disabledTools`):
148+
149+
1. Create host-specific model class in `models.py`
150+
2. Register in `HOST_MODEL_REGISTRY`
151+
3. Extend `MCPServerConfigOmni` with new fields
152+
4. Implement `from_omni()` conversion method
153+
154+
### CLI Integration (Required for host-specific arguments)
155+
156+
If your host has unique CLI arguments:
157+
158+
1. Extend `handle_mcp_configure()` function signature in `cli_hatch.py`
159+
2. Add argument parser entries for new flags
160+
3. Update omni model population logic
161+
123162
### Environment Manager Integration
124163

125164
The system integrates with environment management through corrected data structures:
@@ -132,27 +171,31 @@ The system integrates with environment management through corrected data structu
132171

133172
### Adding New Host Platforms
134173

135-
To add support for a new host platform:
174+
To add support for a new host platform, complete these integration points:
136175

137-
1. **Define host type** in `MCPHostType` enum
138-
2. **Create strategy class** inheriting from appropriate family base or `MCPHostStrategy`
139-
3. **Implement required methods** for configuration path, validation, read/write operations
140-
4. **Add decorator registration** with `@register_host_strategy(MCPHostType.NEW_HOST)`
141-
5. **Add tests** following existing test patterns
176+
| Integration Point | Required? | Files to Modify |
177+
|-------------------|-----------|-----------------|
178+
| Host type enum | Always | `models.py` |
179+
| Strategy class | Always | `strategies.py` |
180+
| Backup integration | Always | `strategies.py` (in `write_configuration`) |
181+
| Host-specific model | If unique fields | `models.py`, `HOST_MODEL_REGISTRY` |
182+
| CLI arguments | If unique fields | `cli_hatch.py` |
183+
| Test infrastructure | Always | `tests/` |
142184

143-
Example:
185+
**Minimal implementation** (standard host, no unique fields):
144186

145187
```python
146188
@register_host_strategy(MCPHostType.NEW_HOST)
147-
class NewHostStrategy(MCPHostStrategy):
189+
class NewHostStrategy(ClaudeHostStrategy): # Inherit backup integration
148190
def get_config_path(self) -> Optional[Path]:
149191
return Path.home() / ".new_host" / "config.json"
150192

151-
def validate_server_config(self, server_config: MCPServerConfig) -> bool:
152-
# Host-specific validation logic
153-
return True
193+
def is_host_available(self) -> bool:
194+
return self.get_config_path().parent.exists()
154195
```
155196

197+
**Full implementation** (host with unique fields): See [Implementation Guide](../implementation_guides/mcp_host_configuration_extension.md).
198+
156199
### Extending Validation Rules
157200

158201
Host strategies can implement custom validation:

0 commit comments

Comments
 (0)