News
Trending Model Context Protocol for AI Agents Gets C# SDK
The Model Context Protocol (MCP) for agentic AI has gained much traction since being introduced by Anthropic last November, and now it has a C# SDK.
The MCP is a standard for integrating large language models (LLMs) with external tools and data sources -- or in other words, enabling AI agents to go and do things on their own, interacting with UIs to book flights and so on.
Anthropic took the MCP to open source, and Microsoft, working in partnership with Anthropic, is doing the same for the ModelContextProtocol NuGet package, already at more than 21,000 downloads despite being in an early 0.1.0-preview.8 version, apparently first published about three weeks ago.
[Click on image for larger view.] MCP NugGet (source: Microsoft).
"MCP has seen rapid adoption in the AI community, and this partnership aims to enhance the integration of AI models into C# applications," said Microsoft in an April 2 announcement.
"Rapid adoption" might be understating things for the MCP, which immediately gained support throughout the industry and has seen widespread usage. It's helping shape the future of agentic AI, along with a new protocol from Google called A2A that facilitates communication among AI models, working in tandem with the MCP (see "Protocols for Agentic AI: Google's New A2A Joins Viral MCP").
[Click on image for larger view.] MCP Architecture (source: Microsoft).
Many organizations -- including major players like OpenAI, Google DeepMind and more -- have signed on and are integrating the standard into their platforms.
It's also instrumental for GitHub Copilot Agent Mode in the new Visual Studio Code v1.99. "When you input a chat prompt using agent mode in VS Code, the model can invoke various tools to perform tasks such as file operations, accessing databases, or retrieving web data," the dev team said when v1.99 shipped. "This integration enables more dynamic and context-aware coding assistance." (See "VS Code v1.99 Is All About Copilot Chat AI, Including Agent Mode".)
Using a GitHub MCP Tool in Chat
Microsoft also leverages the protocol in offerings like Sematic Kernel.
"And many Microsoft products are creating MCP servers to access their functionality," Microsoft said. "The GitHub MCP Server and Playwright MCP for browser automation are popular examples, with many more in the works." An MCP server is a lightweight, standardized program that exposes data or functionality to LLMs via the MCP interface.
Now, creating MCP servers and doing other work with the protocol in C# is easier with the SDK.
"C# is a popular programming language used by many developers, especially in the enterprise space," Microsoft said. "By creating an official C# SDK for MCP, Microsoft aims to make it easier for developers to integrate AI models into their C# applications and build MCP servers using C#. The C# SDK also leverages the significant performance improvements in modern .NET, providing excellent speed and efficiency for AI applications. With .NET’s optimized runtime and support for containerization, services perform well in local development scenarios. And many of Microsoft’s core products are written in C#, including Visual Studio, the majority of Azure services, services powering Microsoft Teams and XBOX, and many more. All these products can benefit from the Model Context Protocol, and the C# SDK provides the foundation for that."
Samples can be tried out in the project's GitHub repo.
About the Author
David Ramel is an editor and writer at Converge 360.