Skip to content

FEATURE: Add MCP support for Flow's request handling cycle#3536

Draft
nezaniel wants to merge 1 commit into8.3from
mcpSupport
Draft

FEATURE: Add MCP support for Flow's request handling cycle#3536
nezaniel wants to merge 1 commit into8.3from
mcpSupport

Conversation

@nezaniel
Copy link
Copy Markdown
Member

@nezaniel nezaniel commented Feb 2, 2026

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

  • Code follows the PSR-12 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the 8.3 branch (https://www.neos.io/features/release-roadmap.html)
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

Copy link
Copy Markdown
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@nezaniel nezaniel marked this pull request as draft February 3, 2026 14:08
@nezaniel
Copy link
Copy Markdown
Member Author

nezaniel commented Feb 3, 2026

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.

@nezaniel nezaniel changed the title TASK: Rewind request body to make MCP communication possible FEATURE: Add MCP support for Flow's request handling cycle Feb 3, 2026
@nezaniel
Copy link
Copy Markdown
Member Author

nezaniel commented Feb 3, 2026

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants