Beginner's Guide to Building a MCP Server with C# and .NET

James Montemagno April 10, 2025
Video Thumbnail

About

No channel description available.

Video Description

Looking to get started building and testing your own Model Context Protocol (MCP) server? Look no further than the new C# SDK for MCPs. You can build both client and servers with a delightful API that gets you up and running in minutes. Best of all you can build, test, and deploy directly from VS Code. Links: C# SDK Announcement: https://devblogs.microsoft.com/blog/microsoft-partners-with-anthropic-to-create-official-c-sdk-for-model-context-protocol My Blog: https://devblogs.microsoft.com/dotnet/build-a-model-context-protocol-mcp-server-in-csharp/ C# SDK on GitHub: https://github.com/modelcontextprotocol/csharp-sdk Azure Functions: https://techcommunity.microsoft.com/blog/AppsonAzureBlog/build-ai-agent-tools-using-remote-mcp-with-azure-functions/4401059 Container docs: https://learn.microsoft.com/dotnet/core/containers/publish-configuration Monkey MCP: https://github.com/jamesmontemagno/MonkeyMCP/ Chapters: 00:00 - Intro 02:50 - Create project & install NuGets 04:38 - Boilerplate code and testing MCP server 11:25 - Real MCP server tool functions that call APIs 18:40 - Containerizing and deploying MCP server to docker 23:05 - Wrap-up Join this channel to get access to perks: https://www.youtube.com/channel/UCENTmbKaTphpWV2R2evVz2A/join 👕 Buy some swag! - https://jamesmontemagno.myspreadshop.com/ ☕️ Buy me a coffee - https://www.buymeacoffee.com/jamesmontemagno Follow: 👨‍💻 GitHub: https://github.com/jamesmontemagno 🦜 X: https://x.com/jamesmontemagno 📄 Website: https://www.montemagno.com 📰 Newsletter: https://newsletter.montemagno.com/ Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own. What is on my hat? It is the CLE clothing logo because I am from Cleveland! Checkout their awesome CLE merch: https://cleclothingco.myshopify.com/ What is that art on my wall? It is an original piece from the French street artist Gregos of La Butte Montmartre: https://www.instagram.com/p/BceZ1oNHiQx/ My Setup: 📷 Canon M50 Mark II - https://amzn.to/3P8R7lp 💡 Nanoleaf Elements Lights - https://amzn.to/3umwJVW 🎙 Blue Spark Microphone - https://amzn.to/3qgtYkq 🎙 Blue Pop Filter - https://amzn.to/3jEWM3r 🤳 Rode Microphone Arm - https://amzn.to/2Z68AlE 🎧 Sony MDR7306 Headphones - https://amzn.to/372jxta 📲 Stream Deck - https://amzn.to/373Uk1n 🖱 MX Master 2S Mouse - https://amzn.to/3d7J2gj ⌨️ Tecware Phantom Keyboard - https://amzn.to/3aUP4y9 Using links I provide I may receive a commission if you buy something which helps support the channel. #vscode #csharp #dotnet #mcp #mcpserver #githubcopilot

You May Also Like

C# Server Build Essentials

AI-recommended products based on this video

Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22
Loading...
USB C Cable 3Pack USB C to USB C Cable 10FT 60W Type C Charger Nylon Braided Compatible with iPhone 17 16 Pro/15 Pro/Plus/Max/iPad/MacBook and More

USB C Cable 3Pack USB C to USB C Cable 10FT 60W Type C Charger Nylon Braided Compatible with iPhone 17 16 Pro/15 Pro/Plus/Max/iPad/MacBook and More

(16)
$13.99
Prime
800+ bought in past month
Loading...
Syntech Link Cable 16FT for PCVR Compatible with Oculus/Quest 3/Meta Quest 3S, Quest2/Pro/Pico 4/Ultra Accessories and PC/SteamVR, High Speed PC Data Transfer, USB 3.0 to USB C Cable for VR Headset
Best Seller

Syntech Link Cable 16FT for PCVR Compatible with Oculus/Quest 3/Meta Quest 3S, Quest2/Pro/Pico 4/Ultra Accessories and PC/SteamVR, High Speed PC Data Transfer, USB 3.0 to USB C Cable for VR Headset

