MCP Client icon

MCP Client

Use MCP client

Overview

This node acts as a client for the Model Context Protocol (MCP) server, enabling interaction with MCP resources, tools, and prompts. It supports multiple connection types (Command Line via STDIO, Server-Sent Events, and HTTP Streamable) to communicate with the MCP server. Common use cases include listing available resources, resource templates, tools, and prompts, reading specific resources by URI, executing tools with parameters, and retrieving prompt templates. This node is beneficial for workflows that require dynamic access to MCP-managed data and tool execution within an automation environment.

Use Case Examples

  1. Listing all available MCP resources to dynamically fetch data for processing.
  2. Executing a specific MCP tool with JSON parameters to perform automated tasks.
  3. Retrieving prompt templates for use in generating dynamic content or responses.

Properties

Name Meaning
Connection Type Selects the transport protocol to connect to the MCP server, such as Command Line (STDIO), Server-Sent Events (deprecated), or HTTP Streamable.
Uri Override Overrides the default URL from credentials with a custom URL for SSE or HTTP connection types.
Headers Override Additional HTTP headers to send with the request, specified in NAME=VALUE format, merged with credential headers, with these taking precedence.

Output

JSON

  • resources - List of available MCP resources returned by the 'listResources' operation.
  • resourceTemplates - List of available resource templates returned by the 'listResourceTemplates' operation.
  • resource - Details of a specific resource returned by the 'readResource' operation.
  • tools - List of available tools with their names, descriptions, and input schemas returned by the 'listTools' operation.
  • result - Result of executing a specific tool with provided parameters returned by the 'executeTool' operation.
  • prompts - List of available prompt templates returned by the 'listPrompts' operation.
  • prompt - Details of a specific prompt template returned by the 'getPrompt' operation.

Dependencies

  • @modelcontextprotocol/sdk client libraries for different transport protocols

Troubleshooting

  • Invalid URI override format error: Ensure the custom URI is a valid URL when using SSE or HTTP connection types.
  • Transport error: Indicates issues with the underlying connection; check network and credentials.
  • Failed to connect to MCP server: Verify credentials and server availability.
  • No tools found: The MCP server returned no tools; verify server configuration and permissions.
  • Failed to execute tool: Check tool name correctness and parameter JSON format.
  • Operation not supported: Ensure the selected operation is valid and supported by the node.

Discussion