MCP List Resources
Controlled node
Overview
The MCP List Resources node connects to a Model Context Protocol (MCP) server and retrieves a list of all available resources exposed by that server. MCP is an open protocol that enables AI systems to integrate with external data sources and tools. This node is useful for discovering what resources (files, databases, APIs, etc.) are available from an MCP-compatible server before attempting to read or interact with them.
When executed, the node creates a temporary client connection to the specified MCP server, calls the listResources method, and returns the complete list of available resources. The connection is automatically closed after the operation completes, regardless of success or failure.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the node to connect to the MCP server and fetch the resource list. | - |
| URL | Text | The URL endpoint of the MCP server (e.g., https://api.example.com/mcp or http://localhost:3000/mcp). | - |
| Headers | Dictionary | Optional HTTP headers to include in the connection request (e.g., authentication tokens, content-type). | {} |
| Timeout | Number | Connection timeout in milliseconds. If the server doesn't respond within this time, the operation fails. | 60000 (60 seconds) |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the resource listing operation completes, regardless of success or failure. |
| Result | Data | Contains the list of resources from the MCP server, or an error object if the operation failed. On success, returns the raw MCP response containing resource metadata. On failure, returns { error: "error message" }. |
Runtime Behavior and Defaults
The node establishes a temporary connection to the MCP server specified in the URL input. By default, it will wait up to 60 seconds (60000ms) for a response before timing out, though this can be configured via the Timeout input.
If the connection succeeds, the node calls the MCP listResources method and outputs the complete resource list through the Result output. If the server returns an error or the connection fails, the Result output will contain an error object with a descriptive message.
The node automatically handles connection cleanup, ensuring the MCP client is closed in the finally block even if an error occurs during execution.
This node implements the Model Context Protocol (MCP) specification. The returned resource list typically includes metadata such as resource URIs, names, descriptions, and MIME types that can be used with the MCP Read Resource node to fetch actual content.
Example Usage
Scenario: Discover available files from an MCP file server.
- Connect a Start node or any trigger to the Run input of the MCP List Resources node.
- Set the URL input to your MCP server endpoint (e.g.,
http://localhost:3000/mcp). - (Optional) Add authentication headers via the Headers input if your server requires authentication.
- Connect the Result output to a Show node or processing logic to inspect available resources.
- Connect the Done event to trigger subsequent actions, such as using MCP Read Resource to fetch specific files.
Workflow:
Start → [Run] MCP List Resources [Result] → Show (display available resources)
↓
[Done] → MCP Read Resource (to fetch specific files)
Note: If the MCP server is unreachable or returns an error, the Result output will contain an error object rather than the resource list. Always validate the result before attempting to use it with downstream nodes.