I'm looking into implementing a MCP server on top of Azure Functions, and its implementation works as a classic Node.js HTTP middleware, requiring an IncomingMessage as the input request and OutgoingMessage for the response.
With the previous Functions v3 runtime model, we could use workarounds by creating adapters like this, but I'm wondering if we can have a similar approach with the v4 model?
In the new model v4 model we can't access/manipulate the response object directly as it must be returned in the function handler.
Any idea if/how we could have a way to create a compatibility layer/adapter to use regular HTTP middleware with the new v4 model?
cc @ejizba
I'm looking into implementing a MCP server on top of Azure Functions, and its implementation works as a classic Node.js HTTP middleware, requiring an
IncomingMessageas the input request andOutgoingMessagefor the response.With the previous Functions v3 runtime model, we could use workarounds by creating adapters like this, but I'm wondering if we can have a similar approach with the v4 model?
In the new model v4 model we can't access/manipulate the response object directly as it must be returned in the function handler.
Any idea if/how we could have a way to create a compatibility layer/adapter to use regular HTTP middleware with the new v4 model?
cc @ejizba