Skip to main content

MCP List Prompts

Controlled node

Overview

The MCP List Prompts node connects to a Model Context Protocol (MCP) server and retrieves a list of all available prompts. This node is part of Intellectible's MCP integration, allowing workflows to discover and interact with external AI tools and services that expose prompts via the MCP protocol.

When triggered, the node establishes a connection to the specified MCP server, requests the available prompts list, and outputs the result. The connection is automatically closed after the operation completes.

Inputs

InputTypeDescriptionDefault
RunEventFires when the node starts running-
URLTextThe URL of the MCP server to connect to-
HeadersDictionaryOptional HTTP headers to include in the request (e.g., authentication tokens){}
TimeoutNumberMaximum time to wait for the server response in milliseconds60000

Outputs

OutputTypeDescription
DoneEventFires when the node has finished executing
ResultDataContains the list of prompts from the MCP server, or an error object if the request failed

Result Output Structure

On success, the result output contains the MCP server's response with available prompts. On failure, it contains an error object:

{
"error": "Error message describing what went wrong"
}

Runtime Behavior and Defaults

  • Connection Lifecycle: The node creates a temporary MCP client connection for each execution. The connection is automatically closed when the operation completes or if an error occurs.
  • Timeout Handling: If the server does not respond within the specified timeout period, the node will output an error.
  • Error Handling: If the MCP server returns an error or if the connection fails, the node catches the error and outputs it in the result data field rather than throwing an unhandled exception.
  • Default Timeout: 60 seconds (60000ms)

Example Usage

Basic Prompt Discovery

Connect the MCP List Prompts node to an MCP server to discover what prompts are available:

  1. Set the URL input to your MCP server endpoint (e.g., https://api.example.com/mcp or http://localhost:3000/mcp)
  2. Optionally provide Headers for authentication:
    {
    "Authorization": "Bearer your-api-token",
    "X-Custom-Header": "value"
    }
  3. Trigger the Run event to execute the node
  4. Connect the Result output to a Show node or process the prompts list in subsequent nodes

Workflow Integration

Use this node in combination with MCP Get Prompt to dynamically discover and then retrieve specific prompts:

Start → MCP List Prompts → (Result contains prompts) → For Each (loop through prompts) → MCP Get Prompt → Process Prompt

This pattern allows workflows to automatically discover and utilize all available prompts from an MCP server without hardcoding prompt names.