MCP List Tools
Controlled node
Overview
The MCP List Tools node connects to a Model Context Protocol (MCP) server and retrieves a list of all available tools exposed by that server. This is useful for discovering what capabilities an MCP server provides before calling specific tools with the MCP Call Tool node.
MCP (Model Context Protocol) is a protocol for exposing tools and resources to AI systems. This node acts as a discovery mechanism, returning metadata about each tool including its name, description, and input schema.
The node automatically creates and closes the MCP client connection for each execution. You do not need to manage connection lifecycle manually.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the node to connect to the MCP server and list available tools. | - |
| URL | Text | The endpoint URL of the MCP server to connect to (e.g., https://api.example.com/mcp or http://localhost:3000/mcp). | - |
| Headers | Dictionary | Optional HTTP headers to include in the request (e.g., {"Authorization": "Bearer token"}). | {} |
| Timeout | Number | Maximum time in milliseconds to wait for the MCP server to respond before aborting the request. | 60000 |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the tool listing operation completes successfully or with an error. |
| Result | Data | Contains the list of tools available on the MCP server. Returns an array of tool objects with properties like name, description, and inputSchema. If an error occurs, returns an object with an error property containing the error message. |
Result Format
When successful, the result output contains an array of tool definitions:
[
{
"name": "search_database",
"description": "Search the project database for records",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string" },
"limit": { "type": "number" }
},
"required": ["query"]
}
}
]
If the MCP server returns an error or is unreachable, the result will be:
{
"error": "Error message describing what went wrong"
}
Runtime Behavior and Defaults
- Timeout: Defaults to 60 seconds (60000ms). If the MCP server does not respond within this time, the node will return an error.
- Connection Lifecycle: The node creates a new MCP client connection when triggered and automatically closes it after retrieving the tool list or if an error occurs.
- Error Handling: If the connection fails, the server returns an error, or the request times out, the
resultoutput will contain anerrorproperty with details, and the Done event will still fire. - Headers: The headers input accepts a dictionary object. Common use cases include authentication tokens or custom content-type specifications required by the MCP server.
Example Usage
Here's a simple workflow that lists tools from an MCP server and then calls one of them:
- Connect a Start node to the Run input of MCP List Tools.
- Set the URL input to your MCP server endpoint (e.g.,
https://my-mcp-server.com/sse). - Optionally provide Headers if your server requires authentication.
- Connect the Done event to an AI Write node to process the tool list.
- Use the Result output to dynamically populate a MCP Call Tool node's inputs based on available tools.
graph TD
A[Start] -->|Run| B[MCP List Tools]
B -->|Done| C[AI Write]
B -->|Result| D[Show]
C -->|Done| E[MCP Call Tool]
In this example, the AI Write node could analyze the available tools and decide which one to call next, passing the appropriate parameters to the MCP Call Tool node.