Skip to content

Commit 010bc7a

Browse files
committed
generate code
1 parent 7e2dd54 commit 010bc7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/internal/gen/request_handler.go.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ func (s *MCPServer) HandleMessage(
5555
}
5656
s.handleNotification(ctx, notification)
5757
return nil // Return nil for notifications
58-
}
58+
} else {
59+
ctx = context.WithValue(ctx, requestIDKey{}, mcp.NewRequestId(baseMessage.ID))
60+
}
5961

6062
if baseMessage.Result != nil {
6163
// this is a response to a request sent by the server (e.g. from a ping

0 commit comments

Comments
 (0)