Problem
MCP server tool execution is hardcoded to a 30s timeout (per-server timeout: 30s per mcporter list). This is insufficient for local stdio MCP servers that call external APIs (e.g., Z.AI Vision MCP server calling GLM-4.6V for image analysis takes 45-90s).
The --timeout <ms> flag exists on mcporter call but there is no way to set this at the config level (mcporter.json or opencode's mcp config).
OpenCode's mcp.<server>.timeout field only controls tool discovery (default 5s), not tool execution.
Reproduction
// opencode.json
{
"mcp": {
"zai-mcp-server": {
"type": "local",
"command": ["npx", "-y", "@z_ai/mcp-server"],
"environment": { "Z_AI_API_KEY": "...", "Z_AI_MODE": "ZAI" },
"timeout": 120000 // only affects tool discovery, NOT execution
}
}
}
Running vision analysis via opencode consistently times out at ~30s, but succeeds when called directly:
mcporter call zai-mcp-server.analyze_image --timeout 90000 --args '{"image_source":"/path/to/image.png","prompt":"describe this"}'
Proposed Fix
Add a per-server executionTimeout (or similar) field to both:
mcporter.json — mcpServers.<name>.timeout for execution timeout
- opencode.json —
mcp.<server>.executionTimeout that gets passed through to mcporter
Example:
{
"mcp": {
"zai-mcp-server": {
"type": "local",
"command": ["npx", "-y", "@z_ai/mcp-server"],
"environment": { "Z_AI_API_KEY": "...", "Z_AI_MODE": "ZAI" },
"timeout": 120000,
"executionTimeout": 120000
}
}
}
Environment
- mcporter: 0.7.3
- opencode: latest
- macOS Darwin
- Node.js v22+
Problem
MCP server tool execution is hardcoded to a 30s timeout (
per-server timeout: 30spermcporter list). This is insufficient for local stdio MCP servers that call external APIs (e.g., Z.AI Vision MCP server calling GLM-4.6V for image analysis takes 45-90s).The
--timeout <ms>flag exists onmcporter callbut there is no way to set this at the config level (mcporter.jsonor opencode'smcpconfig).OpenCode's
mcp.<server>.timeoutfield only controls tool discovery (default 5s), not tool execution.Reproduction
Running vision analysis via opencode consistently times out at ~30s, but succeeds when called directly:
mcporter call zai-mcp-server.analyze_image --timeout 90000 --args '{"image_source":"/path/to/image.png","prompt":"describe this"}'Proposed Fix
Add a per-server
executionTimeout(or similar) field to both:mcporter.json—mcpServers.<name>.timeoutfor execution timeoutmcp.<server>.executionTimeoutthat gets passed through to mcporterExample:
{ "mcp": { "zai-mcp-server": { "type": "local", "command": ["npx", "-y", "@z_ai/mcp-server"], "environment": { "Z_AI_API_KEY": "...", "Z_AI_MODE": "ZAI" }, "timeout": 120000, "executionTimeout": 120000 } } }Environment