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. You also need uvx (requires uv) to run the server.
Installation
Option 1: PyPI
Install and run directly from PyPI using uvx.
Run Server (HTTP):
uvx --from mcpforunityserver mcp-for-unity --transport http --http-url http://localhost:8080
MCP Client Configuration (HTTP):
{
"mcpServers": {
"UnityMCP": {
"url": "http://localhost:8080/mcp"
}
}
}
MCP Client Configuration (stdio):
{
"mcpServers": {
"UnityMCP": {
"command": "uvx",
"args": [
"--from",
"mcpforunityserver",
"mcp-for-unity",
"--transport",
"stdio"
]
}
}
}
Option 2: From GitHub Source
Use this to run the latest released version from the repository. Change the version to main to run the latest unreleased changes from the repository.
{
"mcpServers": {
"UnityMCP": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/CoplayDev/unity-mcp@v9.2.0#subdirectory=Server",
"mcp-for-unity",
"--transport",
"stdio"
]
}
}
}
Option 3: Docker
Use Pre-built Image:
docker run -p 8080:8080 msanatan/mcp-for-unity-server:latest --transport http --http-url http://0.0.0.0:8080
Build Locally:
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".
Option 4: Local Development
For contributing or modifying the server code:
# Clone the repository
git clone https://github.com/CoplayDev/unity-mcp.git
cd unity-mcp/Server
# Run with uv
uv run src/main.py --transport stdio
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 mcpforunityserver-9.2.0.tar.gz.
File metadata
- Download URL: mcpforunityserver-9.2.0.tar.gz
- Upload date:
- Size: 144.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3ba9b8ea43a00cd8524003289d0e5aa3637443262e799e114ed9d38395bdd94
|
|
| MD5 |
d0ecd0092919342572a0d1e91ea43565
|
|
| BLAKE2b-256 |
3d88eb2d6e029bfd5ac20f1900c77485bfca32afdf06087a5e93951bc4aefe2d
|
Provenance
The following attestation bundles were made for mcpforunityserver-9.2.0.tar.gz:
Publisher:
release.yml on CoplayDev/unity-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpforunityserver-9.2.0.tar.gz -
Subject digest:
d3ba9b8ea43a00cd8524003289d0e5aa3637443262e799e114ed9d38395bdd94 - Sigstore transparency entry: 845840186
- Sigstore integration time:
-
Permalink:
CoplayDev/unity-mcp@5acef27cd7e5d55dcaffe51340ea6a5d4a8f7a09 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CoplayDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5acef27cd7e5d55dcaffe51340ea6a5d4a8f7a09 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mcpforunityserver-9.2.0-py3-none-any.whl.
File metadata
- Download URL: mcpforunityserver-9.2.0-py3-none-any.whl
- Upload date:
- Size: 180.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec93a0bf90fe9e81b50473759518eecb173e9da42afe1b0395cf2e8e75224087
|
|
| MD5 |
5b4823973e171cccd12396f44d748d61
|
|
| BLAKE2b-256 |
922716389d2750c1a355e91af3d376208e1a5d0aeb3fde2d4e97852a62470e44
|
Provenance
The following attestation bundles were made for mcpforunityserver-9.2.0-py3-none-any.whl:
Publisher:
release.yml on CoplayDev/unity-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpforunityserver-9.2.0-py3-none-any.whl -
Subject digest:
ec93a0bf90fe9e81b50473759518eecb173e9da42afe1b0395cf2e8e75224087 - Sigstore transparency entry: 845840193
- Sigstore integration time:
-
Permalink:
CoplayDev/unity-mcp@5acef27cd7e5d55dcaffe51340ea6a5d4a8f7a09 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CoplayDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5acef27cd7e5d55dcaffe51340ea6a5d4a8f7a09 -
Trigger Event:
workflow_dispatch
-
Statement type: