Not even sure you need a checkbox...
The POST endpoint would act as a regular server, we just add logic to queue the response to the stream in addition to the response.
If there is no active connection, nothing happens anyway... we just need to make sure the connection and queuing logic is solid.
Demo client plugged into the drupal (1) approach can be downloaded and tried here https://github.com/Ejb503/open-source-mcp-client
https://www.loom.com/share/b2a2a2d9b4604d379ba12732b90c9493?sid=ae197800...
Video demo of alternative approach
Will follow the thread...
My 2c and I have this working locally and am aiming to get a prototype up for feedback,
1. Use client SDK (Typescript/Python)
2. Use shared transport
3. Build custom module for MCP in Drupal
a. Get endpoint for streaming
b. Post endpoint for http POST
c. Use Drupal queue to stream responses from POST to SSE...
There is some complexity as we have to manage multiple concurrent subscriptions and Authentication isn't well handled in the MCP yet.
Initial thoughts are it seems achievable but would like to see feedback as there is significantly more complexity than simply "wrapping the SDKs" so would need to see if folks were keen to actually leverage the extra work for native integration.
Will follow up with a demo.
Just seen this :) Double the documentation, an unusual problem. Can probably join efforts to get best of both worlds.
I'm going to follow your progress here: https://www.drupal.org/project/ai/issues/3485686 ✨ PreGenerateResponseEvent should allow altering of tags Active , which I've hacked around in my example but needs a proper long term solution (as you've identified!)
We are having some discussion on this: https://drupal.slack.com/archives/CDL2YPBNX/p1730891957570699?thread_ts=... (can't find your handle in slack) if you want to discuss further
Just seen this :) Double the documentation, an unusual problem. Can probably join efforts to get best of both worlds.
I'm going to follow your progress here: https://www.drupal.org/project/ai/issues/3485686 ✨ PreGenerateResponseEvent should allow altering of tags Active , which I've hacked around in my example but needs a proper long term solution (as you've identified!)
ejb503 → created an issue.