FEATURE: Add MCP support for Flow's request handling cycle#3536
FEATURE: Add MCP support for Flow's request handling cycle#3536
Conversation
kdambekalns
left a comment
There was a problem hiding this comment.
To be honest: The explanation does not explain why this is needed. Could you elaborate on that a bit more?
Maybe even in a way that is more generic? Because, why should we do this only for MCP? Surely it's not MCP-specific?
|
Converting to draft as there are more things to be considered as well. As far as I understood it, the mcp/sdk server uses the request body in a way that also supports streaming, meaning it cannot consume an already resolved request body. My interpretation (not knowledge) would be that this affects everything of (potential) content-type "text/event-stream", whether MCP or not. I'm not exactly sure whether this belongs on framework level as I can do the rewind in my MCP base controller as well with the same working result. |
|
I've managed to get streaming working with our base MCP controller (see https://github.com/sitegeist/Sitegeist.Pandora). The handling of "text/event-stream" must imho be done by Flow's request handler (we currently use a custom one). I'd like to discuss a possible implementation (it might be enough to just check the response content type) and target version. As this is a new feature, I guess it would go to 9.2? |
This adjusts the RequestBodyParsingMiddleware so that the request body can be processed by an MCP server.
Upgrade instructions
none
Review instructions
this should not have any side effects on anything, but I'm not sure
Checklist
FEATURE|TASK|BUGFIX!!!and have upgrade-instructions