Skip to content

Commit 23c1e9d

Browse files
author
LittleCoinCoin
committed
feat(cli): add Kiro-specific arguments to mcp configure command
Extend handle_mcp_configure() function signature with three Kiro-specific parameters: - disabled: Optional[bool] - Disable the MCP server - auto_approve_tools: Optional[list] - Tool names to auto-approve without prompting - disable_tools: Optional[list] - Tool names to disable Add corresponding CLI arguments to argument parser: - --disabled (action='store_true') - --auto-approve-tools (action='append') - --disable-tools (action='append') Update omni_config_data population to include Kiro fields. Implements 1-to-1 mapping between CLI arguments and JSON fields following established patterns. Conversion reporting automatically handles Kiro fields via HOST_MODEL_REGISTRY.
1 parent ab69e2a commit 23c1e9d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

hatch/cli_hatch.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,9 @@ def handle_mcp_configure(
713713
include_tools: Optional[list] = None,
714714
exclude_tools: Optional[list] = None,
715715
input: Optional[list] = None,
716+
disabled: Optional[bool] = None,
717+
auto_approve_tools: Optional[list] = None,
718+
disable_tools: Optional[list] = None,
716719
no_backup: bool = False,
717720
dry_run: bool = False,
718721
auto_approve: bool = False,
@@ -826,6 +829,14 @@ def handle_mcp_configure(
826829
if inputs_list is not None:
827830
omni_config_data["inputs"] = inputs_list
828831

832+
# Host-specific fields (Kiro)
833+
if disabled is not None:
834+
omni_config_data["disabled"] = disabled
835+
if auto_approve_tools is not None:
836+
omni_config_data["autoApprove"] = auto_approve_tools
837+
if disable_tools is not None:
838+
omni_config_data["disabledTools"] = disable_tools
839+
829840
# Partial update merge logic
830841
if is_update:
831842
# Merge with existing configuration
@@ -1625,6 +1636,23 @@ def main():
16251636
help="Input variable definitions in format: type,id,description[,password=true] (VS Code)",
16261637
)
16271638

1639+
# Host-specific arguments (Kiro)
1640+
mcp_configure_parser.add_argument(
1641+
"--disabled",
1642+
action="store_true",
1643+
help="Disable the MCP server (Kiro)"
1644+
)
1645+
mcp_configure_parser.add_argument(
1646+
"--auto-approve-tools",
1647+
action="append",
1648+
help="Tool names to auto-approve without prompting (Kiro)"
1649+
)
1650+
mcp_configure_parser.add_argument(
1651+
"--disable-tools",
1652+
action="append",
1653+
help="Tool names to disable (Kiro)"
1654+
)
1655+
16281656
mcp_configure_parser.add_argument(
16291657
"--no-backup",
16301658
action="store_true",
@@ -2693,6 +2721,9 @@ def main():
26932721
getattr(args, "include_tools", None),
26942722
getattr(args, "exclude_tools", None),
26952723
getattr(args, "input", None),
2724+
getattr(args, "disabled", None),
2725+
getattr(args, "auto_approve_tools", None),
2726+
getattr(args, "disable_tools", None),
26962727
args.no_backup,
26972728
args.dry_run,
26982729
args.auto_approve,

0 commit comments

Comments
 (0)