Serverdex · build · C#

Build an MCP server in C#

The official C# SDK, the exact install command, the API you start from — and the real C# MCP servers in our index to copy. SDK facts read from the repository on 1 December 2026.
Official SDK
Tier 1
with Microsoft
C# servers
245
in our index
Requires
—
see the SDK

1. Install the C# SDK

package: ModelContextProtocol
dotnet add package ModelContextProtocol

The official SDK repository: modelcontextprotocol/csharp-sdk.

2. The shape of a minimal server

start from this API
using ModelContextProtocol;

builder.Services
    .AddMcpServer()
    .WithStdioServerTransport()
    .WithToolsFromAssembly();

This is the starting API, not a full program — the complete, always-current walkthrough is the official quickstart. Define your tools, then connect a transport (stdio for local, HTTP for remote). Read on 1 December 2026; confirm the current version in the quickstart.

3. Real C# MCP servers to learn from

most-starred in our index · open source
  1. AI Game Developer: MCP for Unity, Unreal and Godot

    IvanMurzak
    A

    Production-ready

    Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.

    Registry
    4.7k 6d agoApache-2.0
  2. Azure MCP Server

    microsoft
    A

    Production-ready

    All Azure MCP tools to create a seamless connection between AI agents and Azure services.

    Registry
    3.9k 3d agoMIT
  3. LINQ to DB

    linq2db
    A

    Production-ready

    Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.

    Registry
    3.3k 7d agoMIT
  4. Seal Open Data

    ariacom
    A

    Production-ready

    French public open data (data.gouv.fr) cross-referenced by commune, EPCI and department.

    Registry
    1.7k 6d agoMIT
  5. Magic Cloud

    polterguy
    A

    Production-ready

    Generate secured CRUD APIs over your database, run SQL, manage files, tasks and a headless browser

    Registry
    1.3k 9d agoMIT
  6. MCP Server for Excel

    sbroenne
    A

    Production-ready

    Excel automation for AI - Sheets, Power Query, DAX, VBA, Tables, Ranges and more. Windows only.

    Registry
    933 9d agoMIT

See all C# MCP servers, or the best-maintained across every language.

4. Connect it, then get it found

Point a client at your server to try it — the client matrix shows which clients support what. When it works, list it on Serverdex: a free listing is a server page with a link back to us, in front of developers choosing MCP servers. Want it live now without the link? Priority Review ($9, one-time) does that.

Questions people ask

What's the official way to build an MCP server in C#?
Use the official C# SDK, ModelContextProtocol. Install it (dotnet add package ModelContextProtocol), construct a server, register your tools, and connect a transport. The full, always-current walkthrough is the official quickstart; the snippet here shows the shape. Read from the SDK's repository on 1 December 2026.
Is the C# SDK production-ready?
Tier 1 — passes 100% of the MCP conformance tests and implements every non-experimental feature.
How do I test and connect my C# server?
Run it over stdio and point a client at it. Serverdex's client matrix shows which clients support what; most developers start with Claude Desktop or an IDE client. Once it answers, list it on Serverdex so others find it.