EM

eeeeeeeethan/mcptoolforunity

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

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

GitHub で README 全文を見る

インストール

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

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →