# mcp-dotnet-samples — MCP Servers in .NET (Docker) > Microsoft’s MCP .NET samples show how to build MCP servers/clients in C#. Includes Docker-run demos like markdown-to-html and todo-list for quick testing. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```bash git clone https://github.com/microsoft/mcp-dotnet-samples.git cd mcp-dotnet-samples # quick demo containers (from README install links) docker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/markdown-to-html:latest docker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/todo-list:latest ``` ## Intro Microsoft’s MCP .NET samples show how to build MCP servers/clients in C#. Includes Docker-run demos like markdown-to-html and todo-list for quick testing. **Best for:** C#/.NET teams building MCP servers or learning patterns fast **Works with:** Docker, Visual Studio / VS Code, MCP-compatible clients **Setup time:** 3-10 minutes ### Key facts (verified) - GitHub: 183 stars · 55 forks · pushed 2026-05-13. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-verified entrypoint: `docker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/markdown-to-html:latest`. ## Main - Start with the Docker images when you only need a working MCP server quickly; then open the sample directory to see the implementation patterns in .NET. - Treat the repo as a reference library: pick one sample (markdown-to-html, outlook-email, todo-list) and mirror its transport + tool shape in your own server. - Use the repo’s descriptions to decide integration scope: some samples are pure transformations (markdown→HTML) while others touch external services (Outlook). ### Source-backed notes - README frames MCP as a standardized connection layer (“USB‑C port for AI applications”). - The sample table includes install links that embed Docker args for images like `ghcr.io/microsoft/mcp-dotnet-samples/markdown-to-html:latest` and `.../todo-list:latest`. - README points to MCP official docs and the MCP GitHub repository for deeper protocol details. ### FAQ - **Do I need .NET to try it?**: Not necessarily — README’s install links include Docker-run servers you can start without building locally. - **Which sample should I start with?**: Pick markdown-to-html for a self-contained transformation, then move to service-backed ones like Outlook Email. - **Is this only for Visual Studio?**: No — README provides install links for VS Code and mentions using the samples in .NET apps broadly. ## Source & Thanks > Source: https://github.com/microsoft/mcp-dotnet-samples > License: MIT > GitHub stars: 183 · forks: 55 --- ## Quick Use ```bash git clone https://github.com/microsoft/mcp-dotnet-samples.git cd mcp-dotnet-samples # quick demo containers (from README install links) docker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/markdown-to-html:latest docker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/todo-list:latest ``` ## Intro Microsoft 的 MCP .NET 示例库:用 C# 构建/集成 MCP server 与 client,并提供可直接 `docker run` 的示例(markdown-to-html、todo-list、outlook-email)。 **Best for:** .NET 团队做 MCP server,或想快速对照样例上手的人 **Works with:** Docker;Visual Studio / VS Code;MCP 客户端 **Setup time:** 3-10 minutes ### Key facts (verified) - GitHub:183 stars · 55 forks;最近更新 2026-05-13。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中核对过的入口命令:`docker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/markdown-to-html:latest`。 ## Main - 只想快速跑起来时先用 Docker 镜像;需要理解实现细节时再进入对应 sample 目录阅读 .NET 的实现模式。 - 把它当参考库:从一个 sample(markdown-to-html、outlook-email、todo-list)开始,复刻其 transport 与 tools 组织方式到你的 MCP server。 - 按 sample 的定位决定集成边界:有的只是纯转换(markdown→HTML),有的会对接外部服务(如 Outlook)。 ### Source-backed notes - README 用“AI 应用的 USB‑C 口”类比 MCP,强调标准化连接方式。 - README 的 sample 表格在安装链接里嵌入了 Docker 运行参数(例如 `ghcr.io/microsoft/mcp-dotnet-samples/markdown-to-html:latest` 与 `.../todo-list:latest`)。 - README 提供 MCP 官方文档与 MCP GitHub 仓库链接,便于深入协议细节。 ### FAQ - **不装 .NET 也能试吗?**:可以。README 的安装链接里提供了可直接 `docker run` 的示例镜像,无需本地编译。 - **从哪个 sample 开始最好?**:建议先跑 markdown-to-html 这种自包含示例,再尝试 Outlook Email 这类依赖外部服务的项目。 - **只能在 Visual Studio 用吗?**:不是。README 也提供 VS Code 的安装入口,并强调这是通用 .NET 示例。 ## Source & Thanks > Source: https://github.com/microsoft/mcp-dotnet-samples > License: MIT > GitHub stars: 183 · forks: 55 --- Source: https://tokrepo.com/en/workflows/mcp-dotnet-samples-mcp-servers-in-net-docker Author: MCP Hub