8000
Skip to content

bovrhovn/azure-demos-mcp-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Azure MCP Examples

Real-world Model Context Protocol (MCP) demos for agentic AI development on Azure

License: MIT MCP Spec Azure


📋 Overview

This repository contains hands-on demos and examples that show how to build agentic AI applications using the Model Context Protocol (MCP) on Azure. MCP is an open standard that lets AI models securely connect to external data sources, tools, and services through a unified interface.

Whether you're building your first MCP server or wiring up a complex multi-agent pipeline, you'll find working examples here to get you started.


🗂️ Repository Structure

Folder Purpose
src/ 📦 Source code — MCP server/client implementations and sample apps
docs/ 📚 Documentation — architecture guides, concepts, and how-tos
tests/ 🧪 Tests — unit and integration tests for all examples

🧩 Examples

MCP.DotNetMethod — .NET Method as an AI Tool

Demonstrates how to wrap a plain static .NET method as an AI tool using AIFunctionFactory.Create and invoke it through an Azure AI Foundry chat-completion model with DefaultAzureCredential.

Resource Link
Source code src/ADMcpExamples/MCP.DotNetMethod/
Documentation docs/dotnet-method.md
Tests tests/MCP.DotNetMethod.Tests/

Required environment variables:

Variable Description
Endpoint Azure OpenAI resource URI (e.g. https://my-resource.openai.azure.com/)
DeploymentName Name of your chat-completion deployment (e.g. gpt-4o)

Authentication uses DefaultAzureCredential — run az login or sign into Visual Studio before running locally.


MCP.TaxServer — MCP Server with HTTP Transport

An ASP.NET Core MCP server that exposes a tax calculation tool (get_tax_for_customer) over a stateless HTTP transport. Clients connect to /mcp to list and invoke tools.

Resource Link
Source code src/ADMcpExamples/MCP.TaxServer/
Documentation docs/tax-server.md
Tests tests/MCP.TaxServer.Tests/

No Azure credentials are required to run the server. No environment variables needed.


MCP.TaxClient — MCP Client with Azure AI Foundry

A console application that connects to a running MCP server, retrieves its tools, and passes them to an Azure AI Foundry chat-completion model. The model invokes the tax tool automatically based on the user's question.

Resource Link
Source code src/ADMcpExamples/MCP.TaxClient/
Documentation docs/tax-client.md
Tests tests/MCP.TaxClient.Tests/

Required environment variables:

Variable Description
Endpoint Azure OpenAI resource URI (e.g. https://my-resource.openai.azure.com/)
McpEndpoint URL of a running MCP server /mcp endpoint (e.g. http://localhost:5000/mcp)
DeploymentName Name of your chat-completion deployment (e.g. gpt-4o)

Authentication uses DefaultAzureCredential — run az login or sign into Visual Studio before running locally.


🚀 Getting Started

  1. Clone the repository

    git clone https://github.com/bovrhovn/azure-demos-mcp-examples.git
    cd azure-demos-mcp-examples
  2. Read the docs — start with the documentation folder for architecture overviews and prerequisites.

  3. Browse examples — explore the source folder to find a demo that matches your scenario.

  4. Run the tests — use the tests folder to verify your environment is configured correctly.


🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository and create a feature branch.
  2. Add your example or fix under the appropriate folder (src/, docs/, or tests/).
  3. Open a pull request with a clear description of your change.

📖 Additional Information

🏛️ Official MCP Resources

Resource Link
MCP on Windows — Microsoft Learn learn.microsoft.com
Microsoft Learn MCP Server overview learn.microsoft.com
Microsoft Learn MCP Server release notes learn.microsoft.com
Get started with .NET AI and MCP learn.microsoft.com
Official MCP Specification (2025-03-26) modelcontextprotocol.io

🧰 Tools & SDKs

Resource Link
Microsoft MCP catalog (GitHub) github.com/microsoft/mcp
MCP Python SDK github.com/modelcontextprotocol/python-sdk
MCP TypeScript SDK github.com/modelcontextprotocol/typescript-sdk
MCP C# SDK github.com/modelcontextprotocol/csharp-sdk

📰 Articles & Blogs

Resource Link
How we built the Microsoft Learn MCP Server devblogs.microsoft.com
Kickstart Your AI Development with MCP (Microsoft Tech Community) techcommunity.microsoft.com
Azure AI Foundry documentation learn.microsoft.com
DefaultAzureCredential overview learn.microsoft.com
AIFunctionFactory in Microsoft.Extensions.AI learn.microsoft.com

Built with ❤️ using Model Context Protocol and Microsoft Azure

About

MCP examples in agentic AI development

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

0