npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@spark-apps/unity-mcp

v2.6.2

Published

Simplified Unity Editor control via MCP - Execute ANY Unity API code with execute_csharp, manage scenes, automate testing, and monitor console. 8 essential tools with unlimited flexibility.

Readme

Unity MCP

🎮 Control Unity Editor • ⚡ Real-time automation • 🚀 AI-powered workflows

npm MCP Server MIT GitHub Sponsors Discord Report Bug GitHub Stars

✨ What It Does

Unity MCP provides real-time control of Unity Editor through the Model Context Protocol, allowing you to:

| Feature | Description | |:---------|:-------------| | Editor Control | Select, move, rotate, and scale objects with natural language | | Batch Operations | Align, distribute, duplicate objects with undo support | | Automated Testing | Enter play mode and run test scenarios programmatically | | Scene Management | Load, save, inspect scene hierarchy in real-time |

🚀 Quick Setup

📋 Prerequisites


📥 Installation

Option 1: Claude Code (Recommended)

claude mcp add @spark-apps/unity-mcp

Option 2: Manual Installation

npm i -g @spark-apps/unity-mcp

Then add to your MCP client config:

  • Windows %APPDATA%\\Claude\\claude_desktop_config.json
  • macOS ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "unity-mcp": {"command": "npx", "args": ["-y", "@spark-apps/unity-mcp"]}
  }
}

Restart your MCP client after installation.


🎮 Unity Editor Integration

Why is this needed? Unity MCP installs C# editor scripts into your Unity project that create an HTTP server on port 8080. The MCP tools communicate with Unity through this server.

Setup Steps:

  1. Open your MCP client (e.g., Claude Desktop or Claude Code)
  2. Tell Claude:
    Setup Unity MCP in my project at /path/to/unity/project
  3. This installs 4 C# scripts to Assets/Editor/UnityMCP/:
    • MCPEditorServer.cs - HTTP server
    • EditorCommandHandler.cs - Command processor with undo support
    • PlayModeHandler.cs - Play mode automation
    • SceneHandler.cs - Scene operations
  4. Restart Unity Editor
  5. Verify in Console: [Unity MCP] Server started on port 8080

Done! The MCP tools can now control Unity Editor via HTTP.


🛠️ Available Tools

Safe Operations (Read-only) | Tool | Description | |:------|:-------------| | Setup Unity MCP | Install editor integration into Unity project | | Select Objects | Select by name, tag, or pattern with framing | | Find Objects | Find by component type or pattern | | List Scenes | List all scenes in build settings | | Get Hierarchy | Get complete scene hierarchy | | Find In Scene | Find objects in current scene | | Play Mode Status | Get play mode status and logs |

Modifications (With Undo Support) | Tool | Description | |:------|:-------------| | Transform Objects | Move, rotate, scale objects | | Align Objects | Align left/right/top/bottom/center | | Distribute Objects | Distribute evenly along axis | | Duplicate Objects | Clone objects with undo support | | Enter Play Mode | Start play mode programmatically | | Exit Play Mode | Exit play mode programmatically | | Run Test | Execute automated test scenarios | | Set Time Scale | Slow motion or fast forward | | Load Scene | Load scene by name or index | | Save Scene | Save current or all scenes |

Destructive Operations (Use with Caution) | Tool | Description | |:------|:-------------| | Delete Objects | Delete objects with undo support | | Cleanup Scene | Remove missing scripts and empty objects |


💬 Example Commands

  • "Select all objects with tag 'Enemy' and align them horizontally"
  • "Move the Player object to position (0, 5, 10)"
  • "Distribute selected objects evenly along the x axis"
  • "Find all objects with Camera component"
  • "Duplicate selected object 5 times"
  • "Enter play mode and move Player to (10, 0, 0) for 5 seconds"
  • "Set time scale to 0.5 for slow motion"
  • "Run a test that destroys the Boss after 2 seconds"
  • "Check play mode status and show test logs"
  • "List all scenes in the project"
  • "Load the MainMenu scene"
  • "Show me the complete hierarchy of the current scene"
  • "Find all objects with Rigidbody component"
  • "Clean up scene by removing missing scripts"

🐛 Troubleshooting

MCP Server Not Showing:

  1. Verify Node.js is installed: node --version
  2. Check config file path is correct
  3. Ensure JSON syntax is valid
  4. Restart MCP client completely

Unity Editor Not Responding:

  1. Ensure Unity Editor is open
  2. Check Assets/Editor/UnityMCP/ scripts are installed
  3. Verify Console for [Unity MCP] Server started on port 8080
  4. Check no errors in Unity Console

Port Already in Use:

  1. Default port is 8080
  2. Check what's using it: lsof -i :8080 (Mac/Linux) or netstat -ano | findstr :8080 (Windows)
  3. Stop conflicting process or change port in Unity scripts

📖 Documentation


🤝 Contributing

Contributions welcome! Focus areas:

  • ✅ Editor manipulation and automation
  • ✅ Testing workflows
  • ✅ Scene management
  • ✅ Bug fixes and improvements

Not in scope: Code generation (use context7 MCP instead)


📝 License

MIT © Muammar Yacoob


🌟 If Unity MCP saves you time, show some love!

Star on GitHub Sponsor

Built with ❤️ for game developers who want to automate repetitive tasks