- Add nl-unity-suite-full-additive.md: new additive test design that builds state progressively instead of requiring resets
- Update claude-nl-suite.yml workflow to use additive test suite
- Fix validation scoping bugs in ManageScript.cs:
- Correct scoped validation scope calculation (was using newText.Length instead of originalLength)
- Enable always-on final structural validation regardless of relaxed mode
- Unify regex_replace and anchor_insert to use same smart matching logic in manage_script_edits.py
- Additive tests demonstrate better real-world workflow testing and expose interaction bugs between operations
- Self-healing capability: tools can recover from and fix broken file states
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Change from fail-fast to collect-and-continue at component iteration level
- Previously: first component error would halt processing of remaining components
- Now: all components are processed, errors collected and returned together
- Maintain existing collect-and-continue behavior within individual components
- Add comprehensive tests validating the collect-and-continue behavior works correctly
- All valid properties are applied even when invalid ones fail
- Processing continues through exceptions with proper error aggregation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Performance & Quality Improvements:
- Add shared JsonSerializer to eliminate per-call allocation overhead
- Optimize ComponentResolver with CacheByName for short-name lookups
- Deduplicate Vector3 parsing implementations to reduce maintenance burden
- Improve property name normalization for better fuzzy matching quality
- Reduce log noise by avoiding duplicate component resolution warnings
Code Quality:
- Keep using static import for ComponentResolver (CodeRabbit was incorrect about this)
- Normalize property names consistently in AI suggestions algorithm
- Remove duplicate ParseVector3 implementation
TestAsmdef Fix:
- Revert TestAsmdef back to runtime-compatible (remove "includePlatforms": ["Editor"])
- CustomComponent now works correctly for asmdef testing as originally intended
- Validates that ComponentResolver properly handles both short and FQN for asmdef components
Live Testing Validation:
- All ComponentResolver functionality verified through live MCP connection
- AI property matching working perfectly with natural language input
- Assembly definition support fully functional for both default and custom assemblies
- Error handling provides helpful suggestions and complete context
All 45 C# tests + 31 Python tests still passing. Production ready!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Critical Bug Fixes:
- Fix operator precedence bug in ManageAsset.cs that could cause null reference exceptions
- Fix GameObject memory leak in primitive creation when name validation fails
- Add proper cleanup with DestroyImmediate when primitive creation fails
ComponentResolver Integration:
- Replace fragile string-based GetComponent() calls with robust ComponentResolver
- Add ComponentResolver integration in ManageAsset.cs for component lookups
- Add fallback to string-based lookup in ManageGameObject.cs for compatibility
Enhanced Error Handling:
- Surface specific ComponentResolver error context in ScriptableObject creation failures
- Add support for setting private [SerializeField] fields in property matching
- Improve debugging with detailed error messages
Assembly Definition Fixes:
- Configure TestAsmdef as Editor-only to prevent build bloat
- Add explicit TestAsmdef reference to test assembly for proper component resolution
- Fix ComponentResolverTests to use accessible CustomComponent instead of TicTacToe3D
Code Quality:
- Disable nullable reference types for legacy codebase to eliminate 100+ warnings
- Maintain backward compatibility while improving reliability
All 45 unit tests pass, ensuring no regressions while significantly improving robustness.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add intelligent property name suggestions when property setting fails
- Implement GetAllComponentProperties to enumerate available properties
- Add rule-based AI algorithm for property name matching (camelCase, spaces, etc.)
- Include comprehensive error messages with suggestions and full property lists
- Add Levenshtein distance calculation for fuzzy string matching
- Cache suggestions to improve performance on repeated queries
- Add comprehensive unit tests (11 tests) covering all ComponentResolver scenarios
- Add InternalsVisibleTo attribute for test access to internal classes
Examples of improved error messages:
- "Max Reach Distance" → "Did you mean: maxReachDistance?"
- Shows all available properties when property not found
- Handles Unity Inspector display names vs actual field names
All tests passing (21/21) including new ComponentResolver test suite.
The system eliminates silent property setting failures and provides
actionable feedback to developers.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace Assembly.LoadFrom with already-loaded assembly search
- Prioritize Player assemblies over Editor assemblies using CompilationPipeline
- Support both short names and fully-qualified component names
- Add comprehensive caching and error handling with disambiguation
- Use Undo.AddComponent for proper editor integration
- Handle ReflectionTypeLoadException safely during type enumeration
- Add fallback to TypeCache for comprehensive type discovery in Editor
Fixes component resolution across custom assembly definitions and eliminates
"Could not load the file 'Assembly-CSharp-Editor'" errors.
Tested with:
- Built-in Unity components (Rigidbody, MeshRenderer, AudioSource)
- Custom user scripts in Assembly-CSharp (TicTacToe3D)
- Custom assembly definition components (TestNamespace.CustomComponent)
- Error handling for non-existent components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Move the current test to a Tools folder
* feat: add env object and disabled flag handling for MCP client configuration
* Format manual config specially for Windsurf and Kiro
* refactor: extract config JSON building logic into dedicated ConfigJsonBuilder class
* refactor: extract unity node population logic into centralized helper method
* refactor: only add env property to config for Windsurf and Kiro clients
If it ain't broke with the other clients, don't fix...
* fix: write UTF-8 without BOM encoding for config files to avoid Windows compatibility issues
* fix: enforce UTF-8 encoding without BOM when writing files to disk
* refactor: rename namespace from UnityMcpBridge to MCPForUnity across all files
See thread in #6, we can't use Unity MCP because it violates their trademark.
That name makes us look affiliated. We can use MCP for Unity
* Change package display name, menu item and menu titles
These are front facing so has to change for Unity asset store review
* Misc name changes in logs and comments for better consistency
* chore: update editor window title from 'MCP Editor' to 'MCP for Unity'
* refactor: update branding from UNITY-MCP to MCP-FOR-UNITY across all log messages and warnings
* chore: rename Unity MCP to MCP For Unity across all files and bump version to 2.1.2
* docs: update restore script title to clarify Unity MCP naming
* Fix usage instructions
* chore: update log messages to use MCP For Unity branding instead of UnityMCP
* Add a README inside plugin, required for distributing via the asset store
* docs: update Unity port description and fix typo in troubleshooting section
* Address Rabbit feedback
* Update Editor prefs to use new name
Prevents overlap with other Unity MCPs, happy to revert if it's too much
* refactor: rename server logger and identifier from unity-mcp-server to mcp-for-unity-server
* Standardize casing of renamed project to "MCP for Unity", as it is on the asset store
* Remove unused folder
* refactor: rename Unity MCP to MCP for Unity across codebase
* Update dangling references
* docs: update product name from UnityMCP to MCP for Unity in README
* Update log and comments for new name
- Detect explicit Debug.Log in stacktrace (UnityEngine.Debug:Log)
- Do not downgrade/upgrade to Warning via mode bits for editor-originated logs
- Keeps informational setup lines (e.g., MCP registration, bridge start) as Log
- Classify severity via stacktrace/message first (LogError/LogWarning/Exception/Assertion), with safe fallback to mode-bit mapping
- Fix error/warning/log mapping; treat Exception/Assert as errors for filtering
- Return the current console buffer reliably and remove debug spam
- No changes outside ReadConsole behavior
1. Update the code validation feature. With Roslyn installed(see guide), MCP clients will receive detailed error messages and making the code generation process more error-proof
2. Minor update to the EditorWindow, making more space for upcoming features
3. Readme update to include Code validation guides
4. Minor bug fixes including installation bugs from previous VSC PR
Add support for creating physics material assets. Works on Unity 2022 onwards and Unity 6, since they use different naming for PhysicsMaterial(PhysicMaterial before Unity 6, and PhysicsMaterial after).
Add naming examples on the server side
TODO: currently unity-mcp only support adding gameobject and specifying adding a physic material, and manage_gameobject.cs does not handle a detailed request such as the copied request well. Will be the future work.
Example:
{
`name`: `BouncyCube`,
`action`: `create`,
`position`: [
6,
2,
0
],
`primitive_type`: `Cube`,
`components_to_add`: [
`Rigidbody`
],
`component_properties`: {
`Rigidbody`: {
`mass`: 1,
`useGravity`: true
},
`BoxCollider`: {
`material`: `Assets/Physics Materials/SuperBouncePhysicsMaterial.physicmaterial`
}
}
}
1. Solve the IDE/Unity miscommunication for the _Color and menuPath params
2. TODOs: Fix readme, look into more issues, bring back tool dev tutorial, view pull request and set a future roadmap
The Unity Editor was crashing with ValidTRS() assertions when attempting to get components from certain GameObjects like the Main Camera.
Investigation revealed the crash occurred during JSON serialization when reflection code accessed specific matrix properties (e.g., Camera.cullingMatrix, Transform.rotation, Transform.lossyScale). Accessing these properties appears to trigger internal Transform state validation failures, potentially due to interactions with the JSON serializer's reflection mechanism.
This fix addresses the issue by:
- Replacing LINQ iteration in GetComponentsFromTarget with a standard loop over a copied list to prevent potential premature serialization interactions.
- Explicitly skipping known problematic Camera matrix properties (cullingMatrix, pixelRect, rect) and generic matrix properties (worldToLocalMatrix, localToWorldMatrix) within GetComponentData's reflection logic.
- Retaining manual serialization for Transform component properties to avoid related reflection issues.
Moved serialization logic (GetGameObjectData, GetComponentData, metadata caching, JSON conversion helpers) from ManageGameObject tool to a dedicated GameObjectSerializer class in the Helpers namespace.
This improves separation of concerns and reduces the size/complexity of ManageGameObject.cs. Updated ManageGameObject to use the new helper class.