Skip to main content
Compatibility

Kiro

Set up Mouse with Kiro: configuration, steering instructions, and tips for long conversations

Prerequisites

  • Kiro (latest version recommended)
  • Node.js 20.x or later

Installing Mouse

  1. Open the Extensions panel in Kiro (Ctrl+Shift+X / Cmd+Shift+X)
  2. Search for Mouse by HIC AI, Inc.
  3. Click Install
  4. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run Mouse: Initialize Workspace

This creates a .hic directory in your project and generates the MCP configuration file at .kiro/settings/mcp.json.

Configuration

The workspace initialization creates the following configuration automatically. If you need to configure it manually, create .kiro/settings/mcp.json with:

{
  "mcpServers": {
    "hic_local": {
      "type": "stdio",
      "command": "node",
      "args": ["./.hic/mouse.cjs"],
      "env": {
        "HIC_AGENT_ADAPTER": "kiro",
        "HIC_ALLOWED_DIRECTORIES": "./"
      }
    }
  }
}

How to Auto-Enable Mouse Tool Calls

HIC Mouse has been built with comprehensive safety guardrails, including staged batching with atomic rollback. Once you are comfortable with how Kiro is interacting with Mouse tools, we suggest enabling all Mouse tools without requiring prior approval for each call, by updating your .kiro/settings/mcp.json file as follows:

{
  "mcpServers": {
    "hic_local": {
      "command": "node",
      "args": [
        "./.hic/mouse.cjs"
      ],
      "env": {
        "HIC_AGENT_ADAPTER": "kiro",
        "HIC_ALLOWED_DIRECTORIES": "./"
      },
      "autoApprove": [
        "*"
      ]
    }
  }
}

Or, if you only prefer to auto-approve certain tools, list each tool in the array, separated by commas and enclosed in double-quotes, with the prefix mcp_hic_local_, like this:

{
  "mcpServers": {
    "hic_local": {
      "command": "node",
      "args": [
        "./.hic/mouse.cjs"
      ],
      "env": {
        "HIC_AGENT_ADAPTER": "kiro",
        "HIC_ALLOWED_DIRECTORIES": "./"
      },
      "autoApprove": [
        "mcp_hic_local_read_lines",
        "mcp_hic_local_read_first_n_lines",
        "mcp_hic_local_read_last_n_lines",
        "mcp_hic_local_jump_to_line_n",
        "mcp_hic_local_find_in_file",
        "mcp_hic_local_get_file_metadata",
        "mcp_hic_local_quick_edit",
        "mcp_hic_local_batch_quick_edit",
        "mcp_hic_local_save_changes",
        "mcp_hic_local_cancel_changes"
      ]
    }
  }
}

Steering Instructions and Hooks

The Kiro IDE does not provide a direct toggle to disable built-in editing tools, so we recommend using the following combination of Steering instructions and Hooks for the best experience.

Add the following to your steering instructions at .kiro/steering/:

Always use Mouse (hic_local MCP) tools for all file navigation and editing operations. Do not use built-in file-editing tools.

Blocking Built-in Editing Tools

Kiro supports preToolUse hooks that intercept tool calls before execution. Create the following two files to block Kiro's built-in file-editing tools (strReplace, fsAppend, and semanticRename), ensuring Mouse is used for all edits.

.kiro/hooks/block-builtin-editors.kiro.hook

{
  "enabled": true,
  "name": "Block Built-in Editing Tools",
  "description": "Blocks fsAppend, strReplace, and semanticRename. Mouse (hic_local) tools must be used for all file editing operations.",
  "version": "1",
  "when": {
    "type": "preToolUse",
    "toolTypes": [
      "strReplace",
      "fsAppend",
      "semanticRename"
    ]
  },
  "then": {
    "type": "runCommand",
    "command": "bash .kiro/hooks/block-builtin-editors.sh"
  },
  "workspaceFolderName": "your-workspace-name",
  "shortName": "block-builtin-editors"
}

.kiro/hooks/block-builtin-editors.sh

#!/bin/bash
exit 1

When Kiro attempts to use a blocked tool, the hook fires, the script exits with a non-zero code, and Kiro receives a system instruction that the tool call was rejected and must not be retried.

NOTE

The Steering and Hook files are complementary. The preToolUse hook acts as a hard guardrail, blocking Kiro from invoking unapproved file-editing tools while enabling the user to see that Kiro did try to do so and was blocked. The Steering instructions reinforce Kiro's built-in system directions not to retry tool calls that were rejected, by reminding the agent to use only Mouse tools for editing.

Verifying the Connection

Ask your AI assistant:

"Use Mouse's get_file_metadata tool to check the metadata of any file in this workspace."

If the assistant successfully calls the tool and returns file metadata, Mouse is working correctly. Check the status bar; it should show Mouse: Trial or Mouse: Licensed.