Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Sample to create an AI Agent using OpenAI models with any MCP server running on Azure Container Apps
GitHub checked 568h ago - refresh overdue
name: .NET OpenAI MCP Agent description: This is an MCP agent app written in .NET, using OpenAI, with a remote MCP server written in TypeScript. languages:
This is an MCP agent app written in .NET, using Azure OpenAI, with a remote MCP server written in TypeScript.
This app provides features like:

You can now use GitHub Codespaces to run this sample app (takes several minutes to open it)! 👉 .
gpt-5-mini.Create a directory for the app.
# zsh/bash
mkdir -p openai-mcp-agent-dotnet
# PowerShell
New-Item -ItemType Directory -Path openai-mcp-agent-dotnet -Force
Initialize azd.
cd openai-mcp-agent-dotnet
azd init -t openai-mcp-agent-dotnet
NOTE: You'll be asked to enter an environment name, which will be the name of your Azure Resource Group. For example, the environment name might be
openai-mcp-agent.
Check that you have the necessary permissions:
Microsoft.Authorization/roleAssignments/write permission, such as Role Based Access Control Administrator, User Access Administrator, or Owner at the subscription level.Microsoft.Resources/deployments/write permission at the subscription level.Login to Azure.
azd auth login
Deploy apps to Azure. It will automatically find the MCP server app and deploy it at the same time.
azd up
NOTE:
By default, the MCP client app is protected by the ACA built-in auth feature. You can turn off this feature before running
azd upby setting:azd env set USE_LOGIN falseBy default, the agent uses
gpt-5-mini. You can change it to something else by setting:azd env set GPT_MODEL_NAME <azure-openai-model-name>By default, the agent uses the keyless approach for Azure OpenAI authentication. You can change it to use Azure OpenAI API key by setting:
azd env set AOAI_USE_API_KEY trueBy default, the agent is production mode. You can change it to the development mode to either
BothorClientthat shows more detailed logs by setting:azd env set ENABLE_DEVELOPMENT_MODE BothBy default, the MCP server app is production mode. You can change it to the development mode to either
BothorServerthat shows more detailed logs by setting:azd env set ENABLE_DEVELOPMENT_MODE BothDuring the deployment,
- You will be asked to enter the Azure Subscription and two locations - one for Azure AI Foundry and the other for the rest of resources.
In the terminal, get the client app URL deployed. It might look like:
https://mcptodo-clientapp.{{some-random-string}}.{{location}}.azurecontainerapps.io/
Navigate to the client app URL, log-in to the app and enter prompts like:
Give me list of to do.
Set "meeting at 1pm".
Give me list of to do.
Mark #1 as completed.
Delete #1 from the to-do list.
NOTE: You might not be asked to login, if you've set the
USE_LOGINvalue tofalse.
Clean up all the resources deployed.
azd down --force --prune
GitHub checked 16h ago - refresh overdue. Recently viewed repositories target hourly refresh. Last refresh failed: GitHub network error or request timeout. Saved data may be stale. This repository is archived.