-
Notifications
You must be signed in to change notification settings - Fork 308
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hi there,
thanks a stack for conceiving this excellent adapter. We made a demo using it over here.
As we just started using it, we observed it does not accept transport=http yet. http seems to be the designated new label which was introduced as streamable-http beforehand.
langchain-mcp-adapters/langchain_mcp_adapters/sessions.py
Lines 375 to 407 in 49a13ec
| if transport == "sse": | |
| if "url" not in params: | |
| msg = "'url' parameter is required for SSE connection" | |
| raise ValueError(msg) | |
| async with _create_sse_session(**params) as session: | |
| yield session | |
| elif transport == "streamable_http": | |
| if "url" not in params: | |
| msg = "'url' parameter is required for Streamable HTTP connection" | |
| raise ValueError(msg) | |
| async with _create_streamable_http_session(**params) as session: | |
| yield session | |
| elif transport == "stdio": | |
| if "command" not in params: | |
| msg = "'command' parameter is required for stdio connection" | |
| raise ValueError(msg) | |
| if "args" not in params: | |
| msg = "'args' parameter is required for stdio connection" | |
| raise ValueError(msg) | |
| async with _create_stdio_session(**params) as session: | |
| yield session | |
| elif transport == "websocket": | |
| if "url" not in params: | |
| msg = "'url' parameter is required for Websocket connection" | |
| raise ValueError(msg) | |
| async with _create_websocket_session(**params) as session: | |
| yield session | |
| else: | |
| msg = ( | |
| f"Unsupported transport: {transport}. " | |
| f"Must be one of: 'stdio', 'sse', 'websocket', 'streamable_http'" | |
| ) | |
| raise ValueError(msg) |
In this spirit, do you think this one-line change for line 381 would be applicable?
elif transport in {"http", "streamable-http", "streamable_http"}: With kind regards,
Andreas.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request