MCP Client icon

MCP Client

Use MCP client

List Tools

AI-generated

Overview

This node acts as a client interface to an MCP (Model Context Protocol) server, allowing users to interact with various resources, prompts, and tools provided by the MCP ecosystem. It supports multiple operations such as listing available tools, executing a specific tool with parameters, retrieving prompt templates, and reading resources by URI.

A common use case is automating workflows that require invoking AI or model-related tools dynamically, fetching prompt templates for language models, or managing resources hosted on the MCP server. For example, you could list all available AI tools, execute a selected tool with custom parameters, or retrieve a prompt template to feed into another process.

The "List Tools" operation specifically fetches and returns the available tools from the MCP server, including their names, descriptions, and input schemas, enabling dynamic discovery of capabilities.

Properties

Name Meaning
Connection Type Choose the transport type to connect to the MCP server. Options:
- Command Line (STDIO): Connect via a command-line interface using standard input/output.
- Server-Sent Events (SSE): Connect via SSE protocol for event-driven communication.

Output

For the List Tools operation, the output JSON contains a tools array where each element represents a tool available on the MCP server. Each tool object includes:

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

Example output structure:

{
  "tools": [
    {
      "name": "toolName1",
      "description": "Description of toolName1",
      "schema": { /* JSON Schema of input parameters */ }
    },
    {
      "name": "toolName2",
      "description": "Description of toolName2",
      "schema": { /* JSON Schema of input parameters */ }
    }
  ]
}

No binary data output is produced by this operation.

Dependencies

  • Requires connection to an MCP server, which can be accessed either via:
    • A command line interface (STDIO) transport, requiring a configured command and environment variables.
    • A Server-Sent Events (SSE) transport, requiring an SSE URL and optional headers.
  • Credentials must be configured accordingly depending on the chosen connection type.
  • Environment variables prefixed with MCP_ are passed to the command line environment if using STDIO.
  • Uses external libraries for schema validation and client communication with the MCP server.

Troubleshooting

  • Connection errors: If the node fails to connect to the MCP server, verify that the credentials and connection parameters (command, SSE URL, headers) are correctly set.
  • No tools found: If the MCP server returns no tools, ensure that the server is properly configured and has tools registered.
  • Invalid tool parameters: When executing tools (not in this operation), invalid JSON or incorrect parameter types will cause errors. Always provide valid JSON objects matching the tool’s input schema.
  • Unsupported operation: Attempting to use an operation not supported by the node will throw an error.
  • Transport errors: Errors during communication with the MCP server (e.g., network issues, command failures) will result in transport errors.

Links and References

Discussion