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 STDIO, Server-Sent Events, HTTP Streamable) to communicate with the MCP server. The node is useful for scenarios where users want to list available resource templates, resources, tools, or prompts, execute specific tools, or read specific resources from the MCP server. For example, it can be used to fetch a list of resource templates for further processing or to execute a tool with given parameters and retrieve the result.

Use Case Examples

  1. Listing available resource templates to understand what templates can be used in a workflow.
  2. Executing a specific tool on the MCP server with JSON parameters and obtaining the output for further automation.
  3. Reading a specific resource by its URI to fetch detailed information for processing.

Properties

Name Meaning
Connection Type Selects the transport protocol to connect to the MCP server. Options include Command Line (STDIO), Server-Sent Events (deprecated), and HTTP Streamable.
Uri Override Overrides the URL from credentials with a custom URL. Only applicable for SSE and HTTP connection types.
Headers Override Additional headers to send in the request in NAME=VALUE format, separated by newlines. These headers override those from credentials. Only applicable for SSE and HTTP connection types.

Output

JSON

  • resourceTemplates - List of available resource templates returned by the MCP server.

Dependencies

  • Requires credentials for MCP client connection depending on the connection type (API key or command line credentials).
  • Uses MCP SDK client libraries for communication with the MCP server.

Troubleshooting

  • Invalid URI override format error occurs if the custom URL is malformed; ensure the URL is valid.
  • Transport errors may occur if the connection to the MCP server fails; check credentials and network connectivity.
  • Tool execution errors may occur if the specified tool does not exist or parameters are invalid; verify tool name and JSON parameters.
  • Timeouts may happen depending on the connection type and server response times; adjust timeout settings if needed.

Links

Discussion