- Explore MCP Servers
- UniMcp
Unimcp
What is Unimcp
UniMcp is a server that enables AI assistants, such as Cursor and Windsurf, to interact with Unity, facilitating tasks like code compilation and test execution.
Use cases
Use cases for UniMcp include automating code compilation, running tests in Unity projects, and facilitating debugging processes with AI assistance.
How to use
To use UniMcp, install .NET 8, check out the UniMcp repository, add UniMcp.Client to Unity Package Manager, configure your IDE, and start the MCP server. Once set up, the server will automatically start, allowing AI agents to compile code or run tests.
Key features
Key features of UniMcp include the ability to run tests with filters, compile code, and interact with the server through a console application based on the MCP C# SDK.
Where to use
UniMcp can be used in game development environments where Unity is utilized, particularly in projects that leverage AI for development assistance.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Unimcp
UniMcp is a server that enables AI assistants, such as Cursor and Windsurf, to interact with Unity, facilitating tasks like code compilation and test execution.
Use cases
Use cases for UniMcp include automating code compilation, running tests in Unity projects, and facilitating debugging processes with AI assistance.
How to use
To use UniMcp, install .NET 8, check out the UniMcp repository, add UniMcp.Client to Unity Package Manager, configure your IDE, and start the MCP server. Once set up, the server will automatically start, allowing AI agents to compile code or run tests.
Key features
Key features of UniMcp include the ability to run tests with filters, compile code, and interact with the server through a console application based on the MCP C# SDK.
Where to use
UniMcp can be used in game development environments where Unity is utilized, particularly in projects that leverage AI for development assistance.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
UniMcp
UniMcp enables AI assistants like Cursor and Windsurf to interact with Unity.
Functions
- Run tests with a filter
- Compile the code
Installation
-
Install .NET 8 to run the server.
-
Check out the UniMcp repository
-
Add
UniMcp.Client
to Unity Package Manager from the repository you checked out:
"com.yousician.unimcp.client": "file:../../UniMcp/UniMcp.Client",
- In Unity, open Tools > UniMcp and press the configure button of your IDE.
[!NOTE]
If you are using Visual Studio Code, you can configure the MCP server for cursor and it will be discovered automatically.If your IDE is not listed, you can press “Copy Config to Clipboard” and paste it into your IDE.
- Start the MCP server in your IDE.
In most IDEs this is done by pressing a “Refresh” button in the MCP server settings.
Usage
Once configured, the server will be automatically started by your IDE.
The Unity bridge will be started automatically by the Unity Editor.
Now you can ask your favorite AI agent to compile the code or run tests.
Development
The Unity client is set up to also work without Unity to enable debugging together with the server.
The server is a console application that’s based on the MCP C# SDK. You can interact with it directly by writing messages to STDIN.
Example messages
List available tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}
Run all tests:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "RunTests",
"arguments": {
"testFilter": ""
}
}
}
Compile the code:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "Compile"
}
}
Debugging
When debugging the server, the MCP framework will eat all exceptions.
You can put a breakpoint here to see the issue.
Logs
The server writes logs to ~/UniMcp.log
.
The client’s logs are visible in the UniMcp editor window.
Adding New Tools
To add new tools to the server:
- Create a new tool description in
UniMcp.Server.Tools
- Implement the appropriate functionality in
UniMcp.Client.Commands
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.