- Home
- MCP servers
- Unity
Unity
- typescript
7
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Unity-MCP provides a bridge that lets AI assistants run C# code, inspect Unity scenes and objects, and interact with runtime state through the Model Context Protocol. It enables AI-assisted development, automated testing, scene analysis, and runtime debugging by tying an MCP client to the Unity runtime and persisting results with AILogger.
How to use
You connect your MCP client to Unity-MCP using a JSON configuration that defines how to reach the server. Once connected, you can execute C# code inside the Unity runtime, inspect objects and their components, query scene hierarchies, run tests, and invoke methods on game objects. Results and logs are stored for later retrieval through the integrated AILogger, so you can review what happened during a session.
How to install
Prerequisites: Node.js installed on your development machine. AILogger should be running at http://localhost:3030 or you should set the AI_LOGGER_URL environment variable to point to your AILogger instance.
-
Clone the project repository
-
Change into the project directory
-
Install dependencies
-
Build the project
-
Start the MCP STDIO client which talks to Unity and uses AILogger for persistence
# 1. Clone the repository
git clone https://github.com/TSavo/Unity-MCP.git
cd Unity-MCP
# 2. Install dependencies
npm install
# 3. Build the project
npm run build
# 4. Start the MCP STDIO client
npm start
Configuration and notes
Unity-MCP exposes both an HTTP-based endpoint and a local STDIO workflow for connecting with MCP clients. The HTTP endpoint starts a server you can reach from your MCP client, while the STDIO workflow runs the MCP STDIO client locally and communicates with Unity through the Unity client. Ensure AILogger is available at the configured URL to persist logs and results.
Available tools
execute_code
Execute C# code directly in the Unity runtime environment and store results in AILogger for retrieval.
query
Query Unity objects and properties using dot notation to access the runtime state.
get_logs
Retrieve logs stored by AILogger for auditing or debugging.
get_log_by_name
Retrieve a specific log entry from AILogger by its log name.