Building your own MCP server

Microsoft Developer shows how to build a Model Context Protocol (MCP) server from scratch using the MCP C# SDK, then connect it to an AI agent in Microsoft Foundry by defining tools, prompts, and resources that bridge real systems with LLMs.

Overview

The video introduces the Model Context Protocol (MCP) as a standard way to connect LLMs to external systems, and walks through implementing an MCP server in C# using the MCP C# SDK. It also covers how to define and expose MCP capabilities (tools, prompts, and resources) and then leverage them from an AI agent in Microsoft Foundry.

What the session covers

Building an MCP server with C#

Defining MCP capabilities

Using the MCP server from an agent in Microsoft Foundry