> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.uponai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Extend your agent with Model Context Protocol tools from connected MCP servers.

## Overview

MCP (Model Context Protocol) lets you connect external tool servers to your agent, giving it access to a wide range of capabilities without building custom functions from scratch.

***

## Setup

<Steps>
  <Step title="Connect an MCP server">
    In your agent's Functions section, click **+ Add MCP** and fill in the connection details.

    <Frame>
      <img src="https://mintcdn.com/uponai/7QzWw_-VPReC-RSK/images/screenshots/image16.png?fit=max&auto=format&n=7QzWw_-VPReC-RSK&q=85&s=3c2706f0e380f5ccbac2aafe40dbe112" alt="Add MCP dialog showing MCP Name, Server URL, request headers, query parameters, and connection timeout fields" width="476" height="685" data-path="images/screenshots/image16.png" />
    </Frame>
  </Step>

  <Step title="Configure headers">
    Optionally add custom headers to be sent with requests to your MCP server.
  </Step>

  <Step title="Add query parameters">
    Optionally append query parameters to the MCP server endpoint URL.
  </Step>

  <Step title="Choose a tool">
    Select from the available tools provided by your connected MCP server.
  </Step>

  <Step title="Extract response data">
    Map response values to dynamic variables for use later in the conversation:

    ```txt theme={null}
    Extract the user_name from the MCP response and store it as {{user_name}}.
    ```
  </Step>

  <Step title="Save configuration">
    Save your MCP tool configuration to make it available to your agent.
  </Step>

  <Step title="Update your prompt">
    Tell the agent explicitly when to invoke the MCP tool:

    ```txt theme={null}
    When the user asks for their account details, call the get_account_info MCP tool.
    ```
  </Step>
</Steps>

<Tip>
  Always instruct your agent in the prompt when to trigger MCP tools. The agent won't reliably infer usage from tool names alone.
</Tip>
