mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Feature: Upgrade MCP version and support SSE mode. (#4329)
Upgrade MCP version and support SSE mode. Co-authored-by: guwenjia <guwenjia@bilibili.com>
This commit is contained in:
@@ -104,7 +104,14 @@ class Custom_MCP implements INode {
|
||||
serverParams = JSON.parse(serverParamsString)
|
||||
}
|
||||
|
||||
const toolkit = new MCPToolkit(serverParams, 'stdio')
|
||||
// Compatible with stdio and SSE
|
||||
let toolkit: MCPToolkit
|
||||
if (serverParams?.command === undefined) {
|
||||
toolkit = new MCPToolkit(serverParams, 'sse')
|
||||
} else {
|
||||
toolkit = new MCPToolkit(serverParams, 'stdio')
|
||||
}
|
||||
|
||||
await toolkit.initialize()
|
||||
|
||||
const tools = toolkit.tools ?? []
|
||||
|
||||
Reference in New Issue
Block a user