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
Copy file name to clipboardExpand all lines: doc/configuration.md
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ All options are optional with sensible defaults. See below for each option in de
20
20
port=37373, -- The port `mcp-hub` server listens to
21
21
shutdown_delay=60*10*000, -- Delay in ms before shutting down the server when last instance closes (default: 10 minutes)
22
22
use_bundled_binary=false, -- Use local `mcp-hub` binary (set this to true when using build = "bundled_build.lua")
23
+
mcp_request_timeout=60000, --Max time allowed for a MCP tool or resource to execute in milliseconds, set longer for long running tasks
23
24
24
25
---Chat-plugin related options-----------------
25
26
auto_approve=false, -- Auto approve mcp tool calls
@@ -107,6 +108,13 @@ Default: `false`
107
108
108
109
Uses local `mcp-hub` binary. Enable this when using `build = "bundled_build.lua"` in your plugin configuration.
109
110
111
+
112
+
### mcp_request_timeout
113
+
114
+
Default: 60000 (1 minute)
115
+
116
+
Maximum time allowed for a MCP tool or resource or prompt to execute in milliseconds. If exceeded, an McpError with code `RequestTimeout` will be raised. Set longer if you have longer running tools.
Copy file name to clipboardExpand all lines: lua/mcphub/config.lua
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ local defaults = {
8
8
server_url=nil, -- In cases where mcp-hub is hosted somewhere, set this to the server URL e.g `http://mydomain.com:customport` or `https://url_without_need_for_port.com`
@@ -164,7 +168,7 @@ function MCPHub:check_server(callback)
164
168
end
165
169
-- Quick health check
166
170
localopts= {
167
-
timeout=QUICK_TIMEOUT,
171
+
timeout=3000,
168
172
skip_ready_check=true,
169
173
}
170
174
@@ -336,7 +340,7 @@ end
336
340
--- @paramserver_namestring
337
341
--- @paramprompt_namestring
338
342
--- @paramargstable
339
-
--- @paramopts?{parse_response?: boolean, callback?: function, timeout?: number } Optional callback(response: table|nil, error?: string) and timeout in ms (default 30s)
343
+
--- @paramopts?{parse_response?: boolean, callback?: fun(res: MCPResponseOutput? ,err: string?), request_options?: MCPRequestOptions, timeout?: number } Optional callback(response: table|nil, error?: string) and timeout in ms (default 60s)
340
344
--- @return{messages : {role:"user"| "assistant"|"system", output: MCPResponseOutput}[]}|nil, string|nil If no callback is provided, returns response and error
--- @paramopts?{parse_response?: boolean, callback?: fun(res: MCPResponseOutput?,err:string?), timeout?: number } Optional callback(response: table|nil, error?: string) and timeout in ms (default 30s)
509
+
--- @paramopts?{parse_response?: boolean, callback?: fun(res: MCPResponseOutput?,err:string?), request_options?: MCPRequestOptions, timeout?: number } Optional callback(response: table|nil, error?: string) and timeout in ms (default 60s)
500
510
--- @returnMCPResponseOutput?, string?If no callback is provided, returns response and error
0 commit comments