MCP Client Enhanced icon

MCP Client Enhanced

Enhanced MCP client with multi-tenant support, smart prompts, and enterprise features

Overview

This node, named "MCP Client Enhanced," connects to an MCP (Model Context Protocol) server using one of several transport protocols and performs various operations related to resources, prompts, and tools available on the server. The "List Tools" operation specifically retrieves a list of available tools from the MCP server, including their names, descriptions, and input schemas.

Common scenarios for this node include:

  • Discovering what tools are available on an MCP server for automation or integration workflows.
  • Dynamically fetching tool metadata to build user interfaces or validate inputs before execution.
  • Integrating with AI or model context platforms that expose functionality as tools accessible via MCP.

Practical example:

  • A user wants to automate document processing by listing all available AI-powered tools on the MCP server, then selecting one to execute in subsequent workflow steps.

Properties

Name Meaning
Connection Type Choose the transport type to connect to the MCP server. Options:
- Command Line (STDIO): Use command line interface for communication.
- Server-Sent Events (SSE): Deprecated; previously used SSE protocol.
- HTTP Streamable: Use HTTP streamable protocol for real-time communication (recommended).

Output

The output JSON structure for the "List Tools" operation is an object containing a tools array. Each element in the array represents a tool with the following fields:

  • name: The name of the tool.
  • description: A textual description of what the tool does.
  • schema: A JSON schema describing the expected input parameters for the tool.

Example output snippet:

{
  "tools": [
    {
      "name": "exampleTool",
      "description": "Executes example functionality",
      "schema": {
        "type": "object",
        "properties": {
          "param1": { "type": "string", "description": "First parameter" },
          "param2": { "type": "number", "description": "Second parameter" }
        },
        "required": ["param1"]
      }
    }
  ]
}

No binary data output is produced by this operation.

Dependencies

  • Requires connection to an MCP server supporting the MCP protocol.
  • Supports three transport types: command line (STDIO), HTTP streamable, and deprecated SSE.
  • Depending on the chosen transport, appropriate credentials must be configured in n8n:
    • For command line: configuration includes command, arguments, and environment variables.
    • For HTTP streamable: requires HTTP endpoint URLs, optional headers, and timeout settings.
    • For SSE: requires SSE URL and optional headers (deprecated).
  • Uses external SDK packages for MCP client and transport implementations.
  • Environment variables starting with MCP_ can be passed as environment variables to the command line transport.

Troubleshooting

  • No tools found error: If the MCP server returns no tools, the node throws an error indicating no tools were found. Verify the MCP server has tools registered and is reachable.
  • Connection errors: Errors connecting to the MCP server may occur due to incorrect credentials, unreachable endpoints, or network issues. Check transport configuration and network connectivity.
  • Invalid transport selection: Using the deprecated SSE transport is discouraged; prefer HTTP streamable or command line.
  • JSON parsing errors: When executing tools (not in this operation), invalid JSON parameters cause errors. Ensure JSON inputs are well-formed.
  • Timeouts: The node uses configurable timeouts for HTTP/SSE transports; increase timeout if operations take longer than expected.

Links and References

Discussion