Skip to main content

MCP Call Tool

Controlled node

Overview

The MCP Call Tool node connects to a Model Context Protocol (MCP) server and executes tools. It supports both single tool execution and batch processing of multiple sequential tool calls. This node handles connection lifecycle management, authentication via custom headers, timeout configuration, and comprehensive error handling for MCP operations.

The node operates in two mutually exclusive modes:

  • Single Tool Mode: Call one tool using the name and arguments inputs
  • Batch Mode: Execute multiple tools sequentially using the instructions input array
Single vs Batch Mode

You must provide either the name input (for single tool calls) OR the instructions input (for batch calls), but not both. Providing both will result in an error.

Inputs

InputTypeDescriptionDefault
RunEventFires when the node starts running-
URLTextThe MCP server endpoint URL-
HeadersDictionaryOptional HTTP headers for authentication or custom configuration (e.g., API keys){}
NameTextThe name of the tool to call (required for single tool mode)-
ArgumentsDictionaryArguments to pass to the tool (for single tool mode){}
InstructionsDictionaryArray of tool call objects for batch execution. Each object requires a name property and optionally an arguments property-
TimeoutNumberRequest timeout in milliseconds60000

Outputs

OutputTypeDescription
DoneEventFires when the node has finished executing
ResultDataFor single mode: the MCP tool result. For batch mode: an object containing results (array of execution results) and totalSteps (count of executed steps)

Runtime Behavior and Defaults

  • Connection Lifecycle: The node automatically creates and closes the MCP client connection for each execution
  • Timeout Handling: If the timeout is not specified or invalid, defaults to 30000ms (30 seconds) at runtime, though the UI default is 60000ms
  • Batch Execution: When using instructions, tools execute sequentially with a 500ms delay between calls to prevent server overload
  • Error Handling: In batch mode, execution stops immediately when any tool call fails. The result will contain error details for the failed step
  • Result Structure: Successful batch results include success: true, the result data, and step number. Failed steps include success: false and error message

Example

Single Tool Call

Connect a Start node to the Run input, provide the MCP server URL, tool name, and arguments:

URL: "https://api.example.com/mcp"
Name: "get_weather"
Arguments: { "city": "London", "units": "metric" }

Batch Tool Calls

Provide an array of instructions to execute multiple tools in sequence:

URL: "https://api.example.com/mcp"
Instructions: [
{ "name": "create_file", "arguments": { "filename": "report.txt" } },
{ "name": "write_content", "arguments": { "content": "Hello World" } }
]

The result will contain an array with the outcome of each step, including success status and any returned data.