Enable AI agents to see, manipulate, and verify Unity projects autonomously.
VibeLink is a hybrid Unity Package + MCP Server that gives CLI-based AI agents (Claude Code, Cursor, etc.) direct access to Unity's Editor through the Model Context Protocol.
Status: โ Working! See CURRENT_STATUS.md for latest test results and known issues.
Quick Test: After Unity restart, run
./test-after-restart.shto verify all features work.
- Capture Game View or Scene View screenshots
- See what the agent creates in real-time
- Visual feedback loop for iterative development
- Execute C# code directly in Unity Editor
- No need to create files for quick operations
- Instant iteration and testing
- Query GameObject state using CSS-like selectors
- Get actual runtime values, not just code
- Verify scene configuration programmatically
- Enter Play Mode for specified duration
- Capture all logs and errors automatically
- Automated regression testing
- Unity 2021.3 or later (.NET Standard 2.1 support)
- Node.js 18+ (for MCP server)
- AI agent that supports MCP (Claude Code, Cursor, etc.)
Copy the unity-package folder into your Unity project's Packages directory:
cd YourUnityProject/Packages
git clone https://github.com/vibelink/unity-vibe-link.git com.vibelink.unityOr add via Package Manager:
- Open Unity
- Window โ Package Manager
-
- โ Add package from disk
- Select
unity-package/package.json
cd mcp-server
npm install
npm run buildAdd to your MCP config (e.g., ~/.config/opencode/mcp.json or Claude Desktop config):
{
"mcpServers": {
"vibelink-unity": {
"command": "node",
"args": ["/path/to/unity-vibe-link/mcp-server/build/index.js"]
}
}
}- Open your Unity project
- Go to
Tools โ VibeLink โ Start Host - The VibeLink window will show "Connected: Yes" when your agent connects
User: "The button looks off-center"
Agent:
1. unity_capture_view(viewType: "game")
2. [Analyzes screenshot]
3. unity_query_state(selector: "Button")
4. unity_execute_script(code: "GameObject.Find('Button').GetComponent<RectTransform>().anchoredPosition = Vector2.zero;")
5. unity_capture_view(viewType: "game")
6. [Verifies fix]
User: "Create 50 cubes in a spiral pattern"
Agent:
unity_execute_script({
code: `
for (int i = 0; i < 50; i++) {
float angle = i * 0.5f;
float radius = i * 0.2f;
Vector3 pos = new Vector3(
Mathf.Cos(angle) * radius,
i * 0.1f,
Mathf.Sin(angle) * radius
);
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
cube.transform.position = pos;
}
`
})User: "Does the game crash when I start?"
Agent:
unity_run_playmode({ duration: 5.0 })
// Returns all logs/errors from 5-second playtest| Tool | Description | Use Case |
|---|---|---|
unity_capture_view |
Screenshot Game/Scene view | Visual verification |
unity_execute_script |
Run C# code in Editor | Quick iterations |
unity_query_state |
Query GameObject state | State inspection |
unity_run_playmode |
Run game with logging | Automated testing |
unity_ping |
Check connection | Health check |
- All agent-created assets go to
Assets/_AgentScratchpad/ - Prevents corruption of core project files
- Script execution timeout
- Infinite loop protection
- Resource usage monitoring
โโโโโโโโโโโโโโโโโโโ Named Pipe โโโโโโโโโโโโโโโโโโโโ
โ Unity Editor โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโ MCP Server โ
โ (C# Package) โ <5ms latency โ (Node.js) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โฒ โฒ
โ โ
โ EditorWindow MCP Protocol
โ Direct API Access (JSON-RPC)
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ Unity Scene โ โ AI Agent โ
โ GameObjects โ โ (Claude/Cursor) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
- Core transport layer (Named Pipes)
- Visual capture (Game/Scene views)
- Script execution framework
- State querying with selectors
- Play Mode automation
- MCP server implementation
- Dynamic C# compilation (Roslyn)
- Advanced selector syntax
- Watchdog protection
- Performance profiling tools
- Asset modification tracking
This is an open-source project! Contributions welcome.
- Clone repository
- Open Unity package in Unity 2021.3+
- Run
npm installinmcp-server/ - Make changes and test with your AI agent
MIT License - See LICENSE file for details
VibeLink is in alpha. Use in production projects at your own risk. Always backup your project before enabling agent automation.
Built for the future of AI-assisted game development ๐ฎ๐ค