I have been messing around with the unreal engine mcp plugin since the pre release build for unreal engine 5.8 trying to get it to work with local models and here are my results as of the full release for unreal engine 5.8.1.
I am by no means an expert. I fumbled my way through figuring this out with the help of ai, but these are the 3 methods I have found that somewhat work.
Firstly, when using the claude terminal for this, it is best to use it via the unreal engine terminal plugin. It is not needed exclusively but it makes things easier.
once you install the unreal engine terminal plugin, go into your editor preferences in unreal engine. Go into the terminal tab, and under startup commands create these:
set TERM=xterm-256color
cd /d “Your project folder location”
set ANTHROPIC_AUTH_TOKEN=ollama (if using ollama for your local model)
set ANTHROPIC_API_KEY=“ollama”
set ANTHROPIC_BASE_URL=http://localhost:11434 (again, if using ollama)
set ANTHROPIC_MODEL= your local model name
set ANTHROPIC_SMALL_FAST_MODEL= your local model name again
CLAUDE_CODE_AUTO_COMPACT_WINDOW=32k (this keeps the session active for slower local models)
and the last start command is just claude
once you open the unreal terminal claude will load and connect to your mcp if you have generated the claude config with the “ModelContextProtocol.GenerateClientConfig claude or all” command. You will need to use a model that speaks with the claude code environment, not all of them work and throw an error when trying to connect. Qwen 2.5 coder and Qwen 3 both work so far but they are extremely slow. (I am also using a older system with a lower parameter model.)
If you want this working outside of unreal it can be a bit messy. Using cline in vs code seems to be the best option. Set up the mcp server via the localhost:11434 as a streamable http, it will detect it and connect, however it will spam the unreal log with improper tool calls, lose connection and then reconnect to the mcp, every 2 seconds. eventually cline will respond to your task if you ask it one, and I have managed to get it to list the actors in my viewport, but this took a lot of trial and error until eventually cline found the right way to call tools.
I personally find the best method is the first one, but with cline it is able to use a wider range of models.
The last solution is routing claude traffic through litellm. This option works straight away, however it requires duplicate instances of your model to run, and as somebody with a mid to lower end system, that made it an impossible method for me.
Hopefully any of this helps anyone trying to figure this out, as there doesn’t seem to be much documentation available for using the unreal mcp with local models right now.