Skip to main content
Compatibility

OpenCode

Set up Mouse with OpenCode: generated MCP configuration for the CLI/TUI and desktop IDE

Prerequisites

  • OpenCode CLI/TUI or desktop IDE (latest version recommended)
  • Node.js 22 LTS or later

Installing Mouse

  1. Open the Extensions panel in VS Code (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), run Mouse: Initialize Workspace, and select OpenCode

Mouse creates the project-local .hic directory and automatically generates opencode.json at the project root. That configuration serves both the OpenCode CLI/TUI and desktop IDE.

Configuration

The initializer generates this opencode.json block:

{
  "mcp": {
    "hic_local": {
      "type": "local",
      "command": ["node", "./.hic/mouse.cjs"],
      "environment": {
        "HIC_AGENT_ADAPTER": "opencode",
        "HIC_ALLOWED_DIRECTORIES": "./"
      },
      "enabled": true
    }
  }
}

When opencode.json already contains valid configuration, Mouse merges the generated block, preserves unrelated top-level settings and MCP servers, and replaces an existing hic_local entry. The initializer accepts comments in an existing opencode.json, but its generated output path is always opencode.json, not opencode.jsonc.

Optional: Disabling Built-in Tools

Mouse does not change OpenCode's built-in-tool settings. If you want Mouse used exclusively for file operations, configure OpenCode's built-in editing tools separately according to OpenCode's documentation.

Verifying the Connection

Ask OpenCode:

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

If OpenCode successfully calls the tool and returns file metadata, Mouse is working correctly.