fix(mcp tool): bug fix for the sse protocol request header in the mcp tool
This commit is contained in:
@@ -96,10 +96,7 @@ class SimpleMCPClient:
|
|||||||
"""初始化 SSE MCP 会话 - 参考 Dify 实现"""
|
"""初始化 SSE MCP 会话 - 参考 Dify 实现"""
|
||||||
try:
|
try:
|
||||||
# 建立 SSE 连接
|
# 建立 SSE 连接
|
||||||
response = await self._session.get(
|
response = await self._session.get(self.server_url)
|
||||||
self.server_url,
|
|
||||||
headers={"Accept": "text/event-stream"}
|
|
||||||
)
|
|
||||||
|
|
||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
error_text = await response.text()
|
error_text = await response.text()
|
||||||
|
|||||||
Reference in New Issue
Block a user