Aspire.MCP.Sample MCP Server

Sample MCP Server and MCP client with Aspire

Local serverstdio

What is the Aspire.MCP.Sample MCP Server?

Sample MCP Server and MCP client with Aspire

What the server does

This sample demonstrates a Model Context Protocol (MCP) Server and client setup using Aspire. It showcases how to establish and manage MCP communication, using C# in a structured Aspire environment.

  • Aspire Integration: — Uses Aspire for containerized orchestration and service management
  • MCP Server: — Implements an MCP server to manage client communication
  • MCP Client: — Sample Blazor Chat client demonstrating how to connect and communicate with the MCP server
  • Model Selection: — The Chat Client can use LLMs from Azure AI Foundry, Ollama or GitHub models. The selected model must support function calling to be able to call the MCP server functions
  • Function Calling: — Demonstrates how to call functions from the MCP server using the selected model
  • Tool Result: — Displays the result of the function call in the chat interface

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • Prerequisites — The Prerequisites tool exposed by this server

Credentials and setup notes

  • .NET SDK 9.0 or later - Visual Studio 2022 or Visual Studio code - LLM or SLM that supports function calling. - Azure AI Foundry to run models in the cloud. IE: gpt-4o-mini - GitHub Models to run models in the cloud. IE: gpt-4o-mini - Ollama for running local models. Suggested: phi4-mini, llama3.2 or Qwq

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Setup and compatibility

This listing has no verified copy-paste launch configuration. Use the project documentation to confirm the entry point, runtime and authentication before registering it in your MCP client. A package name or repository alone is not a runnable configuration.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Configuration

  • .NET SDK 9.0 or later - Visual Studio 2022 or Visual Studio code - LLM or SLM that supports function calling. - Azure AI Foundry to run models in the cloud. IE: gpt-4o-mini - GitHub Models to run models in the cloud. IE: gpt-4o-mini - Ollama for running local models. Suggested: phi4-mini, llama3.2 or Qwq

Example prompts to try

  • “Use Aspire.MCP.Sample to Prerequisites.”

Frequently asked questions

You need .NET SDK 9.0 or later, Visual Studio 2022 or Visual Studio Code, and an LLM/SLM that supports function calling (Azure AI Foundry, GitHub Models, or Ollama).