EM

eeeeeeeethan/mcptoolforunity

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

5 stars 2 forks Качество 30 Тренд 13

Simply add the [McpTool] attribute to static methods to make them callable from editors like Cursor/windsurf.

Обзор

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

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →