Just looking for some advice... Ive followed the sample code and have both client and server. The server connects and seems fine. The client never connects and the line let result = try await client.connect(transport: transport) never moves past the await. Is there something painfully obvious I'm missing? TIA
Activity
below commentedon Nov 25, 2025
I have a working server here. The trick seems to be that you have to keep the server running:
// Keep running until external cancellation try await Task.sleep(for: .seconds(60 * 60 * 24 * 365 * 100)) // Effectively foreverjeanmatthieu commentedon Dec 5, 2026
Two things on
rel/1.0.0(#372) address this:start(transport:)by awaitingtry await server.waitUntilFinished()(shown indocs/quick_start.md#a-stdio-serverandExamples/hello-server, [P10] docs: go-sdk layout, feature guides, design notes and process docs #362).initialize/server/discovercompletes,client.connect(transport:)now throwsMCPError.connectionClosedinstead of hanging forever ([P11] fix: request lifecycle, server replies, OAuth hardening #360).General client connect/request timeouts remain tracked in #93. Closing this issue as resolved.