(19,554)
$24.99
FREE delivery Tue, Jun 17 on your first order
300+ bought in past month
Loading...
USB to USB C Cable for iPhone 16/15 [MFi Certified] Carplay Cable Car Charger Cord 6FT/4Pack Compatible with iPhone 16/16 Plus/16 Pro/16 Pro Max, iPhone 15/15 Plus/15 Pro/15 Pro Max,iPad Air/Mini

USB to USB C Cable for iPhone 16/15 [MFi Certified] Carplay Cable Car Charger Cord 6FT/4Pack Compatible with iPhone 16/16 Plus/16 Pro/16 Pro Max, iPhone 15/15 Plus/15 Pro/15 Pro Max,iPad Air/Mini

(1,176)
$16.97
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
Car Carplay Cable for iPhone 16/16 Pro Max/16 Plus/15 Pro Max Plus, 3.3ft USB to USB C Cable Compatible with Apple Car Play iPhone 16 15 Cord, USB A to USB C Car Charger Cable Cord (Black)

Car Carplay Cable for iPhone 16/16 Pro Max/16 Plus/15 Pro Max Plus, 3.3ft USB to USB C Cable Compatible with Apple Car Play iPhone 16 15 Cord, USB A to USB C Car Charger Cable Cord (Black)

(2)
$8.99
FREE delivery Sun, Jun 15 on your first order
Loading...
Gigastone 32GB 5-Pack Micro SD Card, Camera Plus, Nintendo-Switch Compatible, High Speed 90MB/s, 4K Video Recording, Micro SDHC UHS-I A1 Class 10

Gigastone 32GB 5-Pack Micro SD Card, Camera Plus, Nintendo-Switch Compatible, High Speed 90MB/s, 4K Video Recording, Micro SDHC UHS-I A1 Class 10

(8,903)
$34.98
FREE delivery Sat, Jun 14 on your first order
400+ bought in past month
Loading...
Inland 32GB Class 10 SDHC Flash Memory Card Standard Full Size SD Card USH-I U1 Trail Camera by Micro Center (2 Pack)

Inland 32GB Class 10 SDHC Flash Memory Card Standard Full Size SD Card USH-I U1 Trail Camera by Micro Center (2 Pack)

(41,906)
$35.32$35.15
FREE delivery Sun, Jun 15
Loading...
MSI MAG A550BN, Non-Modular Compact 550W Power Supply, 80+ Bronze, Low-Noise Fan, Active PFC Design, 5 Year Warranty

MSI MAG A550BN, Non-Modular Compact 550W Power Supply, 80+ Bronze, Low-Noise Fan, Active PFC Design, 5 Year Warranty

(1,215)
$69.99
FREE delivery Sat, Jan 3
100+ bought in past month
Loading...
MSI MAG A850GL PCIE5 White, Fully Modular Compact Gaming 850W Power Supply, 80+ Gold, ATX 3.1 & PCIe 5.1 Ready, Native Dual-Color 12V-2x6 Cable, 10 Year Warranty

MSI MAG A850GL PCIE5 White, Fully Modular Compact Gaming 850W Power Supply, 80+ Gold, ATX 3.1 & PCIe 5.1 Ready, Native Dual-Color 12V-2x6 Cable, 10 Year Warranty

(217)
$144.99
FREE delivery Sun, Jan 4Only 8 left in stock.
50+ bought in past month
Loading...
MSI MPG A1000GS PCIE5, Fully Modular Gaming 1000W Power Supply, 80+ Gold, Dual 12V-2x6 Cables, Server-Grade, ATX 3.1 & PCIe 5.1, Low-Noise, Semi Digital, Embossed Jacket Cables, 10 Year Warranty

MSI MPG A1000GS PCIE5, Fully Modular Gaming 1000W Power Supply, 80+ Gold, Dual 12V-2x6 Cables, Server-Grade, ATX 3.1 & PCIe 5.1, Low-Noise, Semi Digital, Embossed Jacket Cables, 10 Year Warranty

(192)
$169.99
FREE delivery Sat, Jan 3
50+ bought in past month
Loading...
MSI MPG A850GS PCIE5, Fully Modular Gaming 850W Power Supply, 80+ Gold, Dual 12V-2x6 Cables, Server-Grade, ATX 3.1 & PCIe 5.1 Ready, Low-Noise, Semi Digital, Embossed Jacket Cables, 10 Year Warranty

