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

# Microsoft Foundry

> You can connect Microsoft Foundry to the Connect AI MCP Server to discover and use external tools and data sources.

## Prerequisites

Before you can configure and use Microsoft Foundry with Connect AI, you must do the following:

* Connect a data source to your Connect AI account if you have not done so already. See [Sources](/en/Sources) for more information.

* Generate a Personal Access Token (PAT) on the [Settings](/en/Settings#personal-access-tokens) page. Copy this down, as it acts as your password during authentication.

* Base64 encode your Connect AI username.

## Connect Microsoft Foundry to the Connect AI MCP

<Steps>
  <Step>
    Create a project in Microsoft Foundry.
  </Step>

  <Step>
    Click **Create Agent**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TyMUmkWaSd5jpB6P/en/images/foundry_client_agent.png?fit=max&auto=format&n=TyMUmkWaSd5jpB6P&q=85&s=5ac2f9a44bc77dfa4a366e31c793b0c0" alt="Foundry Agent List" width="1704" height="851" data-path="en/images/foundry_client_agent.png" />
    </Frame>
  </Step>

  <Step>
    Provide a name for your agent, and then click **Create**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TyMUmkWaSd5jpB6P/en/images/foundry_client_create_agent.png?fit=max&auto=format&n=TyMUmkWaSd5jpB6P&q=85&s=8f2b50b384409a45874b1a201d34257f" alt="Create New Foundry Agent" width="1192" height="593" data-path="en/images/foundry_client_create_agent.png" />
    </Frame>
  </Step>

  <Step>
    After naming your agent, click **Save**. Add instructions (optional). Under **Tools**, click **Add**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TyMUmkWaSd5jpB6P/en/images/foundry_client_add_tools.png?fit=max&auto=format&n=TyMUmkWaSd5jpB6P&q=85&s=a5f26a97887c65cebc3588286a551297" alt="Foundry Add Tools" width="1081" height="823" data-path="en/images/foundry_client_add_tools.png" />
    </Frame>
  </Step>

  <Step>
    In the **Select a tool** dialog, click the **Custom** tab, and then click **Model Context Protocol**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TyMUmkWaSd5jpB6P/en/images/foundry_client_select_tool.png?fit=max&auto=format&n=TyMUmkWaSd5jpB6P&q=85&s=eee7a3d04852f1565a6ee00901e49ea7" alt="Select Custom Tool" width="1060" height="773" data-path="en/images/foundry_client_select_tool.png" />
    </Frame>
  </Step>

  <Step>
    In the **Add Model Context Protocol** dialog, enter the following:

    * **Name**–the name of your MCP server, for example, *ConnectAIMCPServer*.
    * **Remote MCP Server endpoint**–*[https://mcp.cloud.cdata.com/mcp](https://mcp.cloud.cdata.com/mcp)*.
    * **Authentication**–select **Key-based**.
    * **Credential**–enter *Basic(YourConnectAIUsernameConvertedToBase64:YourPersonalAccessToken)*, for example, *Basic(anNtaXRoQGV4YW1wbGUuY29t:a1b2c3d4e5f6g7h8i9j0k1l2)*.

    <Frame>
      <img src="https://mintcdn.com/cdata/TyMUmkWaSd5jpB6P/en/images/foundry_client_add_mcp.png?fit=max&auto=format&n=TyMUmkWaSd5jpB6P&q=85&s=aa0456f6367a5e20c82989f154548f8b" alt="Add MCP Tool" width="1149" height="636" data-path="en/images/foundry_client_add_mcp.png" />
    </Frame>
  </Step>

  <Step>
    Click **Connect**. You should see the MCP server listed under **Tools**.
  </Step>

  <Step>
    Click **Save** again to save your agent.
  </Step>

  <Step>
    You can confirm your connection by clicking the **YAML** tab. You should see the following:

    <Frame>
      <img src="https://mintcdn.com/cdata/TyMUmkWaSd5jpB6P/en/images/foundry_client_yaml.png?fit=max&auto=format&n=TyMUmkWaSd5jpB6P&q=85&s=c0f153e8ca605fdd53bca865adbe309b" alt="Foundry View Yaml" width="2011" height="936" data-path="en/images/foundry_client_yaml.png" />
    </Frame>
  </Step>

  <Step>
    Click the **Chat** tab and ask the agent a question about your data. The agent shows the tools used to arrive at an answer.

    <Frame>
      <img src="https://mintcdn.com/cdata/TyMUmkWaSd5jpB6P/en/images/foundry_client_prompt.png?fit=max&auto=format&n=TyMUmkWaSd5jpB6P&q=85&s=80ac6ca96dc6ef00d156c49b5e349feb" alt="Foundry Enter Prompt" width="1898" height="995" data-path="en/images/foundry_client_prompt.png" />
    </Frame>
  </Step>
</Steps>
