MCP Tool 🔌
Use the MCP Tool to connect AI-powered workflows to external Model Context Protocol (MCP) servers and use their tools. When you connect this tool to an AI node, the AI model can dynamically invoke tools hosted on remote MCP servers to extend workflow capabilities.
In this article, you learn how to add, configure, and test the MCP Tool in your workflow.
Concept
The MCP Tool is a tool node that enables AI models to access external tools and services through the Model Context Protocol (MCP). MCP is an open standard that provides a unified way for AI systems to connect with external data sources, APIs, and specialized functionality. Unlike regular workflow nodes that execute in sequence, this tool is invoked by an AI node only when the model determines that external tool access is needed.
Key Capabilities:
- External tool integration - Connect to any MCP-compatible server to access its tools
- Multiple transport protocols - Support for SSE, Streamable HTTP, and WebSocket connections
- Secure authentication - Configure HTTP headers for token-based or custom authentication
- Dynamic tool discovery - AI models can discover and use tools exposed by MCP servers
- Flexible tool selection - Choose specific tools to expose or allow access to all server tools
Understand How the Tool Works
This section explains how the MCP Tool operates within a workflow and how it connects to other nodes.
Tool Connectors
In the Workflow Designer, nodes use colored connectors to indicate the type of connection and data flow. The MCP Tool uses the green connector, which is specific to tool nodes.
Green Connector Behavior
The green connector distinguishes tool nodes from regular workflow nodes:
- AI-driven invocation - Tools connected through green connectors don't execute automatically in sequence. The AI node decides when to invoke them based on user input and context.
- On-demand execution - The MCP Tool executes only when the AI model determines that external tool access is required.
- Multiple tools support - An AI node can have multiple tools connected through green connectors. The AI model selects which tool to use based on the task.
Execution Flow
When a workflow runs, the MCP Tool operates in this sequence:
- The AI node receives user input from the chatbot.
- The AI model analyzes the input and determines whether external tool access is needed.
- If external tools are needed, the AI invokes the MCP Tool through the green connector.
- The tool connects to the configured MCP server using the specified transport protocol.
- The MCP server executes the requested tool and returns results.
- Results are stored in the field specified in Output Field.
- The AI node accesses the results and generates a response for the user.
┌─────────────┐ ┌─────────────┐ ┌──────────────────┐ ┌──────────────┐
│ User Query │ ───► │ AI Node │ ───► │ MCP Tool │ ───► │ MCP Server │
└─────────────┘ └─────────────┘ │ (Green Connector)│ └──────────────┘
▲ └──────────────────┘ │
│ │
└────────── state.data.mcp_results ◄────────────┘
When to use this tool
Use the MCP Tool when your workflow requires:
- Integration with external services that expose MCP-compatible tools
- Access to specialized functionality not available in built-in workflow nodes
- Connection to custom APIs or enterprise systems through MCP adapters
- Dynamic tool discovery and invocation based on AI reasoning
- Extending AI capabilities with domain-specific operations
Add the MCP Tool to your workflow
Follow these steps to add the MCP Tool to your workflow canvas.
-
Go to Portal Settings > Chatbot > Workflow.
-
Select an existing workflow or create a new workflow.
-
In the Node Library, expand the Tools category.
-
Drag MCP Tool onto the canvas.
Connect the tool to an AI node
After you add the MCP Tool to the canvas, connect it to an AI node.
-
Locate your AI node (such as an LLM node) on the canvas.
-
Drag a connection line from the green connector to the input connector on the MCP Tool node.
-
Release to create the connection. A connector (●) indicates a successful tool connection.
NOTE: The green connector indicates that the tool is available to the AI node for on-demand invocation. The tool doesn't execute in sequence with other nodes, it executes only when the AI model decides to invoke it.
Configure the MCP Tool
Select the MCP Tool node to open the Node Configuration Panel. You can configure the following options:
Server configuration
Configure the MCP server connection settings:
-
Server Name: A unique identifier for this MCP server connection. This name is used to prefix tool names when multiple MCP servers are connected, helping the AI distinguish between tools from different sources. Enter a descriptive name like
my-mcp-serverorweather-service. This field is required. -
Server URL: The endpoint URL of the MCP server. Enter the complete URL including the protocol. For example,
https://some-mcp-server.example.com/orhttps://api.service.com/mcp. The URL format depends on the transport protocol selected. This field is required. -
Transport: The communication protocol used to connect to the MCP server. Select one of the following options:
- Streamable HTTP (Recommended) - Standard HTTP-based transport for request-response communication. Use this for most MCP server integrations.
- SSE (Server-Sent Events) - Legacy MCP transport protocol. Use only when connecting to older MCP servers that don't support Streamable HTTP.
- WebSocket - Bidirectional communication channel for persistent connections. Use this when the MCP server requires WebSocket connectivity or for high-frequency tool invocations.
Authentication
-
Headers: HTTP headers sent with each request to the MCP server for authentication and configuration. Use this to provide API keys, bearer tokens, or custom headers required by the server.
Click Add Headers to add header entries. Each header requires a name and value pair. Common patterns include:
Authorization: Bearer <your-token>- For OAuth or JWT authenticationX-API-Key: <your-api-key>- For API key authenticationContent-Type: application/json- For specifying request format
NOTE: Store sensitive credentials securely. Consider using workflow variables to reference secrets rather than entering credentials directly in the configuration.
Tools
-
Tools: Specify which tools from the MCP server to expose to the AI node. Click Add Item to select specific tools from the server's available tools.
When no tools are specified, all tools exposed by the MCP server become available to the AI. When specific tools are listed, only those tools can be invoked by the AI node.
Use tool filtering to:
- Limit AI access to approved operations only
- Reduce complexity by exposing only relevant tools
- Enforce security boundaries around sensitive operations
Output Settings
- Output Field: Variable name where tool results are stored for use by other nodes. Click to select an existing variable or create a new one. The AI node and subsequent workflow nodes access results using
${state.data.<variable_name>}. For example, if you name itmcp_results, access it as${state.data.mcp_results}.
Test the Configuration
After you configure the MCP Tool, test the workflow to verify correct behavior.
-
Go to Portal Settings > Chatbot > Agents.
-
Select the agent associated with your workflow, or create a new agent and assign your workflow.
-
Open the chatbot interface in the portal.
-
Enter a query that should trigger MCP tool invocation. The specific query depends on the tools exposed by your MCP server. For example:
- If connected to a weather MCP server: "What's the weather in Seattle?"
- If connected to a database MCP server: "Look up customer order #12345"
- If connected to a calendar MCP server: "Schedule a meeting for tomorrow at 2 PM"
-
Verify that the agent returns results from the MCP server tools.
-
Check that the response reflects the expected tool behavior.
-
If results don't match expectations, return to the Workflow Designer and adjust your configuration.
Supported Values Reference
Transport Protocols
| Protocol | Description | Use case |
|---|---|---|
| Streamable HTTP | Standard HTTP request-response (Recommended) | Most MCP server integrations |
| SSE | Legacy Server-Sent Events transport | Older MCP servers only |
| WebSocket | Bidirectional persistent connection | High-frequency tool calls |
Common Authentication Patterns
| Pattern | Header format | Description |
|---|---|---|
| Bearer token | Authorization: Bearer <token> | OAuth 2.0 or JWT authentication |
| API key | X-API-Key: <key> | Simple API key authentication |
| Basic auth | Authorization: Basic <base64> | Username/password authentication |
MCP Server Requirements
For the MCP Tool to function correctly, the target MCP server must:
- Implement the Model Context Protocol specification
- Expose tools through the standard MCP tool discovery mechanism
- Support the selected transport protocol
- Accept the configured authentication headers
Best Practices
- Use descriptive server names to help identify tool sources in complex workflows
- Limit tool exposure to only the operations needed for your workflow
- Store authentication credentials in secure workflow variables
- Test MCP server connectivity before deploying workflows to production
- Monitor tool invocation patterns to optimize performance