mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 08:46:58 +02:00
fix(MCP Client Tool Node): Change default transport to HTTP Streamable (#20053)
Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
parent
b55c95c863
commit
e0a9de7fe3
|
|
@ -9,6 +9,7 @@ import {
|
|||
type SupplyData,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { transportSelect } from './descriptions';
|
||||
import { getTools } from './loadOptions';
|
||||
import type { McpServerTransport, McpAuthenticationOption, McpToolIncludeMode } from './types';
|
||||
import {
|
||||
|
|
@ -30,7 +31,7 @@ export class McpClientTool implements INodeType {
|
|||
dark: 'file:../mcp.dark.svg',
|
||||
},
|
||||
group: ['output'],
|
||||
version: [1, 1.1],
|
||||
version: [1, 1.1, 1.2],
|
||||
description: 'Connect tools from an MCP Server',
|
||||
defaults: {
|
||||
name: 'MCP Client',
|
||||
|
|
@ -102,28 +103,22 @@ export class McpClientTool implements INodeType {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Server Transport',
|
||||
name: 'serverTransport',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Server Sent Events (Deprecated)',
|
||||
value: 'sse',
|
||||
},
|
||||
{
|
||||
name: 'HTTP Streamable',
|
||||
value: 'httpStreamable',
|
||||
},
|
||||
],
|
||||
default: 'sse',
|
||||
description: 'The transport used by your endpoint',
|
||||
transportSelect({
|
||||
defaultOption: 'sse',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'@version': [{ _cnd: { gte: 1.1 } }],
|
||||
'@version': [1.1],
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
transportSelect({
|
||||
defaultOption: 'httpStreamable',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'@version': [{ _cnd: { gte: 1.2 } }],
|
||||
},
|
||||
},
|
||||
}),
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
import type { IDisplayOptions, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const transportSelect = ({
|
||||
defaultOption,
|
||||
displayOptions,
|
||||
}: {
|
||||
defaultOption: 'sse' | 'httpStreamable';
|
||||
displayOptions: IDisplayOptions;
|
||||
}): INodeProperties => ({
|
||||
displayName: 'Server Transport',
|
||||
name: 'serverTransport',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'HTTP Streamable',
|
||||
value: 'httpStreamable',
|
||||
},
|
||||
{
|
||||
name: 'Server Sent Events (Deprecated)',
|
||||
value: 'sse',
|
||||
},
|
||||
],
|
||||
default: defaultOption,
|
||||
description: 'The transport used by your endpoint',
|
||||
displayOptions,
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user