Serverdex · build · C#
Build an MCP server in C#
1. Install the C# SDK
package: ModelContextProtocoldotnet add package ModelContextProtocolThe official SDK repository: modelcontextprotocol/csharp-sdk.
2. The shape of a minimal server
start from this APIusing 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
AAI Game Developer: MCP for Unity, Unreal and Godot
IvanMurzakProduction-ready
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Registry4.7k 6d agoApache-2.0
AAzure MCP Server
microsoftProduction-ready
All Azure MCP tools to create a seamless connection between AI agents and Azure services.
Registry3.9k 3d agoMIT
ALINQ to DB
linq2dbProduction-ready
Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.
Registry3.3k 7d agoMIT
ASeal Open Data
ariacomProduction-ready
French public open data (data.gouv.fr) cross-referenced by commune, EPCI and department.
Registry1.7k 6d agoMIT
AMagic Cloud
polterguyProduction-ready
Generate secured CRUD APIs over your database, run SQL, manage files, tasks and a headless browser
Registry1.3k 9d agoMIT
AMCP Server for Excel
sbroenneProduction-ready
Excel automation for AI - Sheets, Power Query, DAX, VBA, Tables, Ranges and more. Windows only.
Registry933 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.