MCP

Learn how to use the MCP node in StackAI to connect and interact with Model Context Protocol servers, including input, configuration, and output details.

To use the MCP Node, you configure it to call a specific tool on an MCP server and pass any required parameters. The node will then execute the tool and return the results, which can be used in downstream nodes in your workflow.

Connecting to public servers is easy! Choose the server you'd like to connect to here. Then, create a new connection with the server's URL. You should be able to then choose from a dropdown of available actions.


Example of Usage

Suppose you want to invoke a tool named "web_search" on your ExaAI MCP server and pass a text string to search the web. You would configure the MCP node as follows:

  • Tool Name: "web_search"

  • Parameters: { "query": "StackAI is a powerful workflow automation platform..." }

The node will return the summarized text in the output.


Call MCP Server

This is the primary action available for the MCP node.

Description

Invoke a tool hosted on an MCP server by specifying the tool name and any parameters required by that tool.

Inputs

  • Tool Name (tool_name)

    • Type: String

    • Required: No

    • Description: The name of the tool to invoke on the MCP server.

    • Example: "summarize_text"

  • Parameters (parameters)

    • Type: Object

    • Required: No

    • Description: The parameters to pass to the specified tool. The structure depends on the tool being called.

    • Example: { "text": "Your input text here" }

Configurations

  • No additional configurations are required for this action.

Outputs

  • Result (result)

    • Type: Object

    • Required: Yes

    • Description: The result returned from the tool invocation. The structure of this object depends on the tool you called.

    • Example: { "summary": "StackAI automates workflows efficiently." }


Summary Table

Field
Type
Required
Description
Example

Tool Name

String

No

Name of the tool to invoke

"summarize_text"

Parameters

Object

No

Parameters to pass to the tool

{ "text": "Your input text here" }

Result

Object

Yes

Result from the tool invocation

{ "summary": "..." }


Best Practices

  • Always check the documentation of the specific tool you are invoking for required parameters.

  • Use the output of the MCP node as input for downstream nodes to build powerful, automated workflows.

  • Advanced users can run their own MCP server locally and expose it to the web using a tool like ngrok. Putting your ngrok URL when making a connection will allow you to connect to the local server in Stack!

Last updated

Was this helpful?