An MCP server for Unreal Engine: setup for Codex, Cursor and other clients
What an Unreal MCP server does, how to connect Codex, Cursor or any MCP client to Kismet’s local endpoint, and how the edit grant keeps an agent inside the folder you choose.
7 min read
What an Unreal MCP server is
The Model Context Protocol is an open standard that lets an AI client call tools on a server. For Unreal, the server is an editor plugin: the client decides which tool to call, and the plugin does the work inside the running editor.
Kismet includes such a server. It exposes the same editor tools its built-in agent uses: reading, writing, wiring and compiling Blueprints, asset search, C++ source and editor log reading, plus the material, widget, component, animation and project tools. A call from an external client goes through the same argument checks and limits as a call from Kismet’s own agent.
- Endpoint: http://127.0.0.1:8323/mcp, Streamable HTTP. If you set KISMETAI_PORT, use that port.
- Authentication: a bearer token stored in the .kismet folder of your home directory.
- Reach: this computer only. Requests from other machines and from web pages are refused.
- Setup: none beyond the plugin. The server starts with the editor.
Get the access token
Open your project in Unreal Editor with Kismet enabled. Kismet creates the token the first time the endpoint receives a request, so call it once (the 401 reply is expected) and read the file:
curl -s -o /dev/null -X POST http://127.0.0.1:8323/mcp
cat ~/.kismet/mcp_tokenThe token belongs to the install, so a client you configure once keeps working after editor restarts. To replace it, delete the file. The next request writes a new one, and every client then needs the new value.
Connect a client
Any client that supports Streamable HTTP and custom headers can connect: point it at the endpoint and send the token as an Authorization: Bearer header. Setting names differ between clients and change between versions, so treat the examples below as a starting point and check your client’s own MCP instructions if one fails.
- 1.
Claude Code
claude mcp add --transport http kismetai http://127.0.0.1:8323/mcp \ --header "Authorization: Bearer $(cat ~/.kismet/mcp_token)" - 2.
Codex
Add the server to ~/.codex/config.toml, then export the token before starting Codex.
[mcp_servers.kismetai] url = "http://127.0.0.1:8323/mcp" bearer_token_env_var = "KISMETAI_MCP_TOKEN" # in your shell export KISMETAI_MCP_TOKEN="$(cat ~/.kismet/mcp_token)" - 3.
Cursor
Add the server to ~/.cursor/mcp.json for all projects, or .cursor/mcp.json for one. Paste the token value in place of the placeholder.
{ "mcpServers": { "kismetai": { "url": "http://127.0.0.1:8323/mcp", "headers": { "Authorization": "Bearer <token>" } } } } - 4.
Check the connection by hand
This lists every tool the server offers.
curl -s http://127.0.0.1:8323/mcp \ -H "Authorization: Bearer $(cat ~/.kismet/mcp_token)" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Do not commit a project config file that contains the token.
The grant model
A token proves who is calling. It does not say what that caller may change. Reading never needs permission, but every call that would change an asset needs a grant, checked immediately before the editor work starts.
A grant names an entry point, a set of operations and a folder. Give it in the editor console:
Unreal Editor console
KismetAI.Authority.Grant mcp edit,create /Game/Sandbox- edit covers work inside an existing asset: graph edits, pin defaults, components, variables, compiling and saving.
- create covers new assets, including material instances and duplicates.
- delete covers an asset leaving its path: deleting, and the source side of a rename or move. It is never implied by edit or create.
- The folder matches whole path segments, so /Game/A covers /Game/A/BP_X but not /Game/AB/BP_X.
Without a matching grant the call returns AUTHORITY_REQUIRED and changes nothing. To see or remove grants, use KismetAI.Authority.List and KismetAI.Authority.Revoke. Grants live in memory and end with the editor process.
These checks are application policy inside the plugin, not an operating-system sandbox. Start with a scratch folder, and keep the project in source control.
Limits to know
- One call at a time. Tools run on the editor’s main thread, and the editor is busy while a call runs.
- No cancelling. A tool call runs to completion once it starts.
- No streaming. Each reply is a single JSON response.
- Changes made over MCP are not shown in the Kismet panel’s diff view.
If you do not need an external client, the same tools are available from Kismet’s own panel inside the editor, with your own model provider. Both ways come with the plugin, and you can switch between them at any time.
In the docs
Try it in your own project.
Kismet is free and open source. Install the plugin, connect a model, and ask for one small change.
Related guides
- How to use Claude Code with Unreal EngineConnect Claude Code to a running Unreal Editor through Kismet’s local MCP server, so it can read, edit and compile Blueprints, materials and widgets as well as your C++.
- A free AI plugin for Unreal Engine: what it costs to runHow a free, open-source Unreal AI plugin differs from subscription and credit plugins, what you pay your model provider, and the three ways to keep that cost low or at zero.
- Run a local LLM in Unreal Engine with Ollama or LM StudioPoint Kismet’s editor agent at a model running on your own machine through Ollama or LM Studio. No API key, and nothing leaves your computer.