Unity MCP Template
Simple template project for controlling Unity via MCP
Overview
Unity MCP Template is a simple example project that demonstrates how to control Unity applications using a TypeScript-based MCP (Message Control Protocol) server.
To use the Unity MCP Template, clone the repository from GitHub, set up the TypeScript MCP server, and connect it to your Unity project to start building and configuring your own tools.
- Demonstrates interaction between TypeScript and Unity - Provides a template for building custom tools - Easy to configure and expand for further development
- Developing custom Unity tools that communicate with a TypeScript server.
- Learning how to implement MCP in Unity projects.
- Creating interactive applications that require server-client communication.
Add to your AI client
Use these steps to connect Unity MCP Template in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"unity-mcp-template-dunward": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-template-dunward"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"unity-mcp-template-dunward": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-template-dunward"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"unity-mcp-template-dunward": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-template-dunward"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"unity-mcp-template-dunward": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-template-dunward"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"unity-mcp-template-dunward": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-template-dunward"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"unity-mcp-template-dunward": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-unity-mcp-template-dunward"
]
}
}
}FAQ
What is MCP?
MCP stands for Message Control Protocol, which is used for communication between different applications.
Is this project suitable for beginners?
Yes! This template is designed to help beginners understand the basics of integrating TypeScript with Unity.
Where can I find more information?
You can find more information and documentation on the [GitHub repository](https://github.com/dunward/unity-mcp-template).