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.
brew install node
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.
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.
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.
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.
By using these MCP features, AI coding agents can:
This workflow allows AI agents to work more effectively with Unity projects by providing the necessary feedback mechanisms for autonomous development.
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.
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.
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"
]
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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