openai-mcp-agent-dotnet

MCP.Pizza Chef: Azure-Samples

openai-mcp-agent-dotnet is a .NET Blazor-based MCP client application that integrates OpenAI models with remote MCP servers. It demonstrates a secure, containerized architecture running on Azure Container Apps, connecting to a TypeScript-based MCP server. This client app supports authentication and enables developers to build AI agents leveraging OpenAI, Azure OpenAI, and other LLM providers within the MCP ecosystem.

Use This MCP client To

Build AI agents using OpenAI models with any MCP server Connect .NET applications to remote MCP servers securely Deploy MCP clients and servers on Azure Container Apps Implement authentication for MCP client-server communication Develop AI-enhanced workflows in .NET Blazor environments Demonstrate integration of OpenAI models with MCP protocol

README

.NET OpenAI MCP Agent

This is an MCP agent app written in .NET, using Azure OpenAI, with a remote MCP server written in TypeScript.

Features

This app provides features like:

  • The MCP host + MCP client app is written in .NET Blazor.
  • The MCP client app connects to a to-do MCP server written in TypeScript.
  • Both MCP client and server apps are running on Azure Container Apps (ACA).
  • The MCP client app is secured by the built-in auth of ACA.
  • The MCP server app is only accessible from the MCP client app.

Overall architecture diagram

Prerequisites

Getting Started

You can now use GitHub Codespaces to run this sample app (takes several minutes to open it)! 👉 Open in GitHub Codespaces.

Get Azure AI Foundry or GitHub Models

openai-mcp-agent-dotnet FAQ

How does openai-mcp-agent-dotnet secure communication with the MCP server?
It uses Azure Container Apps' built-in authentication to restrict access to the MCP server.
What programming languages and frameworks are used in openai-mcp-agent-dotnet?
The client is built with .NET Blazor, and the MCP server is written in TypeScript.
Can openai-mcp-agent-dotnet work with other LLM providers besides OpenAI?
Yes, it supports OpenAI, Azure OpenAI, Claude, Gemini, and other MCP-compatible LLMs.
What are the deployment requirements for openai-mcp-agent-dotnet?
It requires .NET 9 SDK, Visual Studio Code with C# Dev Kit, node.js LTS, and Docker Desktop for local development and containerization.
Is the MCP server accessible publicly in this architecture?
No, the MCP server is only accessible from the MCP client app, ensuring secure communication.
How does openai-mcp-agent-dotnet demonstrate MCP protocol usage?
It shows how to create an AI agent client that interacts with a remote MCP server using the MCP protocol.
Can this client be extended to other MCP servers?
Yes, it is designed to connect with any MCP server implementing the protocol, enabling flexible AI agent development.