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.

What is MCP?

The MCP node in StackAI enables seamless integration with Model Context Protocol (MCP) servers. This allows you to invoke external tools or models hosted on MCP servers directly from your workflow, making it easy to extend your automation and AI capabilities.


How to use it?

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.


Example of Usage

Suppose you want to invoke a tool named "summarize_text" on your MCP server and pass a text string for summarization. You would configure the MCP node as follows:

  • Tool Name: "summarize_text"

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

The node will return the summarized text in the output.


Available Actions

1. 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.


Example Configuration

{
  "tool_name": "summarize_text",
  "parameters": {
    "text": "StackAI is a powerful workflow automation platform that integrates with MCP servers."
  }
}

Example Output

{
  "result": {
    "summary": "StackAI automates workflows efficiently."
  }
}

Use the MCP node in StackAI to unlock advanced integrations and extend your workflow automation with external tools and models.

Last updated

Was this helpful?