Funplay MCP for Unity

An MCP server inside the Unity Editor: the agent builds scenes and scripts, enters play mode and checks the game with screenshots

  • 275 ★ on the repository
  • Last commit
  • MIT
MCP server

Broad access

Why this level

  • `execute_code` runs arbitrary C# in the editor and can change and delete project assets
  • All tools run without confirmation inside the package, and the safety checks are not a sandbox
  • A local HTTP server listens on a 127.0.0.1 port and accepts commands from any connected client
All reasons and checks

funplayai/funplay-unity-mcp

Install

Manual install

openupm add com.gamebooom.unity.mcp

Install through OpenUPM to see package versions in Package Manager. Without OpenUPM add https://github.com/FunplayAI/funplay-unity-mcp.git under Window > Package Manager > Add package from git URL.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • `execute_code` runs arbitrary C# in the editor and can change and delete project assets
  • All tools run without confirmation inside the package, and the safety checks are not a sandbox
  • A local HTTP server listens on a 127.0.0.1 port and accepts commands from any connected client

This is third-party code. Review the repository files before installing.

What it does

Funplay MCP for Unity installs into a project as a Unity package and starts an HTTP MCP server inside the running editor. Claude Code, Cursor, Codex and other clients connect to it on 127.0.0.1 and work with the live project: they create objects and components, edit properties through SerializedObject, write and patch scripts, assign materials and look for broken references. The main tool is `execute_code`. The agent sends a C# snippet, the package compiles it in memory through Roslyn and runs it on the editor thread without writing files under `Assets/`. The `IFunplayCommand` template registers created and modified objects with Undo and returns a change log, so the agent sees exactly what changed. Narrow tasks have dedicated tools that are cheaper for the model. By default the package exposes a `core` set of 40 tools, while `full` holds 180 across 42 modules. The server serves resources with project state (scene, selection, compile errors, console) and ready workflow prompts such as `verify_compilation` and `create_playable_prototype`. In play mode the agent simulates keyboard and mouse, takes screenshots and reads logs. The Funplay > MCP Server window writes the configuration into a chosen client with one click. The Configure + Skills button for Claude Code, Cursor, Codex, OpenCode and DeepSeek Harness also installs the `unity-mcp-workflow` and `unity-ui-composition` skills into the project.

Who it is for. For Unity game developers who want Claude Code, Cursor or Codex to handle editor routine: building scenes, interfaces and prototypes with a play mode check.

Good fit when

  • You need a prototype from one sentence: a scene, scripts, a UI with a score and a game-over screen
  • A uGUI interface must adapt to portrait and landscape, and the agent needs the `unity-ui-composition` skill
  • After a code change you want to confirm the project compiles and play a level in play mode with simulated keys and screenshots
  • There are many repetitive edits: add a component to dozens of objects or check broken asset references
  • The project has its own workflows that fit well as `mcp-prompts/*.md` files in the project root

Not a fit when

  • You need tools in a built game: the package is editor-only and adds no runtime components
  • Your Unity is older than 2022.3: the package requires 2022.3 or newer
  • You want a sandbox for `execute_code`: the safety checks block obviously destructive snippets but offer no full isolation
  • You need 3D model, texture or sound generation inside the package: it has no built-in asset generators

Example request

Using Funplay MCP, build a snake scene on a 10 by 10 grid with food, a score and a game-over screen. Then enter play mode and take a screenshot.

MCP

Transport
http
Authentication
not required

Limitations

  • The package works only in Unity Editor 2022.3 and newer and adds no components to a built game.
  • Each open project gets its own port in the 20000–29999 range, and the client config entry is named after the project folder. If the port is taken, the server window shows a fallback and blocks one-click setup until you pin a port.
  • The `execute_code` safety checks are on by default and block clearly destructive snippets, broad `System.IO` writes and paths outside the project. They are not a full sandbox, and a client can switch the checks off in a single call.
  • All tools run immediately, the package has no extra approval step. Permission decisions belong to the agent client.
  • There are no built-in generators for images, meshes or sound; the agent builds them through external APIs inside `execute_code`.

How to disable. Stop the server in the Funplay > MCP Server window and delete the `funplay-<project>` entry from the client config. Remove the package through Window > Package Manager. If you installed the skills, delete `unity-mcp-workflow` and `unity-ui-composition` from the project skills folder.

FAQ

How do I connect Unity to Claude Code over MCP?

Add the package from the Git URL in Package Manager, start the server from the Funplay > MCP Server menu and press Configure for Claude Code. The package writes an HTTP server with an address like http://127.0.0.1:port/ into the config. To check it, ask the agent to call `get_scene_info`.

How does core differ from full in Funplay MCP?

The `core` set holds 40 frequent tools and is on by default, while `full` exposes all 180. You can edit both sets in the Funplay > Tool Exposure window.

What does execute_code do and is it safe?

The tool compiles the C# it receives in memory and runs it in the editor. Safety checks are on by default and block clearly destructive snippets and broad disk writes, but they are not a sandbox. The settings live in Funplay > MCP Settings.

Can I run several Unity projects at once?

Yes. A new project gets its own port in the 20000–29999 range, and the client entry is named funplay-project_name. A project upgraded from an earlier version keeps its old port, and the Use Per-Project Port button moves it to a separate one.

Which clients are supported?

The Configure button can write config for Claude Code, Claude Desktop, Cursor, Codex, OpenCode, VS Code, Kiro, Trae, Kimi Code, LM Studio, DeepSeek Harness and Antigravity. Any other MCP client that speaks HTTP is set up by hand from the documentation examples.

Discussion

No questions or reviews yet.

A Unity package: the Editor serves MCP over HTTP itself, and agents and the command line drive scenes, assets and builds

MCP serverBroad access338Repository stars

A Cocos Creator extension with a built-in MCP server: the agent builds UI, edits scenes and takes editor screenshots

MCP serverBroad access371Repository stars

Control the Unity Editor from an agent over MCP: scenes and objects, C# scripts, assets, tests, profiling and builds

MCP serverBroad access15.5KRepository stars

MCP server that connects an AI agent to the Unity Editor: scene, objects, packages and project resources

MCP serverBroad access2KRepository stars

An MCP server for Unity: control the scene, objects, components, builds and profiling from an agent

MCP serverExtended access530Repository stars

A Unity plugin with an MCP server, skills and CLI: the agent drives scenes, assets, scripts and tests in the Unity Editor

MCP serverBroad access4.6KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
Funplay MCP for Unity (this entry)nonot required275
Unity MCP Servernonot required530another Unity MCP server, while this one centres on `execute_code` and a compact `core` set of 40 tools
MCP Unitynonot required2,006also links Unity to an agent, while here the server is built into the editor and needs no external process

README in short

The repository front page opens with an install through a Git URL or OpenUPM and three steps: start the server, configure the client, check the connection. It continues with comparison tables against Coplay unity-mcp and Unity AI Assistant, sections on `execute_code`, resources, prompts and a list of tools by category.

README badge

Report a problem

Foxx AIFunplay MCP for Unity
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.