Authentication —
sign in once, no tokens by hand.
AI Game Developer uses OAuth 2.1 with the device-authorization flow everywhere — the editor window, the desktop app, and the Unity / Unreal / Godot CLIs. You approve a sign-in in your browser; credentials are stored on your machine and the session shows up under Connected devices. Personal Access Tokens stay available for CI and manual clients.
OAuth device flow — the default
Every entry point — the editor window, the app, and each CLI — signs in the same way: it opens your browser, you approve the device, and it stores the full credential set locally. Nothing to copy or paste.
- Start the flow — Authorize in the editor window, Sign in in the app, or
loginin a CLI. - Approve the device code in the browser window that opens (same ai-game.dev account).
- Credentials are stored on your machine; access tokens refresh automatically.
- The session appears on your Connected devices page, where you can revoke it any time.
Three ways it starts
- Editor window — choose Cloud, click Authorize, approve in the browser.
- Game Dev App — click Sign in; the app opens the same browser flow (see the App guide).
- CLI — run
login(e.g.unity-mcp-cli login); it opens the browser and stores credentials.
# Unity / Unreal / Godot — same OAuth device flow
unity-mcp-cli login
unreal-mcp-cli login
godot-cli loginEndpoint: /mcp vs /mcp/p/<pin>
The hosted MCP endpoint is https://ai-game.dev/mcp. There are two ways your AI client can reach a running editor through it:
/mcp— the base endpoint. The server routes to one of your connected editors by fallback (a single connected editor, your most-recently-used one, or a sticky selection). Simple, but ambiguous when several editors are open./mcp/p/<pin>— a pinned URL. The pin is derived from a project’s identity, so requests are routed to that exact project’s editor. This is whatsetup-mcpwrites by default, so the right editor is targeted even with multiple projects open.
setup-mcp writes the pinned URL into your client config automatically (pass --no-pin to fall back to the base /mcp URL). The written config is credential-free — the client authorizes over OAuth on first connect.
# Writes a pinned /mcp/p/<pin> URL for your AI client (e.g. Claude Code)
unity-mcp-cli setup-mcp claude-code
godot-cli setup-mcp claude-code
unreal-mcp-cli setup-mcp claude-code --path ./YourProjectEnroll
When an AI agent hands you an enrollment code, run the CLI’s enroll to bind that agent to your project — it writes the same project pin, so the agent is routed to the right editor. Regular setup-mcp already handles the common case; enroll is the “the agent gave me a code” path.
Personal Access Tokens — for CI and manual clients
Prefer a static token — for CI pipelines, scripts, or a manual MCP client that can’t do an interactive browser login? Mint a Personal Access Token from your API keys page and send it as a bearer token. PATs are the manual alternative to OAuth, not the default path.
{
"mcpServers": {
"ai-game-dev": {
"url": "https://ai-game.dev/mcp",
"headers": { "Authorization": "Bearer YOUR_PERSONAL_ACCESS_TOKEN" }
}
}
}Full request anatomy and per-client snippets live on the MCP endpoint page.