Skip to content

"Failed to Start WebSocket Server: Socket Address Already in Use After Code Compilation in UnityEditor" #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
torsilver opened this issue May 31, 2025 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@torsilver
Copy link

When I modify the code, UnityEditor recompiles it, and then the Console reports the following error:

[MCP Unity] Failed to start WebSocket server: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。

UnityEngine.Debug:LogError (object)
McpUnity.Utils.McpLogger:LogError (string) (at ./Library/PackageCache/com.gamelovers.mcp-unity@cb4b03c1c9/Editor/Utils/Logger.cs:40)
McpUnity.Unity.McpUnityServer:StartServer () (at ./Library/PackageCache/com.gamelovers.mcp-unity@cb4b03c1c9/Editor/UnityBridge/McpUnityServer.cs:106)
McpUnity.Unity.McpUnityEditorWindow:DrawServerTab () (at ./Library/PackageCache/com.gamelovers.mcp-unity@cb4b03c1c9/Editor/UnityBridge/McpUnityEditorWindow.cs:153)
McpUnity.Unity.McpUnityEditorWindow:OnGUI () (at ./Library/PackageCache/com.gamelovers.mcp-unity@cb4b03c1c9/Editor/UnityBridge/McpUnityEditorWindow.cs:51)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Afterward, the MCP in the Cursor stops working.

@CoderGamester CoderGamester added bug Something isn't working duplicate This issue or pull request already exists labels May 31, 2025
@CoderGamester
Copy link
Owner

thank you for the report @torsilver

duplicate of:
#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants