> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/workflow-builder/apps/mcp.md).

# MCP

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.&#x20;

Connecting to public servers is easy! Choose the server you'd like to connect to [here](https://mcpservers.org/). 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!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stackai.com/workflow-builder/apps/mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
