MCP Client icon

MCP Client

Use MCP client

Overview

This node acts as a client for the MCP (Model Context Protocol) server, enabling interaction with various MCP services such as retrieving prompt templates, listing available prompts, tools, resources, and executing tools. It supports multiple connection types including Command Line (STDIO), Server-Sent Events (SSE), and HTTP Streamable protocols. This node is useful for workflows that require dynamic access to AI model prompts, tools, and resources managed by an MCP server, facilitating automation and integration of AI capabilities.

Use Case Examples

  1. Retrieve a specific prompt template by name to use in subsequent AI processing steps.
  2. List all available tools on the MCP server to dynamically select and execute a tool based on workflow conditions.
  3. Execute a specific tool with JSON parameters to perform AI-driven tasks within an automated workflow.

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 override precedence.
Prompt Name The name of the prompt template to retrieve when using the Get Prompt operation.

Output

JSON

  • prompt - The retrieved prompt template object when using the Get Prompt operation.

Dependencies

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

Troubleshooting

  • Ensure the connection type matches the provided credentials; mismatched credentials and connection type will cause connection failures.
  • Invalid URI override format will throw an error; ensure the URI is a valid URL when overriding.
  • Tool execution requires valid JSON parameters; malformed JSON will cause parsing errors.
  • If no tools or prompts are found, verify the MCP server configuration and availability.
  • Transport errors will throw descriptive errors; check network connectivity and server status.

Links

Discussion