mcpField
M
Model Context Protocol .NET Samples

Model Context Protocol .NET Samples

Local
aka.msDeveloper Tools201Updated 1d ago

About Model Context Protocol .NET Samples

Model Context Protocol .NET Samples is a collection of examples showing how to build and use MCP servers and clients with .NET. It is intended for developers adding MCP to .NET applications, with samples ranging from custom implementations to Azure service integration.

Key features

  1. 01Samples for creating MCP servers in .NET
  2. 02Includes Awesome Copilot and Markdown to HTML samples
  3. 03Includes Outlook email and to-do list samples
  4. 04Covers integration with Azure services

Use cases

  1. 01Learning how to implement an MCP server in .NET
  2. 02Referencing the structure of email or to-do MCP servers
  3. 03Building Azure-integrated MCP features for .NET applications

MCP support

The samples show how to build MCP servers and clients in .NET; the included servers expose tools such as sending email through Outlook and managing to-do items.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"dotnet-samples": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:1.0.2026102701"
]
}
}
}
Run commanddocker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:1.0.2026102701

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocighcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:1.0.2026102701

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Model Context Protocol .NET Samples

Microsoft Foundry Community Discord Microsoft Foundry Developer Forum

🚀 Introduction

Welcome to the Model Context Protocol (MCP) .NET Samples repository! This collection of samples demonstrates how to leverage the Model Context Protocol in .NET applications.

MCP is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). Think of MCP like a USB-C port for AI applications - it provides a standardized way to connect AI models to different data sources and tools.

With MCP, you can:

  • Utilize pre-built integrations that your LLM can directly plug into
  • Flexibly switch between LLM providers and vendors
  • Follow best practices for securing your data within your infrastructure
  • Build agents and complex workflows on top of LLMs

This repository contains .NET samples ranging from building your own MCP implementation to integrating with Azure services.

📋 Sample Projects

Sample NameInstallDescription
Awesome CopilotInstall in VS Code
Install in VS Code Insiders
Install in Visual Studio
MCP server that retrieves GitHub Copilot customization files from awesome-copilot.
Markdown to HTMLInstall in VS Code
Install in VS Code Insiders
Install in Visual Studio
MCP server that converts markdown text to HTML.
Outlook EmailInstall in VS Code
Install in VS Code Insiders
Install in Visual Studio
MCP server that sends emails through Outlook.
To-do ListInstall in VS Code
Install in VS Code Insiders
Install in Visual Studio
MCP server that manages to-do list items.

🛠️ Getting Started

Details on how to set up and run the samples will be provided in each sample's directory.

📚 Learning Resources

🚶‍♀️ Next Steps

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.