MCP Client Enhanced
Actions7
Overview
This node, "MCP Client Enhanced," connects to an MCP (Model Context Protocol) server using one of several transport protocols and performs various operations related to prompts, tools, and resources managed by the MCP server. It supports multi-tenant environments and enterprise features.
The List Prompts operation retrieves a list of available prompt templates from the MCP server. This is useful when you want to discover which prompt templates are accessible for generating or customizing AI-driven interactions or workflows.
Common scenarios:
- Fetching all available prompt templates to display in a UI for user selection.
- Automating workflows that dynamically select prompts based on availability.
- Integrating with multi-tenant MCP servers where prompt templates may vary per tenant.
Example usage:
- An automation workflow that queries the MCP server for all prompts and then iterates over them to execute specific prompts conditionally.
- A dashboard widget that lists all prompt templates for administrators to manage or audit.
Properties
| Name | Meaning |
|---|---|
| Connection Type | Choose the transport type to connect to the MCP server. Options: |
| - Command Line (STDIO): Use local command line interface for communication | |
| - Server-Sent Events (SSE): Deprecated streaming protocol | |
| - HTTP Streamable: Modern HTTP streaming protocol for real-time communication |
Note: For the List Prompts operation specifically, the only input property relevant is Connection Type, which determines how the node communicates with the MCP server.
Output
The output JSON contains a single field:
prompts: An array of prompt template objects retrieved from the MCP server.
Each prompt object typically includes metadata about the prompt template such as its name, description, parameters, and other relevant details defined by the MCP server.
No binary data output is produced by this operation.
Example output structure:
{
"prompts": [
{
"name": "examplePrompt",
"description": "A sample prompt template",
"parameters": { /* prompt-specific parameters */ }
},
...
]
}
Dependencies
Requires connection to an MCP server via one of the supported transports:
- Command Line interface (local executable)
- HTTP Streamable protocol (recommended for real-time communication)
- Server-Sent Events (deprecated)
Requires appropriate credentials configured in n8n for the chosen connection type:
- API key or authentication token for HTTP or SSE connections
- Command and environment variables for STDIO connection
Uses external MCP SDK packages for client communication and schema validation.
Troubleshooting
Transport errors: If the node fails to connect, verify the credentials and endpoints configured for the selected connection type. Check network connectivity and permissions.
No prompts returned: If the
promptsarray is empty, ensure the MCP server has prompt templates available and that your credentials have access rights.Invalid JSON errors: When providing JSON parameters (not applicable for List Prompts but relevant for other operations), ensure valid JSON syntax.
Deprecated SSE transport: Avoid using the SSE option as it is deprecated; prefer HTTP Streamable for better support.
Timeouts: The node uses configurable timeouts; if operations take too long, consider increasing the timeout settings in credentials.
Links and References
- Model Context Protocol (MCP) Documentation (hypothetical link)
- n8n Custom Node Development
- LangChain Tools (related to tool execution logic in the node)
- Zod Schema Validation (used internally for input schema validation)