Files
agent-framework/dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP
T
Mark Wallace 2b4ff5f076 .NET: Sample for the MCP and Foundry Agents documentation (#972)
* Foundry Agent MCP

* Foundry Agent MCP

* Use Foundry SDK directly

* Use raw representation factory

* Fix typo

---------

Co-authored-by: Mark Wallace <markwallace@microsoft.com>
2b4ff5f076 ยท 2025-10-01 07:37:12 +00:00
History
..

Prerequisites

Before you begin, ensure you have the following prerequisites:

  • .NET 8.0 SDK or later
  • Azure Foundry service endpoint and deployment configured
  • Azure CLI installed and authenticated (for Azure credential authentication)

Note: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with az login and have access to the Azure Foundry resource. For more information, see the Azure CLI documentation.

Set the following environment variables:

$env:AZURE_FOUNDRY_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project" # Replace with your Azure Foundry resource endpoint
$env:AZURE_FOUNDRY_PROJECT_DEPLOYMENT_NAME="gpt-4o-mini"  # Optional, defaults to gpt-4o-mini