Merge pull request #1065 from aparekh02/master

MCP Asyncio Loop Error Fix: SSE -> Streamable. Resolves #879.
pull/1069/head
Kye Gomez 1 month ago committed by GitHub
commit f5f87912d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -117,4 +117,4 @@ def get_okx_crypto_volume(symbol: str) -> str:
if __name__ == "__main__":
# Run the server on port 8000 (you can change this to any available port)
mcp.run(transport="sse")
mcp.run(transport="streamable-http")

@ -11,7 +11,6 @@ from typing import Any, Dict, List, Literal, Optional, Union
from litellm.types.utils import ChatCompletionMessageToolCall
from loguru import logger
from mcp import ClientSession
from mcp.client.sse import sse_client
try:
from mcp.client.streamable_http import streamablehttp_client
@ -315,7 +314,7 @@ def get_mcp_client(transport, url, headers=None, timeout=5, **kwargs):
url, headers=headers, timeout=timeout, **kwargs
)
else:
return sse_client(
return streamablehttp_client(
url, headers=headers, timeout=timeout, **kwargs
)

Loading…
Cancel
Save