The Unity MCP with Ollama Integration package enables seamless communication between Unity and local Large Language Models (LLMs) via Ollama. This solution allows you to automate Unity workflows, manipulate assets, and control the Unity Editor programmatically using local LLMs without requiring internet connection or API keys.
Before installing, ensure you have:
ollama pull deepseek-r1:14b
ollama pull gemma3:12b
Download or clone the repository:
git clone https://github.com/ZundamonnoVRChatkaisetu/unity-mcp-ollama.git
Create a folder in your Unity project's Assets directory:
Assets/UnityMCPOllama
Copy the Editor
folder from the cloned repository to your Unity project:
[Repository]/Editor → Assets/UnityMCPOllama/Editor
Verify the folder structure is correct:
Assets/
UnityMCPOllama/
Editor/
MCPEditorWindow.cs
UnityMCPBridge.cs
Let Unity import and compile the scripts.
Create a folder for the Python environment (outside your Unity project):
mkdir PythonMCP
cd PythonMCP
Copy the Python folder from the cloned repository:
cp -r [Repository]/Python .
Create and activate a virtual environment:
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
Install dependencies:
cd Python
pip install -e .
ollama pull deepseek-r1:14b
ollama pull gemma3:12b
ollama serve
Start Unity Bridge:
Window > Unity MCP
to open the MCP windowStart Python Server:
cd PythonMCP
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Start the server
cd Python
python server.py
Configure Ollama Settings:
deepseek-r1:14b
or gemma3:12b
The Unity MCP window provides status information:
Python Server Status:
Unity Bridge Status:
Ollama Status:
"Not Connected" Status for Python Server
Cannot find Unity MCP menu
Ollama Connection Issues
ollama serve
MCP Command Execution Fails
Local LLM performance depends on your hardware:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.