<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ziya Abbas</title>
    <description>The latest articles on DEV Community by Ziya Abbas (@ziya_abbas_e1e5d8bbcc5c3b).</description>
    <link>https://dev.to/ziya_abbas_e1e5d8bbcc5c3b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3998124%2F8a5147ed-99a8-45c6-96af-642d8450f607.png</url>
      <title>DEV Community: Ziya Abbas</title>
      <link>https://dev.to/ziya_abbas_e1e5d8bbcc5c3b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ziya_abbas_e1e5d8bbcc5c3b"/>
    <language>en</language>
    <item>
      <title>Build an MCP Server in C# .NET — Complete Beginner Guide</title>
      <dc:creator>Ziya Abbas</dc:creator>
      <pubDate>Tue, 23 Jun 2026 07:32:11 +0000</pubDate>
      <link>https://dev.to/ziya_abbas_e1e5d8bbcc5c3b/build-an-mcp-server-in-c-net-complete-beginner-guide-32hh</link>
      <guid>https://dev.to/ziya_abbas_e1e5d8bbcc5c3b/build-an-mcp-server-in-c-net-complete-beginner-guide-32hh</guid>
      <description>&lt;p&gt;AI models like Claude are powerful — but out of the box, they only know what they were trained on. They cannot access your database, call your APIs, or run your business logic.&lt;/p&gt;

&lt;p&gt;Model Context Protocol (MCP) changes that. It is an open protocol by Anthropic that gives AI models a standard way to connect to external tools and services. Think of it as a universal plug — your .NET code becomes a tool that Claude can actually call in real time.&lt;/p&gt;

&lt;p&gt;What We Build&lt;/p&gt;

&lt;p&gt;In this tutorial, we build a Business Advisor MCP Server in C# .NET — a server that Claude Desktop connects to and uses to suggest real business ideas based on a user’s budget and interests.&lt;/p&gt;

&lt;p&gt;The project covers:&lt;/p&gt;

&lt;p&gt;• What MCP is and how it works (stdio transport, JSON-RPC under the hood)&lt;br&gt;
• How Claude decides when to call your tool vs answer from its own knowledge&lt;br&gt;
• Clean project structure — Models, Services, Tools, all separated properly&lt;br&gt;
• The [McpServerTool] and [Description] attributes — and why Description is the most important thing you will write&lt;br&gt;
• A critical gotcha with stdout vs stderr that breaks most first attempts&lt;br&gt;
• Registering your server in Claude Desktop via claude_desktop_config.json&lt;br&gt;
• Live demo — Claude calling your C# code in real time&lt;/p&gt;

&lt;p&gt;Tech Stack&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;• .NET 9 Console App
• ModelContextProtocol NuGet SDK (official)
• Microsoft.Extensions.Hosting for DI and app lifetime
• Claude Desktop for local testing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;No database, no HTTP server, no complex setup — just a clean console app that Claude talks to directly through stdio pipes.&lt;/p&gt;

&lt;p&gt;Watch the Full Tutorial&lt;/p&gt;

&lt;p&gt;Everything above is walked through step by step, with full code and a live demo at the end.&lt;/p&gt;

&lt;p&gt;Build an MCP Server in C# .NET (Model Context Protocol) | Complete Beginner&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/4bT2VlpCnWo" rel="noopener noreferrer"&gt;https://youtu.be/4bT2VlpCnWo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>dotnet</category>
      <category>dotnetcore</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
