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)
- When you send a message, the plugin writes a
userturn to Claude Code's stdin - Claude Code processes your message and may call MCP tools to inspect or modify assets
- The plugin's built-in HTTP server handles those tool calls by executing C++ code against the engine
- 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 author API key in Claude Code config)
Advantages over Direct API
| Feature | Claude Code Mode | Direct API Mode |
|---|---|---|
| Blueprint inspection | ✓ | ✗ |
| DataTable inspection | ✓ | ✗ |
| Write/modify assets | ✓ | ✗ |
| Prompt caching | ✓ | ✗ |
| Streaming responses | ✓ | ✗ |
| Background sessions | ✓ | ✗ |
| Setup complexity | Requires CLI | API 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— handlesinitialize,tools/list, andtools/callrequests
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.