MSI MPG A850GS PCIE5, Fully Modular Gaming 850W Power Supply, 80+ Gold, Dual 12V-2x6 Cables, Server-Grade, ATX 3.1 & PCIe 5.1 Ready, Low-Noise, Semi Digital, Embossed Jacket Cables, 10 Year Warranty

(32)
$139.99
FREE delivery Jan 7 - 9
50+ bought in past month
Loading...
Laplink PCmover Ultimate 11 - Migration of your Applications, Files and Settings from an Old PC to a New PC - Data Transfer Software - With Optional High Speed Ethernet Cable - 1 License

Laplink PCmover Ultimate 11 - Migration of your Applications, Files and Settings from an Old PC to a New PC - Data Transfer Software - With Optional High Speed Ethernet Cable - 1 License

(4,609)
$54.95
PrimeFREE delivery Sat, Jun 14
Loading...
Dell P2725H 27" Full HD 1920 x 1080 Monitor - 1 Year Warranty, Computer Monitor Screen Bundle with Power Cable + USB 3.0 Upstream Cable + Display Port Cable + HDMI Cable + Microfiber Cloth Included

Dell P2725H 27" Full HD 1920 x 1080 Monitor - 1 Year Warranty, Computer Monitor Screen Bundle with Power Cable + USB 3.0 Upstream Cable + Display Port Cable + HDMI Cable + Microfiber Cloth Included

(35)
$539.87$539.34
FREE delivery Oct 8 - 10
Loading...
Dell P2425H Computer Monitor Screen 24" 16:9 IPS Display 100Hz w/Stand - 1 Year Warranty, Full HD, 1920 x 1080 with Power Cord + DisplayPort Cable + HDMI Cable + USB 3.0 Cable + Microfiber Cloth

Dell P2425H Computer Monitor Screen 24" 16:9 IPS Display 100Hz w/Stand - 1 Year Warranty, Full HD, 1920 x 1080 with Power Cord + DisplayPort Cable + HDMI Cable + USB 3.0 Cable + Microfiber Cloth

(57)
$981.72
Loading...
Acer PM161Q Bbmiuux 15.6" Full HD (1920 x 1080) Widescreen Portable IPS Display | AMD FreeSync Technology | 4ms (G to G) | 2 Speakers | USB Type-C Cable and Mini HDMI Cable

Acer PM161Q Bbmiuux 15.6" Full HD (1920 x 1080) Widescreen Portable IPS Display | AMD FreeSync Technology | 4ms (G to G) | 2 Speakers | USB Type-C Cable and Mini HDMI Cable

(149)
$157.04$119.76
FREE delivery Mon, Aug 11
100+ bought in past month
Loading...
Acer EDA270U Pbmiipx 27" WQHD (2560 x 1440) 1500R Curved Widescreen Gaming Display | AMD FreeSync Premium | 1ms (VRB) | up to 170Hz Refresh | HDR 10 | 2 Speakers | Display Port and HDMI Cable Incl.
Amazon's Choice

Acer EDA270U Pbmiipx 27" WQHD (2560 x 1440) 1500R Curved Widescreen Gaming Display | AMD FreeSync Premium | 1ms (VRB) | up to 170Hz Refresh | HDR 10 | 2 Speakers | Display Port and HDMI Cable Incl.

(714)
199.96
PrimeFREE delivery Sunday, June 15.
200+ bought in past month
Loading...
TERRAMASTER F8 SSD Plus NAS - 8Bay All SSD NAS Storage Core i3 8-Core 8-Thread CPU, 16GB DDR5 RAM, 10GbE Port, 8 Heat Sinks Included, Palm-Sized Network Attached Storage Peak Performance (Diskless)

TERRAMASTER F8 SSD Plus NAS - 8Bay All SSD NAS Storage Core i3 8-Core 8-Thread CPU, 16GB DDR5 RAM, 10GbE Port, 8 Heat Sinks Included, Palm-Sized Network Attached Storage Peak Performance (Diskless)

(35)
$1,099.99
FREE delivery Mon, Aug 11
Loading...
DHT11 modules Digital Temperature and Humidity Temperature Sensor for arduino DIY KIT 5pcs

DHT11 modules Digital Temperature and Humidity Temperature Sensor for arduino DIY KIT 5pcs

(1)
$15.99
FREE delivery Sat, Jun 14 on your first order