Skip to content

Commit 438ebd5

Browse files
committed
Add about timeout settings
1 parent 96e1101 commit 438ebd5

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed

README-ja.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,38 @@ MCP Unityサーバーを起動するには2つの方法があります:
211211
node Server/build/index.js
212212
```
213213

214+
## オプション: タイムアウト設定
215+
216+
### WebSocketタイムアウト
217+
218+
デフォルトでは、MCPサーバーとWebSocket間のタイムアウトは 10 秒です。
219+
MCP構成ファイルで、次のように環境変数 `UNITY_REQUEST_TIMEOUT` として指定できます。
220+
221+
```json
222+
{
223+
"mcpServers": {
224+
"mcp-unity": {
225+
"command": "node",
226+
"args": [
227+
"ABSOLUTE/PATH/TO/mcp-unity/Server/build/index.js"
228+
],
229+
"env": {
230+
"UNITY_PORT": "8090",
231+
"UNITY_REQUEST_TIMEOUT": "300"
232+
}
233+
}
234+
}
235+
}
236+
```
237+
238+
> [!TIP]
239+
> AIコーディングIDE(Claude Desktop、Cursor IDE、Windsurf IDE など)とMCPサーバー間のタイムアウトは、AIコーディングIDEによって異なります。
240+
241+
### テスト実行タイムアウト
242+
243+
デフォルトでは、Unityエディター側の `run_tests` ツールの実行タイムアウトは 60 秒です。
244+
**Tools > MCP Unity > Server Window****Test Timeout (seconds)** で指定できます。
245+
214246
## <a name="debug-server"></a>サーバーのデバッグ
215247

216248
MCP Unityサーバーをデバッグするには、以下の方法を使用できます:

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,38 @@ By default, the WebSocket server runs on port 8090. You can change this port in
236236

237237
</details>
238238

239+
## Optional: Set Timeout
240+
241+
### WebSocket Timeout
242+
243+
By 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:
245+
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+
```
262+
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.
265+
266+
### Test Execution Timeout
267+
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**.
270+
239271
## <a name="debug-server"></a>Debugging the Server
240272

241273
<details>

README_zh-CN.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,38 @@ MCP Unity 通过将 Unity `Library/PackedCache` 文件夹添加到您的工作
213213
node Server/build/index.js
214214
```
215215

216+
## 可选:设置超时
217+
218+
### WebSocket 超时
219+
220+
默认情况下,MCP 服务器与 WebSocket 之间的超时时间为 10 秒。
221+
您可以在 MCP 配置文件中将其指定为环境变量 `UNITY_REQUEST_TIMEOUT`,如下所示:
222+
223+
```json
224+
{
225+
"mcpServers": {
226+
"mcp-unity": {
227+
"command": "node",
228+
"args": [
229+
"ABSOLUTE/PATH/TO/mcp-unity/Server/build/index.js"
230+
],
231+
"env": {
232+
"UNITY_PORT": "8090",
233+
"UNITY_REQUEST_TIMEOUT": "300"
234+
}
235+
}
236+
}
237+
}
238+
```
239+
240+
> [!TIP]
241+
> 您的 AI 编码 IDE(例如,Claude Desktop、Cursor IDE、Windsurf IDE)和 MCP 服务器之间的超时取决于 AI 编码 IDE。
242+
243+
### 测试执行超时
244+
245+
默认情况下,Unity 编辑器中 `run_tests` 工具的执行超时时间为 60 秒。
246+
您可以在 **Tools > MCP Unity > Server Window** 中的 **Test Timeout (seconds)** 中指定它。
247+
216248
## <a name="debug-server"></a>调试服务器
217249

218250
要调试 MCP Unity 服务器,您可以使用以下方法:

0 commit comments

Comments
 (0)