You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module provides hooking mechanisms for the `StreamableHTTP` and `SSE` servers requests handling.
530
+
531
+
### StreamableHTTP server hooks
532
+
533
+
This module offers the possibility to provide context hooks with [MCPStreamableHTTPServerContextHook](https://github.com/ankorstore/yokai/blob/main/fxmcpserver/server/stream/context.go) implementations, that will be applied on each MCP StreamableHTTP request.
534
+
535
+
For example, an MCP StreamableHTTP server context hook that adds a config value to the context:
The dependencies of your MCP StreamableHTTP server context hooks will be autowired.
590
+
591
+
### SSE server hooks
592
+
522
593
This module offers the possibility to provide context hooks with [MCPSSEServerContextHook](https://github.com/ankorstore/yokai/blob/main/fxmcpserver/server/sse/context.go) implementations, that will be applied on each MCP SSE request.
523
594
524
595
For example, an MCP SSE server context hook that adds a config value to the context:
@@ -568,7 +639,7 @@ import (
568
639
569
640
func Register() fx.Option {
570
641
return fx.Options(
571
-
// registers ReadmeResource as MCP resource
642
+
// registers ExampleHook as MCP SSE server context hook
This module provides a [MCPSSETestServer](https://github.com/ankorstore/yokai/blob/main/fxmcpserver/fxmcpservertest/server.go) to enable you to easily test your exposed MCP registrations.
758
+
This module provide `StreamableHTTP` and `SSE` test servers, to functionally test your applications.
759
+
760
+
### StreamableHTTP test server
761
+
762
+
This module provides a [MCPStreamableHTTPTestServer](https://github.com/ankorstore/yokai/blob/main/fxmcpserver/fxmcpservertest/stream.go) to enable you to easily test your exposed MCP registrations.
763
+
764
+
From this server, you can create a ready to use client via `StartClient()` to perform MCP requests, to functionally test your MCP server.
This module provides a [MCPSSETestServer](https://github.com/ankorstore/yokai/blob/main/fxmcpserver/fxmcpservertest/sse.go) to enable you to easily test your exposed MCP registrations.
688
850
689
851
From this server, you can create a ready to use client via `StartClient()` to perform MCP requests, to functionally test your MCP server.
0 commit comments