MCP for Unity Server: A Unity package for Unity Editor integration via the Model Context Protocol (MCP).
Project description
MCP for Unity Server
Model Context Protocol server for Unity Editor integration. Control Unity through natural language using AI assistants like Claude, Cursor, and more.
Maintained by Coplay - This project is not affiliated with Unity Technologies.
💬 Join our community: Discord Server
Required: Install the Unity MCP Plugin to connect Unity Editor with this MCP server.
Installation
Option 1: Using uvx (Recommended)
Run directly from GitHub without installation:
# HTTP (default)
uvx --from git+https://github.com/CoplayDev/unity-mcp@v8.1.4#subdirectory=Server \
mcp-for-unity --transport http --http-url http://localhost:8080
# Stdio
uvx --from git+https://github.com/CoplayDev/unity-mcp@v8.1.4#subdirectory=Server \
mcp-for-unity --transport stdio
MCP Client Configuration (HTTP):
{
"mcpServers": {
"UnityMCP": {
"url": "http://localhost:8080/mcp"
}
}
}
MCP Client Configuration (stdio):
{
"mcpServers": {
"UnityMCP": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/CoplayDev/unity-mcp@v8.1.4#subdirectory=Server",
"mcp-for-unity",
"--transport",
"stdio"
],
"type": "stdio"
}
}
}
Option 2: Using uv (Local Installation)
For local development or custom installations:
# Clone the repository
git clone https://github.com/CoplayDev/unity-mcp.git
cd unity-mcp/Server
# Run with uv (HTTP)
uv run server.py --transport http --http-url http://localhost:8080
# Run with uv (stdio)
uv run server.py --transport stdio
MCP Client Configuration (HTTP):
{
"mcpServers": {
"UnityMCP": {
"url": "http://localhost:8080/mcp"
}
}
}
MCP Client Configuration (stdio – Windows):
{
"mcpServers": {
"UnityMCP": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\path\\to\\unity-mcp\\Server",
"server.py",
"--transport",
"stdio"
]
}
}
}
MCP Client Configuration (stdio – macOS/Linux):
{
"mcpServers": {
"UnityMCP": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/unity-mcp/Server",
"server.py",
"--transport",
"stdio"
]
}
}
}
Option 3: Using Docker
docker build -t unity-mcp-server .
docker run -p 8080:8080 unity-mcp-server --transport http --http-url http://0.0.0.0:8080
Configure your MCP client with "url": "http://localhost:8080/mcp". For stdio-in-docker (rare), run the container with --transport stdio and use the same command/args pattern as the uv examples, wrapping it in docker run -i ... if needed.
Configuration
The server connects to Unity Editor automatically when both are running. No additional configuration needed.
Environment Variables:
DISABLE_TELEMETRY=true- Opt out of anonymous usage analyticsLOG_LEVEL=DEBUG- Enable detailed logging (default: INFO)
Example Prompts
Once connected, try these commands in your AI assistant:
- "Create a 3D player controller with WASD movement"
- "Add a rotating cube to the scene with a red material"
- "Create a simple platformer level with obstacles"
- "Generate a shader that creates a holographic effect"
- "List all GameObjects in the current scene"
Documentation
For complete documentation, troubleshooting, and advanced usage:
Requirements
- Python: 3.10 or newer
- Unity Editor: 2021.3 LTS or newer
- uv: Python package manager (Installation Guide)
License
MIT License - See LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_unity_mcp-8.1.4.tar.gz.
File metadata
- Download URL: iflow_mcp_unity_mcp-8.1.4.tar.gz
- Upload date:
- Size: 71.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8656e642442222017d21e873703f6100c4b431ddcaf7b51b23545b44dac5c068
|
|
| MD5 |
9ee33fb3f5f7c84288ac8885e94a1a15
|
|
| BLAKE2b-256 |
e3a4c07946c581fa7b9a086b7fa8fd5f0e085ca13ee729d76ae7206aff94a760
|
File details
Details for the file iflow_mcp_unity_mcp-8.1.4-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_unity_mcp-8.1.4-py3-none-any.whl
- Upload date:
- Size: 92.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa2574aeb1d88765616da3232d03e7a7e19a16dfdb3b865290145782e2b3dbc2
|
|
| MD5 |
554129318ff1fcdad850b724cf32c2ba
|
|
| BLAKE2b-256 |
935b996d4e223fbd4bc476e4453ba53a5d20a067511740bb90abae25b9171d75
|