You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are the error messages on the claude side? Can you show us the error response message from the claude side? (if you open the tool window you will see some json messages).
If you could point me in the direction of the Tool window. I'm using the desktop app and I'm not seeing a Tool window.
I do see "Response" messages after each failed script edit attempt. I'll try to keep this comment to just the "responses". I can post the actual attempts at editing the scripts if necessary:
Error executing tool manage_script: 4 validation errors for manage_scriptArguments path Field required [type=missing, input_value={'action': 'update', 'nam...e();\n }\n }'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing contents
Note: The 4 error validation error messages are very similar to each other. One mentions contents, another namespace and another script_type. I can provide all four in full if needed.
{"success": false, "message": "Content is required for the 'update' action."}
Note: Response 3 is really long. I can provide the full thing if necessary.
{"success": false, "message": "Python error managing script: Failed to communicate with Unity: Invalid JSON format"}
That's the sequence of responses from the first attempt at editing a script.
Then Claude tries to rewrite the entire method it was trying to edit in the first place. Fails then tries to rewrite the entire script, which also fails. Can provide the responses from the method/entire script rewrite too if necessary.
@samueltpark. Can you try again using the just-released 2.0.0 version of the MCP, which has major improvements to setup and mcp bridge/server configuration and stability. You should reinstall the package in Unity because there's a new package name and address.
1. Open your Unity project.
2. Go to Window > Package Manager.
2. Click + -> Add package from git URL....
Enter:
https://github.com/CoplayDev/unity-mcp.git?path=/UnityMcpBridge
@dsarno Its purely for convenience and speed. MCP Claude can examine parts of your Unity project beyond just scripts so I've noticed it comes up with code that works well for your specific project rather than code that would generally work for most hypothetical projects. So fewer iterations to get your desired result.
Its something that nobody would want you guys to toil over with little benefit. It would just be more convenient.
Edit: Ill get to the MCP error messages as soon as I can.
@samueltpark thanks for your thoughtful response. I think I'm a little immersed in the world of Cursor, Windsurf and Claude Code, which can be more focused on script editing so don't need to rely on mcp for that. But for Claude Desktop I can see the utility. Let us take a crack at a simple system to allow parsing of longer files and see if that helps. Thanks!
@dsarno@samueltpark I'm getting the same error with Claude Desktop when the changes are too big. I just tell Claude to separate the changes in smaller chunks and it works normally, but it is a bit cumbersome. I'm using v2.0.1.
Activity
Scriptwonder commentedon Aug 1, 2025
What are the error messages on the claude side? Can you show us the error response message from the claude side? (if you open the tool window you will see some json messages).
samueltpark commentedon Aug 1, 2025
If you could point me in the direction of the Tool window. I'm using the desktop app and I'm not seeing a Tool window.
I do see "Response" messages after each failed script edit attempt. I'll try to keep this comment to just the "responses". I can post the actual attempts at editing the scripts if necessary:
Error executing tool manage_script: 4 validation errors for manage_scriptArguments path Field required [type=missing, input_value={'action': 'update', 'nam...e();\n }\n }'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing contentsNote: The 4 error validation error messages are very similar to each other. One mentions contents, another namespace and another script_type. I can provide all four in full if needed.
{"success": false, "message": "Content is required for the 'update' action."}Starts like:
{"success": true, "message": "Script 'PlayerController.cs' read successfully.", "data": {"path": "Assets/Scripts/PlayerController.cs", "contents": "using UnityEngine;\r\nusing UnityEngine.InputSystem;\r\n\r\npublic class PlayerController : MonoBehaviour\r\n{\r\n public UnitStats stats;\r\n public float moveSpeed;\r\nEnds like:
{\r\n if (context.performed && turnManager != null)\r\n {\r\n turnManager.EndTurn();\r\n }\r\n }\r\n}", "encodedContents": null, "contentsEncoded": false}}Note: Response 3 is really long. I can provide the full thing if necessary.
{"success": false, "message": "Python error managing script: Failed to communicate with Unity: Invalid JSON format"}That's the sequence of responses from the first attempt at editing a script.
Then Claude tries to rewrite the entire method it was trying to edit in the first place. Fails then tries to rewrite the entire script, which also fails. Can provide the responses from the method/entire script rewrite too if necessary.
dsarno commentedon Aug 11, 2025
@samueltpark. Can you try again using the just-released
2.0.0version of the MCP, which has major improvements to setup and mcp bridge/server configuration and stability. You should reinstall the package in Unity because there's a new package name and address.samueltpark commentedon Aug 12, 2025
@dsarno Thanks for the update. Running into similar issues when trying to edit scripts.
I get this log in the Unity console when trying to edit a 400 line script:
dsarno commentedon Aug 12, 2025
@samueltpark thanks for the update. Can you paste in the mcp response message you get during this error? Is it similar to those in comments above?
Thanks!
Note to self this seems same as #136
samueltpark commentedon Aug 12, 2025
@dsarno Its purely for convenience and speed. MCP Claude can examine parts of your Unity project beyond just scripts so I've noticed it comes up with code that works well for your specific project rather than code that would generally work for most hypothetical projects. So fewer iterations to get your desired result.
Its something that nobody would want you guys to toil over with little benefit. It would just be more convenient.
Edit: Ill get to the MCP error messages as soon as I can.
dsarno commentedon Aug 12, 2025
@samueltpark thanks for your thoughtful response. I think I'm a little immersed in the world of Cursor, Windsurf and Claude Code, which can be more focused on script editing so don't need to rely on mcp for that. But for Claude Desktop I can see the utility. Let us take a crack at a simple system to allow parsing of longer files and see if that helps. Thanks!
laurogripa commentedon Aug 14, 2025
@dsarno @samueltpark I'm getting the same error with Claude Desktop when the changes are too big. I just tell Claude to separate the changes in smaller chunks and it works normally, but it is a bit cumbersome. I'm using v2.0.1.
dsarno commentedon Aug 30, 2025
Should be fixed in 3.1.0. Please let us know if you see an improved experience.