About uMCP
uMCP is an MCP server for connecting AI agents with Unity applications. It communicates directly with clients over Streamable HTTP and restricts operations to pre-authorized commands.
Key features
- 01Communicates over Streamable HTTP
- 02Limits actions to pre-authorized operations
- 03Supports custom commands
- 04Includes Unity management tool examples
Use cases
- 01Interact with a Unity project from an MCP client
- 02Add custom operations for Unity
- 03Run management tasks through authorized commands
MCP support
uMCP exposes Unity application operations as MCP tools and connects to clients using Streamable HTTP.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEuMCP
uMCP is a server implementation of the MCP protocol, designed for working with the AI in Unity.
It is a minimalistic and efficient server that can be used to connect AI agents to Unity applications.
Features
- Safety: uMCP does not allow the AI to execute arbitrary code, and any and all operations can only be performed through pre-authorized operations.
- Extensible: uMCP is designed to be easily extensible, allowing you to add your own custom commands and operations via
McpServerToolTypeandMcpServerToolattribute.- You can find examples in the
Assets/NatsunekoLaboratory/ModelContextProtocol/ManagementToolsdirectory.
- You can find examples in the
How it works (What is different from other MCP implementations)
uMCP could directly communicate with the MCP client using the Streamable HTTP protocol, without any other dependencies. This allows for a more efficient and lightweight implementation compared to other MCP servers that rely on that requires additional dependencies such as Python, Node.js or other language runtimes.
Your MCP Client <-- Streamable HTTP --> uMCP Server
Installation
Prerequisites
- Unity Editor: Version 2022.3 LTS or newer.
- The MCP client must support Streamable HTTP (e.g., VSCode Agent Mode, Cursor, CLINE, etc.).
1. Install the CoreFramework
Using Unity Package Manager
openupm add com.natsuneko.modelcontextprotocol.core-framework- Open your Unity project.
Using Git URL
- Open your Unity project.
- Go to
Window > Package Manager. - Click
+toAdd package from git URL.... - Enter the URL:
https://github.com/mika-f/uMCP.git?path=/Assets/NatsunekoLaboratory/ModelContextProtocol/CoreFramework - Click
Add. - The MCP server automatically starts when you run the Unity project.
2. Install the Management Tools (and other packages)
Using Unity Package Manager
openupm add com.natsuneko.modelcontextprotocol.management-toolsopenupm add com.natsuneko.modelcontextprotocol.vrchat-world-tools
Using Git URL
- Open your Unity project.
- Go to
Window > Package Manager. - Click
+toAdd package from git URL.... - Enter the URL:
https://github.com/mika-f/uMCP.git?path=/Assets/NatsunekoLaboratory/ModelContextProtocol/MagagementTools - Click
Add.
3. Configure your MCP client
Connect your MCP client that support Streamable HTTP (VSCode Agent Mode, Cursor, CLINE, etc.) to the MCP server.
http://localhost:7225/sse
# or
http://localhost:7225/mcp
Example for VSCode Agent Mode:
{
"servers": {
"uMCP": {
"url": "http://localhost:7225/mcp"
}
}
}
Usage
- Open your Unity project.
- Start your MCP client (VSCode Agent Mode, Cursor, CLINE, etc.).
- Interact! Your MCP client should now be able to communicate with the Unity application.
Extension
You can extend uMCP by creating your own custom commands and operations.
using System;
using System.ComponentModel;
using NatsunekoLaboratory.ModelContextProtocol.CoreFramework.Attributes;
using NatsunekoLaboratory.ModelContextProtocol.CoreFramework.Models;
using NatsunekoLaboratory.ModelContextProtocol.CoreFramework.Protocol.Abstractions;
using NatsunekoLaboratory.ModelContextProtocol.CoreFramework.Protocol.Interfaces;
namespace NatsunekoLaboratory.Examples.MyCustomCommands
{
[McpServerToolType]
public class MyCustomCommand
{
[McpServerTool]
[Description("This is a custom command that does something.")]
public static IToolResult Execute([Description("An example parameter for the custom command.")] string exampleParameter)
{
// Your custom command logic here
return new TextResult($"Executed custom command with parameter: {exampleParameter}");
}
}
}
License
MIT by @6jz
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.