Smart MCP Client
Connects to and interacts with an MCP server, discovering capabilities for AI Agents.
Actions8
Overview
This node connects to an MCP (Model Context Protocol) server using either a command line (STDIO) or Server-Sent Events (SSE) transport. It allows users to perform various operations such as listing resource templates, discovering capabilities, executing tools, reading resources, and retrieving prompts. Specifically, the 'List Resource Templates' operation fetches and returns all available resource templates from the MCP server. This is useful for workflows that need to dynamically discover and utilize resource templates managed by the MCP server, for example, to automate data retrieval or processing based on template URIs.
Properties
| Name | Meaning |
|---|---|
| Connection Type | Selects the transport method to connect to the MCP server. Options are 'Command Line (STDIO)' for local command execution or 'Server-Sent Events (SSE)' for event-driven HTTP connection. |
Output
JSON
resourceTemplates- An array of resource template objects retrieved from the MCP server. Each template typically includes properties like name, description, and uriTemplate.
Dependencies
- Requires credentials for MCP server access, either an API key credential for command line connection or SSE API credential for SSE connection.
- Depends on '@modelcontextprotocol/sdk' client libraries for communication with the MCP server.
- Uses environment variables prefixed with 'MCP_' to configure the command line environment if applicable.
Troubleshooting
- Connection errors may occur if credentials are missing or incorrect; ensure proper MCP client credentials are configured.
- If the node fails to list resource templates, verify the MCP server is reachable and the user has permission to access resource templates.
- Malformed or unexpected data from the MCP server may cause JSON parsing warnings; these do not always indicate failure but should be reviewed.
- Errors during transport creation (e.g., invalid command or SSE URL) will be logged and cause node execution failure.
- If the 'uri' parameter is required for resource template tools, missing or invalid URIs will cause errors.