feat: add Kiro client manager#328
feat: add Kiro client manager#328fyodoriv wants to merge 1 commit intopathintegral-institute:mainfrom
Conversation
📝 WalkthroughWalkthroughThis pull request introduces support for a new Kiro client manager to the MCPM library. It adds a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review Summary by QodoAdd Kiro IDE client manager for MCP integration
WalkthroughsDescription• Adds Kiro IDE client manager for MCP server configuration • Extends JSONClientManager with Kiro-specific config path handling • Registers KiroManager in client registry for CLI integration • Includes comprehensive test suite covering manager lifecycle Diagramflowchart LR
A["KiroManager<br/>extends JSONClientManager"] -- "config at" --> B["~/.kiro/settings/mcp.json"]
C["ClientRegistry"] -- "registers" --> A
D["mcpm install"] -- "uses" --> A
E["mcpm client edit"] -- "uses" --> A
A -- "manages" --> F["mcpServers config"]
File Changes1. src/mcpm/clients/managers/kiro.py
|
Code Review by Qodo
1. False-negative install detection
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/test_clients/test_kiro.py`:
- Around line 29-34: The test test_default_config_path hardcodes forward slashes
and may fail on Windows; update it to normalize both the manager.config_path and
the expected string before asserting (e.g., use os.path.normpath or pathlib.Path
to build/normalize the expected ".kiro/settings/mcp.json" path) so the assertion
compares platform-normalized paths when calling KiroManager() and checking
manager.config_path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: aa4f3015-59a0-4949-a0c2-cd6fded65a44
📒 Files selected for processing (4)
src/mcpm/clients/client_registry.pysrc/mcpm/clients/managers/__init__.pysrc/mcpm/clients/managers/kiro.pytests/test_clients/test_kiro.py
| def test_default_config_path(): | ||
| """Test that the default config path is ~/.kiro/settings/mcp.json""" | ||
| with patch.dict(os.environ, {"HOME": "/home/user"}, clear=False): | ||
| manager = KiroManager() | ||
| assert manager.config_path.endswith(".kiro/settings/mcp.json") | ||
|
|
There was a problem hiding this comment.
Normalize the default-path assertion for cross-platform test stability.
Line 33 hardcodes / separators, which can fail on Windows even when the path is correct. Normalize both sides before asserting.
✅ Proposed test fix
def test_default_config_path():
"""Test that the default config path is ~/.kiro/settings/mcp.json"""
with patch.dict(os.environ, {"HOME": "/home/user"}, clear=False):
manager = KiroManager()
- assert manager.config_path.endswith(".kiro/settings/mcp.json")
+ assert os.path.normpath(manager.config_path).endswith(
+ os.path.normpath(".kiro/settings/mcp.json")
+ )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/test_clients/test_kiro.py` around lines 29 - 34, The test
test_default_config_path hardcodes forward slashes and may fail on Windows;
update it to normalize both the manager.config_path and the expected string
before asserting (e.g., use os.path.normpath or pathlib.Path to build/normalize
the expected ".kiro/settings/mcp.json" path) so the assertion compares
platform-normalized paths when calling KiroManager() and checking
manager.config_path.
Kiro is a coding agent IDE. Its MCP configuration lives at
~/.kiro/settings/mcp.jsonand uses the standardmcpServerstop-level key — same JSON shape as Cursor, Cline, Claude Code, and Windsurf.This PR adds a
KiroManagerextendingJSONClientManagersomcpm install <name>andmcpm client edit kiro --add-server <name>work end-to-end against Kiro's config file. Net change: ~70 LOC of source + ~80 LOC of tests across 3 files.Why
Kiro is on agentbrew's agent matrix (45+ AI coding agents tracked there) and one of the 9 strict-intersection clients in agentbrew's MCP delegation evaluation. Adding it here closes one of the 3 carve-outs (kiro, amp, opencode) called out in that doc — opencode landed via #327, this PR addresses kiro, and a sibling PR will address amp.
Source-code references
src/mcpm/clients/managers/kiro.py(new file)src/mcpm/clients/managers/__init__.py(re-exportKiroManager)src/mcpm/clients/client_registry.py(register"kiro": KiroManager)tests/test_clients/test_kiro.py(new file, mirrorstests/test_clients/test_qwen_cli.pyshape)Diff
src/mcpm/clients/managers/kiro.py(new)src/mcpm/clients/managers/__init__.py(diff)src/mcpm/clients/client_registry.py(diff)tests/test_clients/test_kiro.py(new)Why it matters
Once this lands, agentbrew (and any other downstream tool that delegates to mcpm) can call
mcpm install <server> --client kiroandmcpm client edit kiro --add-server <server>end-to-end. Today agentbrew keeps a native carve-out for kiro because mcpm doesn't have an adapter — that ~80 LOC carve-out becomes deletable on merge.The harm of not landing this is bounded (kiro can still be configured manually), but the fix is mechanical, the test surface is small, and it parallels the open opencode adapter PR (#327).
Summary by CodeRabbit
New Features
Tests