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
Is your feature request related to a problem? Please describe.
I am writing MCP client code that needs to control networking (e.g. proxying/traffic filtering). Although the MCP client transports options offer some flexibility (RequestInit for Streamable HTTP and SSE transports, fetch override in EventSourceInit for SSE transport), I really need to just control all uses of fetch within these transports.
Describe the solution you'd like
Add a fetch option to both StreamableHTTPClientTransportOptions and SSEClientTransportOptions. All fetch calls within these transports use the provided fetch implementation, falling back to native fetch.
Describe alternatives you've considered
I can work around this issue either by providing custom transport implementations, or by locally patching the SDK to allow overriding fetch.
Additional context
I'm happy to provide a PR, please let me know if the contribution would be welcome.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I am writing MCP client code that needs to control networking (e.g. proxying/traffic filtering). Although the MCP client transports options offer some flexibility (
RequestInit
for Streamable HTTP and SSE transports,fetch
override inEventSourceInit
for SSE transport), I really need to just control all uses offetch
within these transports.Describe the solution you'd like
Add a
fetch
option to bothStreamableHTTPClientTransportOptions
andSSEClientTransportOptions
. Allfetch
calls within these transports use the providedfetch
implementation, falling back to nativefetch
.Describe alternatives you've considered
I can work around this issue either by providing custom transport implementations, or by locally patching the SDK to allow overriding
fetch
.Additional context
I'm happy to provide a PR, please let me know if the contribution would be welcome.
The text was updated successfully, but these errors were encountered: