Building your own MCP server | Made for Dev Ep. 5
In this fifth episode of the Made for Dev Show, host SIMON is joined by Stuart, a Microsoft MVP and Software Engineer, for a comprehensive guide on building your own Model Context Protocol (MCP) server from scratch using the C# SDK.
👉 Core Topics Covered
What is MCP?: A brief overview of the open-source standard for connecting AI applications to external systems like APIs, databases, and local software [00:34].
The Three Building Blocks of MCP: • Tools: Functions that the LLM can execute (e.g., "search flights" or "send messages") [01:45]. • Resources: Read-only data sources that provide context to the agent (e.g., database tables or binary files) [02:08]. • Prompts: Reusable templates or examples that help users interact with the LLM more efficiently [02:41].
Hands-on with C# SDK: Stuart demonstrates how to build a Dunder Mifflin-themed MCP server using the C# SDK (currently in preview). He shows how to use reflection and attributes ([McpServerTool]) to expose functions to the LLM [04:17], [07:14].
Local vs. Remote Servers:
• Local: Uses Standard IO (stdio) for communication within your machine [05:52]. • Remote: Uses HTTP transport, allowing you to host the server in the cloud (e.g., Azure) [06:18], [10:23].
5 .Integration with Developer Tools: • GitHub Copilot: Connecting a local MCP server to VS Code's Copilot Chat to query a live database [11:10]. • Azure AI Foundry: Deploying the server to the cloud and integrating it into a custom AI agent [19:27].
👉Key Highlights
• Dunder Mifflin Demo: See the server in action as it retrieves employee details for Jim Halpert directly from a database through a simple natural language query [12:26]. • Prompt Templates: A demonstration of how slash commands in VS Code can pre-fill complex prompt templates for the user [14:46]. • Employee Handbook Resource: How to attach an entire handbook as a context resource so the LLM can answer questions about "company values" with zero external training [18:01].
#GlobalAICommunity #MadeForDev #MCP #ModelContextProtocol #DotNet #CSharp #AIAgents #SoftwareEngineering #AzureAIFoundry #GitHubCopilot