Actions7
Overview
This node connects to an MCP (Model Context Protocol) server to perform various operations related to prompts, tools, and resources. Specifically, the 'Get Prompt' operation retrieves a specific prompt template by its name from the MCP server. This node supports multiple connection types including Command Line (STDIO), Server-Sent Events (SSE), and HTTP Streamable protocols for real-time communication. It is useful in scenarios where users need to dynamically fetch prompt templates for AI or automation workflows.
Use Case Examples
- Fetching a prompt template named 'welcomeMessage' to use in a chatbot workflow.
- Retrieving specific prompt templates to customize AI model interactions based on user input.
Properties
| Name | Meaning |
|---|---|
| Connection Type | Choose the transport type to connect to the MCP server. Options include Command Line (STDIO), Server-Sent Events (SSE) which is deprecated, and HTTP Streamable for real-time communication. |
| Prompt Name | The name of the prompt template to retrieve from the MCP server. |
Output
JSON
prompt- The retrieved prompt template object from the MCP server.
Dependencies
- Requires credentials for MCP client connection depending on the chosen connection type (API key or command line credentials).
- Uses MCP client SDK and transport libraries for communication with the MCP server.
Troubleshooting
- Connection errors may occur if the transport is not properly configured or credentials are missing/incorrect. Ensure correct credentials are provided for the selected connection type.
- If the specified prompt name does not exist, the node will throw an error indicating the prompt was not found.
- Tool execution errors may occur if parameters are invalid JSON or if the tool name does not exist in the MCP server.
- Timeouts can happen if the MCP server does not respond within the configured timeout period; adjust timeout settings if necessary.
Links
- Model Context Protocol Documentation - Official documentation for MCP client and server usage.