Migrating a .NET AI agent from function tools to MCP client integration, showing the architectural shift from duplicated HTTP tool classes to a single MCP Server.

From Function Tools to MCP: Migrating an AI Agent to the Model Context Protocol

When I first built an AI Agent for my personal health platform Biotrackr, I used the Microsoft Agent Framework’s function tool pattern with 12 tools decorated with [Description] attributes, registered via AIFunctionFactory.Create(). This wasn’t ideal as I already had an MCP Server exposing the same 12 tools to VS Code and other MCP clients. The natural approach would have been to make the Chat API another MCP client. But there was a blocker. The Anthropic provider in Microsoft Agent Framework (Microsoft.Agents.AI.Anthropic) didn’t support Local MCP Tools. If I wanted to use Claude as the LLM backend (which I did), function tools were the only option. So I duplicated all 12 tool implementations in the Chat API, complete with their own models, validation logic, and API call code. ...

March 22, 2026 · 16 min · Will Velida
Building a health data chat agent using Claude as the LLM backend with the Microsoft Agent Framework in .NET 10, featuring function tools, AG-UI streaming, and system prompt design.

Building a Health Data Chat Agent with Claude and the Microsoft Agent Framework

Using the Microsoft Agent Framework, we can build agents that interact with our data via chat capabilities. In my personal project, I decided to create a Chat API that allows me to query my data via a chat interface using an LLM. I wasn’t keen on using OpenAI, or even provisioning Microsoft Foundry to create a deployment so that I could use an LLM that they provide. I decided to just grab an API key for Anthropic so that I could use Claude, and hook it up into my agent so I wouldn’t have to worry about managing any Foundry infrastructure. ...

March 10, 2026 · 14 min · Will Velida