Skip to main content

Claude Code Mode

Claude Code mode is the recommended way to use Claude Assistant. It spawns the Claude Code CLI as a subprocess and communicates with it over stdin/stdout using the stream-JSON protocol.

How it works

Unreal Editor
↓ stdin (stream-JSON commands)
Claude Code subprocess
↓ tool calls via HTTP
MCP Server (localhost:7755)
↓ C++ tool execution
Unreal Engine APIs (Blueprint, DataTable, Python…)
↑ JSON results
Claude Code subprocess
↑ stdout (stream-JSON events)
Unreal Editor (chat panel)
  1. When you send a message, the plugin writes a user turn to Claude Code's stdin
  2. Claude Code processes your message and may call MCP tools to inspect or modify assets
  3. The plugin's built-in HTTP server handles those tool calls by executing C++ code against the engine
  4. Claude streams its response back through stdout, displayed live in the chat panel

Requirements

  • Claude Code CLI installed and available in PATH (or path set manually in settings)
  • Authenticated with Anthropic (claude auth or API key in Claude Code config)

Advantages over Direct API

FeatureClaude Code ModeDirect API Mode
Blueprint inspection
DataTable inspection
Write/modify assets
Prompt caching
Streaming responses
Background sessions
Setup complexityRequires CLIAPI key only

subprocess arguments

The plugin launches Claude Code with these flags:

claude --input-format stream-json
--output-format stream-json
--verbose
--print
[--bare] # if Bare Mode is enabled
[--mcp-config <path>] # points to MCP server config
[--dangerously-skip-permissions] # if Auto-approve is enabled
[--append-system-prompt <text>]

MCP server

The MCP server starts automatically when the plugin loads and listens on localhost:7755 (configurable). It implements the MCP 2024-11-05 protocol over HTTP with JSON-RPC 2.0.

Endpoints:

  • POST /mcp — handles initialize, tools/list, and tools/call requests

You can point other MCP-compatible clients at this server to use the same tools.

Restart the subprocess

If Claude Code becomes unresponsive, click the Restart button in the chat panel toolbar. This terminates and relaunches the subprocess without losing your conversation history.