Skip to main content

Install or Repair Claude Code CLI

You need the Claude Code CLI (claude) available on your system.

Switching transport requires a restart

If you change from http to stdio (or vice versa) in the MCP for Unity window, restart Claude Code for it to pick up the change.

macOS / Linux / WSL:

curl -fsSL https://claude.ai/install.sh | bash
claude doctor

Windows PowerShell:

irm https://claude.ai/install.ps1 | iex
claude doctor

Alternative: npm via NVM (installs under ~/.nvm)

# Install / select a Node version
nvm install v21.7.1
nvm use v21.7.1

# Install Claude Code CLI into this Node's global prefix
npm install -g @anthropic-ai/claude-code

# Verify it's under NVM
which claude
claude --version

Alternative: npm with system / Homebrew Node

# If you don't have Node yet (macOS):
brew install node

# Install Claude Code CLI globally
npm install -g @anthropic-ai/claude-code

# Verify it's on PATH (typical: /opt/homebrew/bin/claude or /usr/local/bin/claude)
which claude
claude --version

macOS PATH gotcha

On macOS, Unity launched from Finder / Hub may not inherit your shell PATH. If claude isn't found:

  • Either launch Hub from Terminal (so PATH propagates),
  • or use the MCP for Unity window's "Choose Claude Install Location" to set the absolute path.