YetAnotherUnityMcp CLAUDE.md

Development instructions for YetAnotherUnityMcp, a project that lets AI tools inspect and control a Unity game scene through a Python server and a Unity Editor plugin. It explains the project structure, commands, and Model Context Protocol (MCP), a standard way for AI tools to communicate with software.

In plain words
What is it for?
Use it when developing, running, or extending YetAnotherUnityMcp, including its MCP tools, WebSocket connection, Unity integration, and Python server.
Why use it?
It gives the coding agent the project context and working rules needed to make compatible changes across the Unity C# plugin and Python server.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/unitycoder/yetanotherunitymcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/unitycoder/YetAnotherUnityMcp
Per session 1,150 This file is loaded in full into every session.
When invoked 1,150 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01150 $0.01150
Opus 5 $0.00575 $0.00575
Sonnet 5 $0.00230 $0.00230
Haiku 4.5 $0.00115 $0.00115

Measured yesterday against content hash f5d674541253, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

YetAnotherUnityMcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md - Development Guidelines

Project Overview

YetAnotherUnityMcp is a system that bridges the Unity game engine with AI-driven tools using the Model Context Protocol (MCP):

  • Unity MCP Plugin (Client): A C# plugin integrated into the Unity Editor that connects to the MCP server via WebSockets
  • FastMCP Python Server: A Python application that implements the MCP interface for Unity
  • MCP Client (AI or External): The external entity (such as an AI assistant or testing script) that sends MCP requests

This architecture cleanly separates the game engine concerns from the AI logic, improving scalability and maintainability. The goal is to allow AI agents to inspect and control a running Unity scene in a structured, safe manner.

Model Context Protocol (MCP)

We use FastMCP for MCP integration, which provides:

  • Simple decorator-based API for creating MCP servers
  • Support for Resources, Tools, and Prompts
  • Standard MCP primitives for AI interaction with Unity
  • Integration with Claude Desktop via fastmcp CLI tool

Commands

# Server (Python)
cd server
python -m pip install -e ".[dev]"     # Install with dev dependencies
python -m uvicorn main:app --reload   # Run the traditional server with auto-reload
python -m pytest                      # Run all tests
python -m pytest test_file.py         # Run a specific test file
python -m pytest test_file.py::test_func # Run a single test
python -m black .                     # Format Python code
python -m flake8                      # Lint Python code
python -m mypy .                      # Type-check Python code

# MCP Integration 
source $HOME/.local/bin/env           # Set up uv environment
python -m server.mcp_server           # Run MCP server from command line
python -m server.fastmcp_example      # Run simplified FastMCP example

# MCP Development
fastmcp dev server/mcp_server.py           # Run with MCP Inspector UI
fastmcp dev server/fastmcp_example.py      # Test simplified example

# Claude Desktop Installation
fastmcp install server/mcp_server.py       # Install in Claude Desktop
fastmcp install server/fastmcp_example.py --name "Unity Simple" # Install simplified version
fastmcp install server/mcp_server.py -e UNITY_PATH=/path/to/unity # With environment variables

# Plugin (C#)
# Build and install Unity plugin via Unity Editor

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 123 lines · 1,150 tokens per session scan A f5d674541253

Subscribe to this mod's changes

YetAnotherUnityMcp CLAUDE.md is an instructions file published in the GitHub repository unitycoder/YetAnotherUnityMcp (0 stars, last pushed 1y ago), licensed MIT. It adds 1,150 tokens to every session, about $0.0057 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.