Skip to main content
Compatibility

Codex

Set up Mouse with Codex: generated MCP configuration for the CLI and desktop IDE

Prerequisites

  • Codex CLI 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 Codex

Mouse creates the project-local .hic directory and automatically generates .codex/config.toml.

Configuration

The initializer generates this complete Mouse configuration:

[mcp_servers.hic_local]
command = "node"
args = ["./.hic/mouse.cjs"]

[mcp_servers.hic_local.env]
HIC_AGENT_ADAPTER = "codex"
HIC_ALLOWED_DIRECTORIES = "./"

When .codex/config.toml already contains valid configuration, Mouse merges the generated tables, preserves unrelated top-level settings and MCP servers, and replaces an existing hic_local entry.

Optional: Restricting Built-in Tools

Mouse does not generate hooks or built-in-tool restrictions. Codex does not currently expose a supported configuration option to remove the built-in apply_patch tool entirely. For best results, instruct Codex to use only Mouse tools for file edits. Advanced users may separately install a Codex PreToolUse hook that denies apply_patch, but this is a guardrail rather than a complete enforcement boundary.

Optional: Auto-Approving Mouse Tools

Mouse does not generate an approval setting. To auto-approve all Mouse tools, you may add this line to the [mcp_servers.hic_local] table in .codex/config.toml:

default_tools_approval_mode = "approve"

Verifying the Connection

Ask Codex:

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

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