-
Notifications
You must be signed in to change notification settings - Fork 12
Guides Mcp Local Setup
This page covers machine-local MCP configuration for a Linux devcontainer with a Windows host relay.
These files contain machine-specific host and port values and are gitignored:
.vscode/mcp.json.mcp.json.cursor/mcp.json.codex/config.toml
Do not commit these files.
Create .env.local in repo root:
export UNITY_MCP_BRIDGE_HOST=YOUR_WINDOWS_HOST_IP
export UNITY_MCP_BRIDGE_PORT=9003
export UNITY_MCP_BRIDGE_PATH=/mcpOptional defaults used by scripts:
UNITY_MCP_DEFAULT_HOSTUNITY_MCP_DEFAULT_PORTUNITY_MCP_DEFAULT_PATH
Run from the devcontainer:
bash scripts/mcp/configure-unity-mcp-endpoint.shThis updates local MCP config files for VS Code, Claude Code, Cursor, and Codex.
See the official Unity Docs for more details.
$env:UNITY_MCP_RELAY_COMMAND = '<relay command from Unity MCP docs>'
pwsh -File scripts/mcp/start-unity-mcp-bridge.ps1 -Port 9003bash scripts/mcp/probe-unity-mcp-endpoint.sh YOUR_WINDOWS_HOST_IP 9003-
9003is the default fallback port in MCP helper scripts. - If your host uses a different port, set it in
.env.localor pass it as a script argument. - See the MCP helper scripts for script-level details.
Generating the config files does not retroactively connect an agent that was
already running. After step 2, reload the agent so it picks up the new
server — restart the editor/CLI, or in Claude Code re-approve the project MCP
server — then the Unity_* tools attach. The MCP server can be running and
reachable (step 4 returns HTTP 200) while a stale agent session still shows no
Unity tools; reloading is what binds them.
📦 Unity Helpers | 📖 Documentation | 🐛 Issues | 📜 MIT License
- Inspector Button
- Inspector Conditional Display
- Inspector Grouping Attributes
- Inspector Inline Editor
- Inspector Overview
- Inspector Selection Attributes
- Inspector Settings
- Inspector Validation Attributes
- Utility Components
- Visual Components
- Data Structures
- Helper Utilities
- Math And Extensions
- Pooling Guide
- Random Generators
- Reflection Helpers
- Singletons