@anyshift/mcp-proxy 0.6.4 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -181,6 +181,12 @@ const MIN_CHARS_FOR_WRITE = parseInt(process.env.MCP_PROXY_MIN_CHARS_FOR_WRITE |
|
|
|
181
181
|
* The JQ tool is added to the list of available tools from the child MCP
|
|
182
182
|
*/
|
|
183
183
|
const ENABLE_JQ = process.env.MCP_PROXY_ENABLE_JQ !== 'false'; // default true
|
|
184
|
+
/**
|
|
185
|
+
* MCP_PROXY_REQUEST_TIMEOUT_MS (OPTIONAL, default: 60000)
|
|
186
|
+
* Timeout in milliseconds for requests forwarded to the child/remote MCP server.
|
|
187
|
+
* Increase for long-running tools (e.g. agent-gateway's analyze_code).
|
|
188
|
+
*/
|
|
189
|
+
const REQUEST_TIMEOUT_MS = parseInt(process.env.MCP_PROXY_REQUEST_TIMEOUT_MS || '60000');
|
|
184
190
|
/**
|
|
185
191
|
* MCP_PROXY_JQ_TIMEOUT_MS (OPTIONAL, default: 30000)
|
|
186
192
|
* Timeout in milliseconds for JQ query execution
|
|
@@ -703,6 +709,8 @@ async function main() {
|
|
|
703
709
|
result = await childClient.callTool({
|
|
704
710
|
name: toolName,
|
|
705
711
|
arguments: sanitizedArgs
|
|
712
|
+
}, undefined, {
|
|
713
|
+
timeout: REQUEST_TIMEOUT_MS
|
|
706
714
|
});
|
|
707
715
|
// Check if child MCP returned an error
|
|
708
716
|
const childReturnedError = !!result.isError;
|