Skip to main content

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 analysis
  • validate_assets — Asset naming and directory validation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unity_mcp_server-1.0.3.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unity_mcp_server-1.0.3-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file unity_mcp_server-1.0.3.tar.gz.

File metadata

  • Download URL: unity_mcp_server-1.0.3.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unity_mcp_server-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6a24ed6673b64404eb6f47a3406a3e764669dece3600f5ef4c135d3ec1490e7d
MD5 35a6b3d694f746b7565aff2a20ceeabe
BLAKE2b-256 bc392e451b75e33cb44dae1af0a1643d60355f2f047e4c92d76f8d1703db13e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for unity_mcp_server-1.0.3.tar.gz:

Publisher: release-server.yml on mzbswh/unity-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file unity_mcp_server-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for unity_mcp_server-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12cbfea39c3510f0eb968ea72fbe4a93bf48a4d649fadf282b3dda9c81baa6d5
MD5 ac618ccaa4e0b1f8a86bfd18fc96b081
BLAKE2b-256 9f57c1534de8beee93ccecc611fcf3ea434346a736c8ff6f393a1303c4779670

See more details on using hashes here.

Provenance

The following attestation bundles were made for unity_mcp_server-1.0.3-py3-none-any.whl:

Publisher: release-server.yml on mzbswh/unity-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page