Build .NET MCP server that scans for unsafe tools
Authorised Territory demonstrates how to build a .NET Model Context Protocol (MCP) server over HTTP that scans for unsafe tools on startup, using the Microsoft.AgentGovernance.Extensions.ModelContextProtocol NuGet package, and pairs it with a simple .NET console client that connects to the server.
Overview
The video walks through creating:
- A .NET MCP server using HTTP transport.
- A startup-time tool safety scan to detect/flag unsafe tools before the server accepts connections.
- A .NET console app client that attempts to connect to the MCP server.
Technologies referenced
- .NET / C#
- Model Context Protocol (MCP)
- NuGet package:
Microsoft.AgentGovernance.Extensions.ModelContextProtocol - HTTP transport for MCP communication
What the build includes
- MCP server project setup
- Tool scanning behavior executed on server startup
- Console client project setup and connection attempt to the MCP server