Get the FREE Ultimate OpenClaw Setup Guide →

mcp-dotnet-samples

A comprehensive set of samples of creating and using MCP servers and clients with .NET

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio microsoft-mcp-dotnet-samples docker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/todo-list:latest

How to use

This MCP server collection provides .NET based samples that demonstrate how to integrate context and tools with large language models using the Model Context Protocol (MCP). Each sample runs as a Docker container image that exposes an MCP interface. For example, the markdown-to-html sample converts incoming markdown text into HTML, the outlook-email sample can send emails through Outlook, the todo-list sample manages task items, and the awesome-copilot sample retrieves GitHub Copilot customization data. To use them, start the corresponding Docker container for the sample you’re interested in. The containers are designed to accept MCP context from an LLM and return structured results or actions to the LLM. Connect your MCP-enabled agent or orchestrator to the container’s MCP endpoints and feed it prompts that describe the task you want the agent to accomplish. Each sample demonstrates a concrete capability you can leverage in larger workflows, such as content transformation, email delivery, task management, or data retrieval from a data source.

How to install

Prerequisites:

  • Docker installed on your machine (Docker Desktop or equivalent)
  • Internet access to pull images from GitHub Container Registry

Step-by-step:

  1. Verify Docker is running: docker version
  2. Pull and run a sample container (example uses markdown-to-html): docker run -it --rm ghcr.io/microsoft/mcp-dotnet-samples/markdown-to-html:latest
  3. Repeat for additional samples you want to run: docker run -it --rm ghcr.io/microsoft/mcp-dotnet-samples/outlook-email:latest docker run -it --rm ghcr.io/microsoft/mcp-dotnet-samples/todo-list:latest docker run -it --rm ghcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:latest
  4. When you’re done, stop the containers (they stop automatically with --rm) and remove any local images if desired using docker rmi <image>

Note: Some environments may require additional configuration to expose endpoints or provide credentials (for example, Outlook integration). Refer to the sample READMEs inside each directory for any sample-specific configuration options.

Additional notes

Tips and notes:

  • Each sample image is named ghcr.io/microsoft/mcp-dotnet-samples/<sample>:latest. Use the exact image name when pulling/running.
  • If your environment requires network access through a proxy, ensure Docker is configured accordingly.
  • Some samples may require environment variables or mounted volumes for credentials or data sources. Check the sample’s documentation for required env vars (e.g., SMTP/Outlook credentials for email sample).
  • The MCP protocol relies on a defined request/response format. When integrating with an LLM, send prompts that describe the action you want (e.g., convert markdown to HTML, send email with subject/body, manage to-do items).
  • If you need to run multiple samples concurrently, run each container with distinct network settings or use a docker-compose setup to manage them together.

Related MCP Servers

Sponsor this space

Reach thousands of developers