Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions langchain_mcp_adapters/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class SSEConnection(TypedDict):
class StreamableHttpConnection(TypedDict):
"""Connection configuration for Streamable HTTP transport."""

transport: Literal["streamable_http"]
transport: Literal["streamable_http", "streamable-http"]

url: str
"""The URL of the endpoint to connect to."""
Expand Down Expand Up @@ -402,7 +402,7 @@ async def create_session(
raise ValueError(msg)
async with _create_sse_session(**params) as session:
yield session
elif transport == "streamable_http":
elif transport in ("streamable_http", "streamable-http"):
if "url" not in params:
msg = "'url' parameter is required for Streamable HTTP connection"
raise ValueError(msg)
Expand All @@ -426,6 +426,6 @@ async def create_session(
else:
msg = (
f"Unsupported transport: {transport}. "
f"Must be one of: 'stdio', 'sse', 'websocket', 'streamable_http'"
f"Must be one of: 'stdio', 'sse', 'websocket', 'streamable_http', 'streamable-http'"
)
raise ValueError(msg)