
eeeeeeeethan/mcptoolforunity
Developer toolsSimply add the [McpTool] attribute to static methods to make them callable from editors like Cursor/windsurf.
Overview
Simply add the [McpTool] attribute to static methods to make them callable from editors like Cursor/windsurf. Add the package from the git URL: https://github.com/EEEEEEEEthan/McpToolForUnity.git This will create a McpCommand directory at the same level as Assets. Add the [McpTool] attribute to the static methods you want to call. you need re-enable cursor MCP server to refresh tool list
README
Introduction to McpToolForUnity
Features
Simply add the [McpTool] attribute to static methods to make them callable from editors like Cursor/windsurf.
[McpTool("Add two numbers")]
static int Add([McpTool("The first one")] int a, [McpTool("The second one")] int b)
{
// Attribute for parameters are not necessary
return a + b;
}
Installation
1. Unity Package
Add the package from the git URL: https://github.com/EEEEEEEEthan/McpToolForUnity.git
This will create a McpCommand directory at the same level as Assets.
2. Open Unity Preferences
restart Unity if you have modified port
3. Configure Cursor
paste command to Cursor settings
4. Attribute Everything
Add the [McpTool] attribute to the static methods you want to call.
[McpTool("Add two numbers")]
static int Add([McpTool("The first one")] int a, [McpTool("The second one")] int b)
{
// Attribute for parameters are not necessary
return a + b;
}
you need re-enable cursor MCP server to refresh tool list
5. Test Agent
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →