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"],
      "env": {
        "UNITY_MCP_PORT": "52345"
      }
    }
  }
}

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"

Environment Variables

Variable Default Description
UNITY_MCP_HOST 127.0.0.1 Unity Editor host address
UNITY_MCP_PORT 52345 Unity Editor TCP port
UNITY_MCP_TIMEOUT 60 Request timeout (seconds)

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.0.tar.gz (10.5 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.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unity_mcp_server-1.0.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for unity_mcp_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0287279a8a5fc9c146596ea5200f7170f0bd3831dfb1ab8648dcd6201d5302f7
MD5 e9fd136ff59fb660b6423ea0acda191b
BLAKE2b-256 b97e04955c40c958a45f10a66eaecd4f7fe93e51bcff53ee879483f0dfa9e5f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for unity_mcp_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f4ad236bea3d094b69a68acc68c68d14be6d66c8b4ca1b2a07eb1a728a301f3
MD5 90dd17116e0847cea9a27b521794f332
BLAKE2b-256 6c32cd1668caaf121e13a08a7047c8d79867f2546a3d7f4062df6e3a146f4596

See more details on using hashes here.

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