# Old API, New Tricks: Add MCP to Existing .NET REST Endpoints - Jonathan "J." Tower - NDC Oslo 2026

## Executive summary

This talk details how to enhance existing ASP.NET Core REST APIs to function as AI-powered services by implementing the Model Context Protocol (MCP). MCP allows Large Language Models (LLMs) and agents to interact with traditional back-end systems, transforming technical plumbing into intelligent, task-focused tools. The session focuses on using the MCP C# SDK to annotate existing controllers and demonstrate secure, streamable HTTP integration.

## Key takeaways

- MCP as an AI Interface Layer: MCP acts as a standardized protocol, allowing LLMs to access data and functionality from disparate systems (like CRMs or databases) without requiring custom integration for every single system.
- Tool Descriptions are the Contract: Unlike REST APIs, where the contract is often implicit via HTTP verbs and URLs, MCP relies on explicit, human-language descriptions (via attributes) to communicate what a tool does, how to use it, and what to expect back.
- Orchestration by the LLM: MCP enables LLMs to perform multi-step orchestration automatically. An agent can be instructed to complete a complex task (e.g., 'create and mark complete') which requires calling multiple underlying MCP tools.
- Security and Debugging: The MCP specification now includes built-in support for OAuth 2.1, which handles authentication via a session ID, preventing token leakage into the LLM context. Debugging is facilitated by the Model Context Protocol Inspector (via NPM).

## Technical details

- MCP Definition and Scope: MCP (Model Context Protocol) is an open-source standard, originally created by Anthropic, designed to provide a standardized way for LLMs to connect to external systems (databases, file stores, existing APIs).
- MCP C# SDK Implementation: The MCP C# SDK allows .NET developers to implement both servers and clients. Tools and resources are exposed by applying attributes (e.g., `[MCP server tool]`, `[description]`) to classes and functions.
- Transport Mechanisms: MCP supports several transports, including standard input/output (for local utilities) and streamable HTTP, which is crucial for handling the slow generation time of LLM outputs by providing real-time notifications.
- Integration Pattern: The integration pattern demonstrated involves mapping REST endpoints (minimal APIs or controllers) to MCP tools, with the logic residing in a shared service layer, making the underlying implementation agnostic to the calling protocol (REST or MCP).

## Practical implications

- Existing REST APIs can be repurposed to serve AI agents, allowing them to perform complex, multi-step tasks that previously required custom front-end orchestration.
- The use of explicit tool descriptions ensures that LLMs understand the precise function and parameter constraints, leading to more reliable agent behavior.
- The MCP C# SDK provides a unified abstraction layer (MEAI integration) that allows the same logic to be used regardless of whether the underlying LLM is local or cloud-based.

## Topics

AI, API Design, LLMs, ASP.NET Core, Protocol Engineering, MCP C# SDK, Model Context Protocol Inspector, Entra ID (Azure Identity Store)

Source: https://www.youtube.com/watch?v=x1yHrI-wvAU
