Skip to main content

Connect your AI client

The bridge runs inside the Unity Editor and speaks MCP over HTTP on 127.0.0.1. Any MCP client on the same machine can use it. Four are supported today: Claude Code, Claude Desktop, GitHub Copilot in VS Code, and opencode.

Two values are needed by every client, and both come from the running Editor:

ValueWhere to find it
PortEdit → Project Settings → Buril → MCP Bridge, or ask the buril_doctor tool. Buril derives a distinct port per project, so two open Editors listen on two ports. The HTTP endpoint is http://127.0.0.1:<port>/rpc.
TokenSame settings page. The bridge refuses unauthenticated connections. The token is stored in your OS keychain (Credential Manager on Windows, Keychain on macOS, libsecret on Linux).

The token travels in the Authorization: Bearer header or in the BURIL_MCP_TOKEN environment variable. Never on a command line: a process command line is readable by every other process running as your user.

:::tip Let the Editor write the config Ask your agent to call generate_client_mcp_config with the client name. The tool reads the live port and token from the running Editor and hands you finished JSON. The snippets below show the shape; the tool fills the values. :::

Claude Code

Two ways.

The plugin (recommended). It brings the MCP server plus slash commands (/buril-status, /buril-build-scene-from, /buril-rag, and more) and four sub-agents.

/plugin marketplace add Buril-ai/claude-code-plugin
/plugin install buril@buril

The plugin's .mcp.json points at the bridge and reads the token from your environment:

{
"mcpServers": {
"buril": {
"type": "http",
"url": "http://127.0.0.1:8766/rpc",
"headers": { "Authorization": "Bearer ${BURIL_MCP_TOKEN}" }
}
}
}

Export BURIL_MCP_TOKEN once (see the platform notes below), and make sure the port matches your project's.

Plain MCP, without the plugin:

claude mcp add --transport http buril http://127.0.0.1:<port>/rpc \
--header "Authorization: Bearer <token>"

Verify with /buril-status (plugin) or by asking Claude to call buril_doctor.

Claude Desktop

Install the connector bundle buril-unity-bridge-1.7.0.mcpb: open it with Claude Desktop (double-click, or Settings → Extensions → Install). The installer asks for the two values, Bridge token and Bridge port, and stores the token as a sensitive setting. The bundle runs a small local relay (node, version 18 or newer) that forwards to your Editor.

GitHub Copilot in VS Code

Add the bridge to .vscode/mcp.json in your project (or to your user MCP settings):

{
"servers": {
"buril": {
"type": "http",
"url": "http://127.0.0.1:<port>/rpc",
"headers": { "Authorization": "Bearer ${env:BURIL_MCP_TOKEN}" }
}
}
}

Copilot agent mode lists the Buril tools once the server connects.

opencode

opencode.json in the project root (next to the Unity project), or ~/.config/opencode/opencode.json for a global entry:

{
"mcp": {
"buril": {
"type": "remote",
"url": "http://127.0.0.1:<port>/rpc",
"headers": { "Authorization": "Bearer {env:BURIL_MCP_TOKEN}" },
"enabled": true
}
}
}

If the file already exists, merge the buril entry into the map that is already there. Overwriting the file removes every other MCP server you had.

Getting the token into your environment

macOS

export BURIL_MCP_TOKEN="$(security find-generic-password \
-s 'com.buril.bridge' -a 'mcp_http_auth_token' -w)"

Windows. The bridge stores the token in Credential Manager under the same service and account (cmdkey /list shows it). Set BURIL_MCP_TOKEN through System Properties → Environment Variables, or copy it from the Buril settings page.

Linux

export BURIL_MCP_TOKEN="$(secret-tool lookup service com.buril.bridge \
account mcp_http_auth_token)"

If your distribution does not ship libsecret, the bridge prints the token to the Unity Console the first time it generates one.

Troubleshooting

SymptomLikely causeFix
Connection refusedThe Editor is closed or the MCP server is stoppedOpen the project; Window → Buril → MCP Server → Start
401 UnauthorizedToken mismatchCopy the token again from Project Settings → Buril → MCP Bridge
Tools appear but calls hangAnother Editor took the portCheck the port with buril_doctor in the Editor you mean to drive
Client sees zero toolsCompilation failed in UnityFix the Console errors; the registry loads after a green compile