Yamu (Unity Editor) MCP server

Enables Unity Editor compilation feedback through HTTP server integration, providing tools to trigger compilation, monitor build status, and retrieve error details for automated edit-compile-debug cycles in Unity C# development.
Back to servers
Setup instructions
Provider
Keijiro Takahashi
Release date
Jul 02, 2025
Language
C#
Stats
27 stars

Yamu is an experimental MCP (Model Context Protocol) server that enables AI coding agents to interact with Unity projects. It provides crucial capabilities like compilation status checking and test execution, allowing AI agents to autonomously navigate edit-compile-debug cycles during Unity development.

Prerequisites

  • Platform: macOS (only tested platform)
  • Node.js: Required to run the intermediate server
    brew install node
    

Installation

Adding the Package to Unity

You can install the Yamu package (jp.keijiro.yamu) via the "Keijiro" scoped registry using the Unity Package Manager. To add the registry to your project, follow these instructions.

Configuring the MCP Server for AI Agents

After installing the package in your Unity project, you need to configure your AI agent to use the MCP server. If you're using an AI agent like Gemini CLI, you can simply provide this prompt:

You're Gemini CLI. Follow yamu-mcp-setup.md

Note that you'll need to update this configuration each time you upgrade Yamu by running the same prompt again.

Features and Usage

Compile and Wait

The compile_and_wait feature triggers Unity Editor compilation, waits for it to complete, and returns compilation results including any errors:

{
  "action": "compile_and_wait"
}

This allows AI agents to know when compilation is complete and whether there were any errors.

Run Tests

The run_tests feature executes Unity Test Runner tests (both EditMode and PlayMode) with real-time status monitoring and detailed result reporting:

{
  "action": "run_tests"
}

This enables AI agents to verify that code changes haven't broken existing functionality.

Practical Applications

By using these MCP features, AI coding agents can:

  1. Make code changes to Unity projects
  2. Trigger compilation and receive feedback
  3. Run tests to verify changes
  4. Iterate based on results

This workflow allows AI agents to work more effectively with Unity projects by providing the necessary feedback mechanisms for autonomous development.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "yamu" '{"command":"node","args":["Packages/jp.keijiro.yamu/Bridge/server.js"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "yamu": {
            "command": "node",
            "args": [
                "Packages/jp.keijiro.yamu/Bridge/server.js"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "yamu": {
            "command": "node",
            "args": [
                "Packages/jp.keijiro.yamu/Bridge/server.js"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later