MCP with .NET: securely exposing your data to LLMs
summary
Builds a working MCP server in C# using the MCP .NET SDK and reuses existing logic via Semantic Kernel filters, registers tools like get-speaker and random-conference, persists ratings state across calls, and successfully connects to VS Code over STDIO (discovered 5–7 tools). Shows HTTP hosting for production with .NET Aspire, deployment to Azure Container Apps, and protection behind Azure API Management for rate limiting, auth (OAuth 2.1), tracing and semantic caching; demonstrates the approach scales and identifies tool and prompt injection risks.
AI-written summary · about
chapters (16)
- 0:00Introduction to MCP and .NET
- 1:51What is MCP
- 3:34MCP architecture terms
- 6:46MCP capabilities and security
- 8:11MCP tools and resources
- 14:12Building MCP server with .NET
- 15:39Demo: basic MCP server in C#
- 20:33MCP integration with VS Code
- 27:14Semantic Kernel with MCP
- 30:07Securing MCP with OAuth 2.1
- 37:40Security threats in AI and MCP
- 42:32Scaling MCP servers
- 44:40Deploying MCP with .NET Aspire
- 51:08Hosting MCP in Azure
- 55:19MCP in .NET: best practices
- 56:45Q&A
related talks
35mMCP, or not MCP
25mYour Insecure MCP Server Won't Survive Production
21mMCP Best Practices
13mCloud MCP Servers Under Fire
14m(possible dupe but better sound) What does Enterprise Ready MCP mean?
45mSecuring MCP Servers with Spring AI
26mSecure Your MCP Servers with OAuth, JWT, SPIFFE and More
29mMCP Security: Keep Your AI Agents from Spilling the Tea
