Skip to content

Commit 896d381

Browse files
committed
Remove redundant ssebaseurl parameter from http
1 parent 16edf44 commit 896d381

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/http/http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/manusa/kubernetes-mcp-server/pkg/mcp"
1717
)
1818

19-
func Serve(ctx context.Context, mcpServer *mcp.Server, staticConfig *config.StaticConfig, sseBaseUrl string) error {
19+
func Serve(ctx context.Context, mcpServer *mcp.Server, staticConfig *config.StaticConfig) error {
2020
mux := http.NewServeMux()
2121

2222
wrappedMux := RequestMiddleware(
@@ -28,7 +28,7 @@ func Serve(ctx context.Context, mcpServer *mcp.Server, staticConfig *config.Stat
2828
Handler: wrappedMux,
2929
}
3030

31-
sseServer := mcpServer.ServeSse(sseBaseUrl, httpServer)
31+
sseServer := mcpServer.ServeSse(staticConfig.SSEBaseURL, httpServer)
3232
streamableHttpServer := mcpServer.ServeHTTP(httpServer)
3333
mux.Handle("/sse", sseServer)
3434
mux.Handle("/message", sseServer)

pkg/kubernetes-mcp-server/cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func (m *MCPServerOptions) Run() error {
247247

248248
if m.StaticConfig.Port != "" {
249249
ctx := context.Background()
250-
return internalhttp.Serve(ctx, mcpServer, m.StaticConfig, m.SSEBaseUrl)
250+
return internalhttp.Serve(ctx, mcpServer, m.StaticConfig)
251251
}
252252

253253
if err := mcpServer.ServeStdio(); err != nil && !errors.Is(err, context.Canceled) {

0 commit comments

Comments
 (0)