Python MCP server for Unity Editor — enables AI assistants to control Unity via the Model Context Protocol
Project description
unity-mcp-server
Python MCP server for Unity MCP — enables AI assistants (Claude, Cursor, VS Code Copilot, Windsurf) to control the Unity Editor via the Model Context Protocol.
Quick Start
1. Install the Unity package
In Unity: Window > Package Manager > + > Add package from git URL:
https://github.com/mzbswh/unity-mcp.git?path=unity-mcp
2. Configure your MCP client
Add to your MCP client config (e.g. .cursor/mcp.json, .vscode/mcp.json):
{
"mcpServers": {
"unity": {
"command": "uvx",
"args": ["unity-mcp-server"]
}
}
}
Or use Window > Unity MCP > Clients tab in Unity for one-click configuration.
3. Verify
Ask your AI assistant: "List all GameObjects in my Unity scene"
Streamable HTTP Mode
By default the server runs in stdio mode (MCP client launches it automatically). To run as a standalone HTTP server:
UNITY_MCP_TRANSPORT=streamable-http uvx unity-mcp-server
Then configure your MCP client with http://127.0.0.1:8080/mcp.
Environment Variables
| Variable | Default | Description |
|---|---|---|
UNITY_MCP_HOST |
127.0.0.1 |
Unity Editor host address |
UNITY_MCP_PORT |
51279 |
Unity Editor TCP port |
UNITY_MCP_TIMEOUT |
60 |
Request timeout (seconds) |
UNITY_MCP_TRANSPORT |
stdio |
Transport mode: stdio or streamable-http |
UNITY_MCP_HTTP_PORT |
8080 |
HTTP port (only for streamable-http mode) |
Docker
cd unity-server
# stdio mode (default)
docker compose up -d
# Streamable HTTP mode
UNITY_MCP_TRANSPORT=streamable-http docker compose up -d
Extra Tools
In addition to all Unity Editor tools (60+), this server provides:
analyze_script— C# script static analysisvalidate_assets— Asset naming and directory validation
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 unity_mcp_server-1.0.5.tar.gz.
File metadata
- Download URL: unity_mcp_server-1.0.5.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e745dbdcd5518eefa63a16ac500106a817d165137bf8e0a74b45ae37370bbe3
|
|
| MD5 |
cc128fa399b207281c4cb3f8b982c9af
|
|
| BLAKE2b-256 |
25c0f3b5314bdd5fb75d77c779958d2a9256913ea68e7cad478b7978b0e4a1a4
|
Provenance
The following attestation bundles were made for unity_mcp_server-1.0.5.tar.gz:
Publisher:
release-server.yml on mzbswh/unity-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unity_mcp_server-1.0.5.tar.gz -
Subject digest:
8e745dbdcd5518eefa63a16ac500106a817d165137bf8e0a74b45ae37370bbe3 - Sigstore transparency entry: 1080374779
- Sigstore integration time:
-
Permalink:
mzbswh/unity-mcp@7e0134378f896ede00011fbffab0650dd4d959a0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mzbswh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-server.yml@7e0134378f896ede00011fbffab0650dd4d959a0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unity_mcp_server-1.0.5-py3-none-any.whl.
File metadata
- Download URL: unity_mcp_server-1.0.5-py3-none-any.whl
- Upload date:
- Size: 15.6 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 |
06348a31e9799668f11f51f92b32fdc48763aabe24a63fe36e980041e5225299
|
|
| MD5 |
0e1e05793d15ec33a3a3b6614d5f98de
|
|
| BLAKE2b-256 |
e25efe070e348fe46da5bb94f73861d4deb2170daeee2ed7d0e65d7bdbf61a80
|
Provenance
The following attestation bundles were made for unity_mcp_server-1.0.5-py3-none-any.whl:
Publisher:
release-server.yml on mzbswh/unity-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unity_mcp_server-1.0.5-py3-none-any.whl -
Subject digest:
06348a31e9799668f11f51f92b32fdc48763aabe24a63fe36e980041e5225299 - Sigstore transparency entry: 1080374832
- Sigstore integration time:
-
Permalink:
mzbswh/unity-mcp@7e0134378f896ede00011fbffab0650dd4d959a0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mzbswh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-server.yml@7e0134378f896ede00011fbffab0650dd4d959a0 -
Trigger Event:
push
-
Statement type: