Skip to main content

Connect Your MCP Client

Use the client that fits your workflow. This package configures MCP connections; it does not supply model access, subscriptions, provider accounts, or a hosted server. Vendor pricing and client capabilities change independently of the fork.

Use the Editor configurator​

Open Window > Unity MCP (ykh09242) > Toggle MCP Window. For local HTTP, click Start Server first so the client configuration can use its current token. For stdio, select Stdio and click Start Session under Editor connection, or use Switch to stdio and connect when it appears. Under AI client setup, select your client and click Configure. Review the result, then reconnect.

The Client Configurators guide documents the package's supported config formats and special cases:

  • The package configures Claude Desktop through stdio regardless of the globally selected transport. This describes the configurator, not every transport the vendor may support.
  • VS Code uses servers rather than mcpServers.
  • Codex uses TOML. Since 1.2.1, the package uses http_headers_helper for verified local HTTP clients and http_headers for remote credentials.
  • OpenClaw requires its MCP bridge plugin; Pi requires an MCP extension. A config write cannot install or enable those integrations.
  • Some clients need an MCP toggle or restart. Successful configuration is not proof of a live connection.

Manual client configuration​

These are connection shapes, not universal file paths. Use your client's format, preserve unrelated settings, and never commit token-bearing configuration.

Local HTTP​

Start the server. Replace the token placeholder privately with the contents of ~/.unity-mcp/auth/token-8080 for that launch and port:

{
"mcpServers": {
"unityMCP": {
"url": "http://localhost:8080/mcp",
"headers": { "X-Unity-MCP-Token": "<current launch token>" }
}
}
}

For VS Code:

{
"servers": {
"unityMCP": {
"type": "http",
"url": "http://localhost:8080/mcp",
"headers": { "X-Unity-MCP-Token": "<current launch token>" }
}
}
}

Clients using static headers need reconfiguration and reconnection after each server restart; an old token produces 401 errors. The Codex and Claude Code helpers below read the current token instead. These integrations require Unity package 1.2.1 or newer; older packages generate static local headers. See Local Authentication.

Codex HTTP​

Select Codex and click Configure. The configurator checks the installed CLI using an isolated, synthetic configuration, without opening a connection or executing a header helper. When support is confirmed, the TOML entry uses a generated http_headers_helper command. The command reads the local server's token file at connection time; no launch token is copied into TOML.

[mcp_servers.unityMCP]
url = "http://127.0.0.1:8080/mcp"
http_headers_helper = "<platform-specific command generated by Configure>"

Use the generated command, not this placeholder. It uses Windows PowerShell or /bin/sh and an absolute token-file path. The token is still rotated on every server launch. Current Codex refreshes the helper on qualifying authentication failures; reconnect if the client does not recover after a server restart. See the official MCP configuration guide.

If the capability probe fails or the CLI is unavailable, the configurator preserves the existing entry and recommends updating Codex or selecting stdio. It does not guess compatibility from a version number. New snippets do not add rmcp_client; existing [features] settings, including legacy true/false values, are preserved.

When switching from stdio, select HTTP and click Configure, even if Codex was already configured. Managed stdio fields are replaced by the URL and helper; switching back removes only the recognized generated helper. Unrelated settings and other MCP servers are preserved. Custom authentication commands and conflicting transport options require manual migration. Existing static local-token entries are flagged for migration, not silently reported healthy.

Restart or reconnect Codex after saving. Configured validates configuration, not a live MCP handshake. The installed Codex CLI and the Codex client you actually run must support the same helper setting. Remote HTTP still uses static http_headers; local token lookup must not be sent to a remote host.

Claude Code HTTP​

Since 1.2.1, the package uses Claude Code's headersHelper via claude mcp add-json --scope local. The configurator verifies the selected CLI version before changing registrations. Its automatic-configuration baseline is 2.1.193, whose official changelog introduces helper refresh and reconnect on tool-call authentication failures. This is a conservative refresh baseline, not the first version to support the field.

For an older, unrecognized or unavailable CLI, choose stdio or update Claude Code. On Windows, use its executable or npm .cmd shim rather than a PowerShell .ps1 shim. Existing custom helpers and OAuth settings require manual review and are not overwritten by this migration.

The generated helper reads the current token file on connection and reconnect. Approve local/project trust when Claude Code requests it; the configurator does not bypass that permission. After a server restart, use Reconnect in /mcp if automatic recovery does not succeed. You do not need to paste a new token. See Claude Code's dynamic-header documentation.

Status detection honors CLAUDE_CONFIG_DIR and resolves local registrations in .claude.json, project .mcp.json, then user registrations. An old .claude/mcp.json is only a migration fallback. Configuration status does not check organization policies, disabled-server choices, project trust, or live connectivity; review those in Claude Code.

Other supported clients​

This table describes what this package generates, not every capability of each vendor's latest client:

Configurator groupLocal authentication in this checkout
Codex, Claude CodeVerified dynamic helper, otherwise stdio guidance
Claude Desktop, Cherry StudioStdio; no local HTTP launch-token header
Cursor, VS Code, VS Code Insiders, Copilot CLI, Windsurf, Kiro, Trae, Trae CNStatic HTTP headers or stdio
Antigravity 2.0, Antigravity IDE, Cline, Kilo Code, Gemini CLI, Qwen Code, Kimi Code, CodeBuddy CLI, Rider, PiStatic HTTP headers or stdio
OpenCode, OpenClaw MCP bridgeClient-specific JSON with static HTTP headers or stdio

Static-header clients still need Configure and reconnect after server token rotation. Their configurators now check managed header values as well as the endpoint. No unverified dynamic-authentication field is added to them. For generated helpers, UNITY_MCP_LOCAL_AUTH_TOKEN_FILE can select the file at configuration time; changing that path or the server port requires reconfiguration. A literal UNITY_MCP_LOCAL_AUTH_TOKEN override is not embedded in a helper.

Stdio​

This beta checkout uses the following immutable server source. Unity and Python package version numbers are independent. Published stable releases keep their own source pins; use the installed package's mcpServerSource:

{
"mcpServers": {
"unityMCP": {
"command": "uvx",
"args": [
"--python",
">=3.11",
"--from",
"https://github.com/ykh09242/unity-mcp/archive/737602878ce5b5b20bb1c60cb4b4ad81eeef2bba.zip#subdirectory=Server",
"mcp-for-unity",
"--transport",
"stdio"
]
}
}
}

If uvx is not on the client's PATH, use its verified absolute path. For another package revision, use that installed package's mcpServerSource; do not retain this example's pin accidentally. Stdio does not use the local HTTP token header.

After updating the Editor package, restart the client's MCP connection to load its selected server. Use Configure when intentionally changing the generated source; preserve deliberate manual pins. The internal loopback bridge authenticates with automatically supplied per-launch credentials. Select the server source from the installed package rather than inferring compatibility from its version label.

Confirm the connection and target​

List the client's tools/resources, then read mcpforunity://instances. Include a returned Editor ID on calls as described in Multi-Instance Routing. A config file, tool list, or health response alone does not establish an Editor connection.

For a shared remote service, use Remote Server Auth, not the local-token example. Asset-generation provider credentials are separate from MCP authentication.

Manual-only clients in setup​

The setup wizard lists installed clients that require manual setup with an unchecked, disabled selection and their installation instructions. These clients are excluded from Configure selected and automatic retry. Follow the displayed manual steps, then use Skip to finish the wizard when no automatic clients are selected. An installation detected by the wizard does not imply automatic configuration support.