-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The Go MCP SDK client experiences a 60-second timeout (504 Gateway Timeout) when calling tools on the remote MCP server at mcp.on-demand.io, while the Node.js MCP SDK client successfully completes the same request in ~1 second. The issue appears to be a server-side compatibility problem with how the Go SDK's requests are processed.
To Reproduce
- Install the official Go MCP SDK:
go get github.com/modelcontextprotocol/go-sdk/mcp
- Create a Go client connecting to the remote MCP server:
client := mcp.NewClient(&mcp.Implementation{
Name: "mcp-mermaid-client",
Version: "1.0.0",
}, nil)
transport := &mcp.StreamableClientTransport{
Endpoint: "https://mcp.on-demand.io/instances/presight-mermaid-mcp/mcp?apiKey=<REDACTED>",
HTTPClient: &http.Client{Timeout: 0},
MaxRetries: 3,
}
session, err := client.Connect(ctx, transport, nil)
- Call the generate_mermaid_diagram tool:
params := &mcp.CallToolParams{
Name: "generate_mermaid_diagram",
Arguments: map[string]any{
"mermaid": "graph TD\n A-->B",
"outputType": "mermaid",
},
}
result, err := session.CallTool(ctx, params)
Expected behavior
The Go client should successfully call the generate_mermaid_diagram tool and receive the mermaid diagram response within a reasonable time (~1-2 seconds), similar to the Node.js client behavior.
Logs
2026/01/28 12:50:42 Calling generate_mermaid_diagram tool...
2026/01/28 12:50:42 Starting tool call...
2026/01/28 12:50:42 === HTTP REQUEST ===
POST /instances/presight-mermaid-mcp/mcp?apiKey=<REDACTED> HTTP/1.1
Host: mcp.on-demand.io
User-Agent: Go-http-client/1.1
Content-Length: 165
Accept: application/json, text/event-stream
Content-Type: application/json
Mcp-Protocol-Version: 2025-06-18
Accept-Encoding: gzip
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"generate_mermaid_diagram","arguments":{"mermaid":"graph TD\n A--\u003eB","outputType":"mermaid"}}}
2026/01/28 12:51:42 === HTTP RESPONSE (after 1m0.316470083s) ===
HTTP/2.0 504 Gateway Timeout
Content-Length: 102
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
Content-Type: application/json; charset=utf-8
Date: Wed, 28 Jan 2026 07:21:42 GMT
2026/01/28 12:51:42 CallTool failed after 1m0.316810209s: calling "tools/call": rejected by transport: sending "tools/call": Gateway Timeout
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working