Skip to content

Connect Codex to Unity

Codex connects over Streamable HTTP, which nanora-unity-mcp serves at /mcp on the same port as SSE.

Terminal window
codex mcp add nanora-unity-mcp --url http://127.0.0.1:<PORT>/mcp

Or add it to ~/.codex/config.toml:

[mcp_servers.nanora-unity-mcp]
url = "http://127.0.0.1:<PORT>/mcp"

Start a new Codex session afterwards; the setting is read when a session starts. Window > Unity MCP Server shows the port and has a Copy Codex setup command button that copies the command above with the current port.

Node.js 20 or later is needed only for this check:

Terminal window
node scripts/mcp/verify-codex.mjs

It confirms that the installed Codex client can list and call the tools.

  • The URL must end in /mcp and use the current port.
  • The /mcp endpoint is stateless and answers in JSON; notifications get 202.