MCP Client icon

MCP Client

Use MCP client

Overview

This node acts as a client for the MCP (Model Context Protocol) server, enabling various operations such as retrieving prompt templates, listing available prompts, tools, resources, and executing specific tools. It supports multiple connection types including Command Line (STDIO), Server-Sent Events (deprecated), and HTTP Streamable for real-time communication. A practical use case is fetching a specific prompt template by name to use in AI or automation workflows.

Use Case Examples

  1. Fetching a prompt template named 'welcomeMessage' to use in a chatbot.
  2. Listing all available tools on the MCP server to dynamically build a UI.
  3. Executing a tool with specific JSON parameters to perform an automated task.

Properties

Name Meaning
Connection Type Selects the transport protocol to connect to the MCP server, such as Command Line, SSE (deprecated), or HTTP Streamable.
Prompt Name The name of the prompt template to retrieve from the MCP server.

Output

JSON

  • prompt - The retrieved prompt template object corresponding to the specified prompt name.

Dependencies

  • Requires credentials for MCP client connection depending on the selected connection type (API key or command line credentials).
  • Imports MCP client SDK modules for communication and tool execution.

Troubleshooting

  • Common issues include connection failures due to incorrect credentials or transport configuration.
  • Errors parsing tool parameters if JSON is invalid or not an object.
  • Tool execution errors if the specified tool name does not exist or fails during execution.
  • Timeouts or transport errors when connecting to the MCP server.

Links

Discussion