@@ -238,35 +238,50 @@ By default, the WebSocket server runs on port 8090. You can change this port in
238238
239239## Optional: Set Timeout
240240
241- ### WebSocket Timeout
242-
243241By default, the timeout between the MCP server and the WebSocket is 10 seconds.
244- You can specify it as an environment variable ` UNITY_REQUEST_TIMEOUT ` in your MCP configuration file as follows :
242+ You can change depending on the OS you are using :
245243
246- ``` json
247- {
248- "mcpServers" : {
249- "mcp-unity" : {
250- "command" : " node" ,
251- "args" : [
252- " ABSOLUTE/PATH/TO/mcp-unity/Server/build/index.js"
253- ],
254- "env" : {
255- "UNITY_PORT" : " 8090" ,
256- "UNITY_REQUEST_TIMEOUT" : " 300"
257- }
258- }
259- }
260- }
261- ```
244+ <details >
245+ <summary ><span style =" font-size : 1.1em ; font-weight : bold ;" >Option 1: Windows OS</span ></summary >
262246
263- > [ !TIP]
264- > The timeout between your AI Coding IDE (e.g., Claude Desktop, Cursor IDE, Windsurf IDE) and the MCP Server depends on the AI coding IDE.
247+ 1 . Open the Unity Editor
248+ 2 . Navigate to Tools > MCP Unity > Server Window
249+ 3 . Change the "Request Timeout (seconds)" value to your desired timeout seconds
250+ 4 . Unity will setup the system environment variable UNITY_REQUEST_TIMEOUT to the new timeout value
251+ 5 . Restart the Node.js server
252+ 6 . Click again on "Start Server" to reconnect the Unity Editor web socket to the Node.js MCP Server
253+
254+ </details >
255+
256+ <details >
257+ <summary ><span style =" font-size : 1.1em ; font-weight : bold ;" >Option 2: Non-Windows OS</span ></summary >
265258
266- ### Test Execution Timeout
259+ For non-Windows OS, you need to configure two places:
267260
268- By default, the execution timeout for the ` run_tests ` tool in the Unity editor is 60 seconds.
269- You can specify it in ** Test Timeout (seconds)** in the ** Tools > MCP Unity > Server Window** .
261+ ### In Editor Process Timeout
262+
263+ 1 . Open the Unity Editor
264+ 2 . Navigate to Tools > MCP Unity > Server Window
265+ 3 . Change the "Request Timeout (seconds)" value to your desired timeout seconds
266+
267+ ### WebSocket Timeout
268+
269+ 1 . Set the UNITY_REQUEST_TIMEOUT environment variable in the terminal
270+ - Powershell
271+ ``` powershell
272+ $env:UNITY_REQUEST_TIMEOUT = "300"
273+ ```
274+ - Command Prompt/Terminal
275+ ``` cmd
276+ set UNITY_REQUEST_TIMEOUT=300
277+ ```
278+ 2 . Restart the Node.js server
279+ 3 . Click again on "Start Server" to reconnect the Unity Editor web socket to the Node.js MCP Server
280+
281+ </details >
282+
283+ > [ !TIP]
284+ > The timeout between your AI Coding IDE (e.g., Claude Desktop, Cursor IDE, Windsurf IDE) and the MCP Server depends on the IDE.
270285
271286## <a name =" debug-server " ></a >Debugging the Server
272287
0 commit comments