September 01, 2025

Photo Credit: ChatGPT & Dall-E by OpenAI
Building Agentic Systems with MCP in .NET – Getting Started
The AI ecosystem is evolving rapidly. Large Language Models (LLMs) are no longer just text predictors—they can reason, analyze, and even take actions.
But here’s the challenge: how do we let these models safely and consistently interact with real-world data and tools?
That’s where MCP – Model Context Protocol comes in.
This blog series will walk you through building agentic systems with MCP in .NET, starting from the basics and ending with real-world agent workflows powered by multiple LLMs.
🎯 What This Series Covers
Here’s the roadmap:
-
Episode 1 (this post):
What is MCP, how they differ from APIs, How does MCP actually work, and building a simple first MCP server in .NET and connect and call using a MCP Inspector. -
Episode 2:
Lets use llms and how they easily interact with standard MCP tools and enhance MCP workflows. -
Episode 3:
Going Agentic – using multiple agents with single responsibility. -
Episode 4:
Multiple LLMs, multiple modes – picking the right model for each agent’s task. -
Episode 5:
Real-world use case – connecting booking data, stock availability, and market APIs to build a forecasting system.
By the end, you’ll have a working understanding of MCP and a multi-agentic system you can adapt to your own projects.
Part 1: How MCP Works
Welcome to the first episode of our series “Building Agentic Systems with MCP in .NET.”
In this part we won’t even touch LLMs yet. Instead, we’ll answer:
👉 How does MCP actually work?
We’ll:
- Explain the role of an MCP Server and MCP Client.
- Compare MCP with a typical API.
- Build a simple server in .NET.
- Use MCP Inspector as a client to connect, discover, and call tools.
- Understand the flow of messages.
By the end of this post, you’ll know the mechanics of MCP. Then in Part 2, we’ll talk about why MCP exists (and how LLMs fit into the story).
🔄 MCP in a Nutshell
At its core, MCP is just a protocol for structured communication between:
- Server → Exposes “tools” (functions) you want others to call.
- Client → Connects to the server, discovers the tools, and calls them.
Think of it like JSON-RPC with conventions:
- Tools are described with schemas (inputs & outputs).
- Clients don’t need to read documentation—they can query the server to learn what it supports.
- The transport can be STDIO (pipes), sockets, or HTTP.
🆚 MCP vs. a Typical API
| Feature | REST/GraphQL API | MCP Protocol |
|---|---|---|
| Discovery | Requires docs/Swagger/OpenAPI | Built-in: client asks server |
| Transport | HTTP/HTTPS only | STDIO, WebSocket, HTTP, etc. |
| Schema | Optional / external spec | Always part of the protocol |
| LLM-friendly | Needs glue code / adapters | Native design (structured I/O) |
| Caller | Any app with HTTP | Any MCP-aware client (LLM, IDE, inspector) |