Skip to content

Commit 119bd6c

Browse files
authored
feat(fxmcpserver): Updated SSE test client (#342)
1 parent 50eae94 commit 119bd6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fxmcpserver/fxmcpservertest/server.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ func (s *MCPSSETestServer) Close() {
3131
}
3232

3333
func (s *MCPSSETestServer) StartClient(ctx context.Context, options ...transport.ClientOption) (*client.Client, error) {
34-
baseURL := s.testServer.URL + s.config.GetString("modules.mcp.server.transport.sse.sse_endpoint")
34+
sseEndpoint := s.config.GetString("modules.mcp.server.transport.sse.sse_endpoint")
35+
if sseEndpoint == "" {
36+
sseEndpoint = sse.DefaultSSEEndpoint
37+
}
38+
39+
baseURL := s.testServer.URL + sseEndpoint
3540

3641
cli, err := client.NewSSEMCPClient(baseURL, options...)
3742
if err != nil {

0 commit comments

Comments
 (0)