fix(mcp tool): bug fix for the sse protocol request header in the mcp tool

This commit is contained in:
谢俊男
2026-01-15 12:21:24 +08:00
parent 59f24fb5b4
commit ec25efcb75

View File

@@ -96,10 +96,7 @@ class SimpleMCPClient:
"""初始化 SSE MCP 会话 - 参考 Dify 实现"""
try:
# 建立 SSE 连接
response = await self._session.get(
self.server_url,
headers={"Accept": "text/event-stream"}
)
response = await self._session.get(self.server_url)
if response.status != 200:
error_text = await response.text()