{"id":48561663,"url":"https://github.com/nowsprinting/mcp-extension-unity","last_synced_at":"2026-04-08T12:30:43.886Z","repository":{"id":340845911,"uuid":"1164298239","full_name":"nowsprinting/mcp-extension-unity","owner":"nowsprinting","description":"IntelliJ MCP Server extension plugin for Unity Editor","archived":false,"fork":false,"pushed_at":"2026-03-07T07:36:52.000Z","size":301,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-07T14:53:02.414Z","etag":null,"topics":["intellij-plugin","mcp-server","rider-plugin","unity","unity3d"],"latest_commit_sha":null,"homepage":"https://plugins.jetbrains.com/plugin/30357-mcp-server-extension-for-unity","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nowsprinting.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["nowsprinting"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://ofuse.me/nowsprinting"]}},"created_at":"2026-02-22T23:05:44.000Z","updated_at":"2026-03-07T07:36:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nowsprinting/mcp-extension-unity","commit_stats":null,"previous_names":["nowsprinting/mcp-extension-unity"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nowsprinting/mcp-extension-unity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowsprinting%2Fmcp-extension-unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowsprinting%2Fmcp-extension-unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowsprinting%2Fmcp-extension-unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowsprinting%2Fmcp-extension-unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nowsprinting","download_url":"https://codeload.github.com/nowsprinting/mcp-extension-unity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowsprinting%2Fmcp-extension-unity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31556227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["intellij-plugin","mcp-server","rider-plugin","unity","unity3d"],"created_at":"2026-04-08T12:30:42.892Z","updated_at":"2026-04-08T12:30:43.865Z","avatar_url":"https://github.com/nowsprinting.png","language":"Kotlin","funding_links":["https://github.com/sponsors/nowsprinting","https://ofuse.me/nowsprinting"],"categories":[],"sub_categories":[],"readme":"# MCP Server Extension for Unity\n\n[![Build](https://github.com/nowsprinting/mcp-extension-unity/actions/workflows/build.yml/badge.svg)](https://github.com/nowsprinting/mcp-extension-unity/actions/workflows/build.yml)\n[![Version](https://img.shields.io/jetbrains/plugin/v/30357-mcp-server-extension-for-unity.svg)](https://plugins.jetbrains.com/plugin/30357-mcp-server-extension-for-unity)\n[![Downloads](https://img.shields.io/jetbrains/plugin/d/30357-mcp-server-extension-for-unity.svg)](https://plugins.jetbrains.com/plugin/30357-mcp-server-extension-for-unity)\n[![rating](https://img.shields.io/jetbrains/plugin/r/rating/30357-mcp-server-extension-for-unity.svg)](https://plugins.jetbrains.com/plugin/30357-mcp-server-extension-for-unity)\n\n\u003c!-- Plugin description --\u003e\nA plugin that extends the [MCP Server](https://plugins.jetbrains.com/plugin/26071-mcp-server) built into JetBrains Rider.\nAdds tools for operating Unity Editor from any Coding Agents.\n\n## Features\n\n- **No per-project MCP server package required** — no need to install an MCP server package into each Unity project.\n- **No agent configuration** — if the MCP Server is already enabled in Rider, Coding Agents can use the tools immediately with no additional setup.\n- **No additional configuration required for cloned workspaces** — if you clone a workspace with `git workspace`, `claude --workspace`, etc., you get tools that work without any additional configuration.\n- **Tools for Unity Editor** — provides **Run tests**, **Run method**, **Check compilation**, and **Play control**.\n\u003c!-- Plugin description end --\u003e\n\n## Requirements\n\n- JetBrains Rider 2025.3+\n\n## Provided Tools\n\n### Run Tests\n\nThe `run_unity_tests` tool runs tests on Unity Editor through Rider's test infrastructure.\nRecommend filtering by `assemblyNames`, `categoryNames`, `groupNames`, and `testNames` to narrow down the tests to the scope of changes.\n\n**Parameters**\n\n| Name            | Required     | Description                                                                                                                                                                                      |\n|-----------------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `testMode`      | **Required** | `EditMode` or `PlayMode` (case insensitive). If the `includePlatforms` in the assembly definition file (`.asmdef`) contains `Editor`, it is an Edit Mode test; otherwise it is a Play Mode test. |\n| `assemblyNames` | **Required** | Names of test assemblies to run (without `.dll` extension, e.g. `MyFeature.Tests`). Specify the `name` property in the assembly definition file.                                                 |\n| `categoryNames` | Optional     | Names of a category to include in the run. Any test or fixture runs that have a category matching the string.                                                                                    |\n| `groupNames`    | Optional     | Same as testNames, except that it allows for Regex. This is useful for running specific fixtures or namespaces.                                                                                  |\n| `testNames`     | Optional     | The full name of the tests to match the filter. This is usually in the format FixtureName.TestName. If the test has test arguments, then include them in parentheses.                            |\n\n**Response**\n\n| Field               | Type    | Description                                                    |\n|---------------------|---------|----------------------------------------------------------------|\n| `success`           | boolean | `true` if all tests passed                                     |\n| `passCount`         | number  | Number of passing tests                                        |\n| `failCount`         | number  | Number of failing tests                                        |\n| `inconclusiveCount` | number  | Number of inconclusive tests                                   |\n| `skipCount`         | number  | Number of skipped tests                                        |\n| `failedTests`       | array   | Details of failed tests (`testId`, `output`, `duration`)       |\n| `inconclusiveTests` | array   | Details of inconclusive tests (`testId`, `output`, `duration`) |\n\n**Error Response**\n\n| Field          | Type    | Description    |\n|----------------|---------|----------------|\n| `success`      | boolean | Always `false` |\n| `errorMessage` | string  | Error details  |\n\n### Run Method\n\nThe `run_method_in_unity` tool invokes a static method in Unity Editor via reflection. The method must be static and parameterless. The method's return value is NOT returned.\nConsole logs during the method will be captured and returned in the `logs` field of the response.\n\n**Parameters**\n\n| Name           | Required     | Description                                                        |\n|----------------|--------------|--------------------------------------------------------------------|\n| `assemblyName` | **Required** | Assembly name containing the type (e.g., `Assembly-CSharp-Editor`) |\n| `typeName`     | **Required** | Fully qualified type name (e.g., `MyNamespace.MyEditorTool`)       |\n| `methodName`   | **Required** | Static method name to invoke (e.g., `DoSomething`)                 |\n\nThe method must be **static and parameterless**.\n\n**Response**\n\n| Field     | Type    | Description                                                                                                                                             |\n|-----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `success` | boolean | Always `true` (indicates reflection succeeded; does not mean the method executed without errors — internal exceptions are captured in `logs`)           |\n| `logs`    | array   | Console log entries captured during execution (may be empty). Each entry has `type` (`\"Message\"`, `\"Warning\"`, `\"Error\"`), `message`, and `stackTrace`. |\n\n**Error Response**\n\n| Field          | Type    | Description    |\n|----------------|---------|----------------|\n| `success`      | boolean | Always `false` |\n| `errorMessage` | string  | Error details  |\n\n\u003e [!IMPORTANT]  \n\u003e The method's return value is **NOT** returned. `success` only indicates whether the method was found and invoked (reflection succeeded). Even if the method throws internally, `success` may be `true` — the exception is captured in the `logs` field.\n\n\u003e [!IMPORTANT]  \n\u003e Async methods can be invoked, but the tool does not await their completion. Logs generated after the method returns to the caller will not be included in the response.\n\n### Check Compilation\n\nThe `get_unity_compilation_result` tool triggers Unity's `AssetDatabase.Refresh()` and checks if compilation succeeded.\nConsole logs during compilation will be captured and returned in the `logs` field of the response.\n\n**Parameters**: none\n\n**Response**\n\n| Field     | Type    | Description                                                                                                                                               |\n|-----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `success` | boolean | Always `true`                                                                                                                                             |\n| `logs`    | array   | Console log entries captured during compilation (may be empty). Each entry has `type` (`\"Message\"`, `\"Warning\"`, `\"Error\"`), `message`, and `stackTrace`. |\n\n**Error Response**\n\n| Field          | Type    | Description                                                                                                                                             |\n|----------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `success`      | boolean | Always `false`                                                                                                                                          |\n| `errorMessage` | string  | Error details                                                                                                                                           |\n| `logs`         | array   | Console log entries captured before the error (may be empty). Each entry has `type` (`\"Message\"`, `\"Warning\"`, `\"Error\"`), `message`, and `stackTrace`. |\n\n\u003e [!WARNING]  \n\u003e If the Unity Editor was compiled before this tool triggered a refresh, the response will not include a log. Compilation errors will remain in the console window, but will not be available with this tool. Instead, use the `getDiagnostics` or `get_file_problems` tools, or read `editor.log`.\n\n\u003e [!TIP]  \n\u003e Recommended to run this tool to ensure compilation succeeds before `run_unity_tests` or `run_method_in_unity` tool if modified code.\n\n### Play Control\n\nThe `unity_play_control` tool controls Unity Editor's play mode.\n\n**Parameters**\n\n| Name     | Required     | Description                                                                                  |\n|----------|--------------|----------------------------------------------------------------------------------------------|\n| `action` | **Required** | Action to perform: `play`, `stop`, `pause`, `resume`, `step`, or `status` (case insensitive) |\n\n| Action   | Operation                                         |\n|----------|---------------------------------------------------|\n| `play`   | Enter play mode                                   |\n| `stop`   | Exit play mode                                    |\n| `pause`  | Pause while in play mode                          |\n| `resume` | Resume from paused state                          |\n| `step`   | Advance one frame (enters paused play mode)       |\n| `status` | Read current play/pause state without any changes |\n\n**Response**\n\n| Field       | Type    | Description                                    |\n|-------------|---------|------------------------------------------------|\n| `success`   | boolean | Always `true`                                  |\n| `action`    | string  | The action that was performed                  |\n| `isPlaying` | boolean | Whether Unity Editor is currently in play mode |\n| `isPaused`  | boolean | Whether Unity Editor is currently paused       |\n\n**Error Response**\n\n| Field          | Type    | Description    |\n|----------------|---------|----------------|\n| `success`      | boolean | Always `false` |\n| `errorMessage` | string  | Error details  |\n\n## Architecture\n\n```\nCoding Agent (e.g., Claude Code)\n    ↓ MCP (HTTP/SSE)\nJetBrains MCP Server (built into Rider 2025.3+)\n    ↓ extension point (com.intellij.mcpServer)\n[This Plugin — Kotlin Frontend]\n    ├── RunUnityTestsToolset.kt / PlayControlToolset.kt / RunMethodInUnityToolset.kt\n    │       ↓ (unity_play_control, get_unity_compilation_result, run_method_in_unity)\n    │   FrontendBackendModel.playControls / FrontendBackendModel.runMethodInUnity / UnityTestMcpModel.getCompilationResult\n    │       ↓ (run_unity_tests)\n    │   UnityTestMcpModel (custom Rd: IRdCall\u003cMcpRunTestsRequest, McpRunTestsResponse\u003e)\n    │       ↓\n[Plugin Backend — C# / UnityTestMcpHandler]\n    ↓ BackendUnityModel.UnitTestLaunch + RunUnitTestLaunch (existing Rd)\nUnity Editor\n    ↓ TestRunnerApi.Execute()\nTest execution (results via TestResult/RunResult signals)\n```\n\nRider uses two separate [Reactive Distributed (Rd)](https://github.com/JetBrains/rd) protocol connections:\n\n- **Kotlin Frontend ↔ C# Backend**: `FrontendBackendModel`\n- **C# Backend ↔ Unity Editor**: `BackendUnityModel`\n\n`unity_play_control` accesses `FrontendBackendModel.playControls` directly from Kotlin, requiring no C# backend changes.\n`run_method_in_unity` accesses `FrontendBackendModel.runMethodInUnity` directly from Kotlin, requiring no C# backend changes.\n`run_unity_tests` uses a custom Rd model (`UnityTestMcpModel`) to bridge the two layers, since the Kotlin Frontend cannot directly access `BackendUnityModel`.\n\n## Installation\n\n1. Open **Settings \u003e Plugins**.\n2. Select **Marketplace** and search for \"mcp unity\".\n3. Click **Install** on the \"MCP Server Extension for Unity\" plugin.\n\n## Configuration\n\nIf the built-in **MCP Server** is already enabled in Rider, no additional configuration is required.\n\nIf it is not yet enabled:\n\n1. Open **Settings \u003e Tools \u003e MCP Server**.\n2. Click **Enable MCP Server**.\n3. Click **Auto-Configure** for the agent you want to use.\n\n\u003e [!NOTE]\n\u003e See the [MCP Server](https://www.jetbrains.com/help/rider/mcp-server.html) documentation for more details on configuration and usage.\n\n### Environment Variables\n\n| Variable           | Default | Description                                                                                                                                                                                                            |\n|--------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `MCP_TOOL_TIMEOUT` | `300`   | Timeout in seconds for `run_unity_tests`, `get_unity_compilation_result`, and `run_method_in_unity`. Set a smaller value to get faster feedback when Unity Test Runner cancellation does not fire a completion signal. |\n\n## FAQ\n\n**Does it only work in the terminal window inside Rider?**\n\nNo. As long as the Rider process connected to Unity Editor is running, you can use the tools from any coding agent launched in any external terminal.\n\n**Can I collect Unity console logs?**\n\nNo. The only API for retrieving Unity console logs is streaming-based, and MCP tools cannot return streaming responses. While buffering is technically possible, it would be inaccurate and misleading, so this is intentionally not provided. Read `editor.log` instead.\n\n## Contributing\n\nContributions are welcome. However, the scope is limited to features that use Rider's `BackendUnityModel`. This plugin does not aim to be an all-in-one Unity toolbox.\n\n\u003e [!NOTE]  \n\u003e This project will be closed once JetBrains releases an official MCP extension for Unity.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowsprinting%2Fmcp-extension-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnowsprinting%2Fmcp-extension-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowsprinting%2Fmcp-extension-unity/lists"}