Skip to content

Commit 9cb498f

Browse files
KamToHungiFurySt
authored andcommitted
feat: handle ping request with an empty response in streamable
1 parent a89f94f commit 9cb498f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/core/streamable.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ func (s *Server) handleMCPRequest(c *gin.Context, req mcp.JSONRPCRequest, conn s
206206
case mcp.NotificationInitialized:
207207
c.Status(http.StatusAccepted)
208208
return
209-
209+
case mcp.Ping:
210+
// Handle ping request with an empty response
211+
s.sendSuccessResponse(c, conn, req, struct{}{}, false)
212+
return
210213
case mcp.ToolsList:
211214
protoType := s.state.GetProtoType(conn.Meta().Prefix)
212215
if protoType == "" {

0 commit comments

Comments
 (0)