Nall.ModelContextProtocol.Inspector.Aspire.Hosting 0.10.0

dotnet add package Nall.ModelContextProtocol.Inspector.Aspire.Hosting --version 0.10.0
NuGet\Install-Package Nall.ModelContextProtocol.Inspector.Aspire.Hosting -Version 0.10.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version ofInstall-Package.
<PackageReference Include="Nall.ModelContextProtocol.Inspector.Aspire.Hosting" Version="0.10.0" />
For projects that supportPackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nall.ModelContextProtocol.Inspector.Aspire.Hosting" Version="0.10.0" />
Directory.Packages.props
<PackageReference Include="Nall.ModelContextProtocol.Inspector.Aspire.Hosting" />
Project file
For projects that supportCentral Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nall.ModelContextProtocol.Inspector.Aspire.Hosting --version 0.10.0
The NuGet Team does not provide support for this client. Please contact itsmaintainers for support.
#r "nuget: Nall.ModelContextProtocol.Inspector.Aspire.Hosting, 0.10.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Nall.ModelContextProtocol.Inspector.Aspire.Hosting@0.10.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nall.ModelContextProtocol.Inspector.Aspire.Hosting&version=0.10.0
Install as a Cake Addin
#tool nuget:?package=Nall.ModelContextProtocol.Inspector.Aspire.Hosting&version=0.10.0
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact itsmaintainers for support.

Model Context Protocol .NET Template

<p align="center"><img src="assets/light.png" alt="MCP Logo" /></p>

<p align="center"><strong>A protocol for seamless integration between LLM applications and external data sources</strong></p>

<p align="center"><a href="https://modelcontextprotocol.io">Documentation</a> |<a href="https://spec.modelcontextprotocol.io">Specification</a> |<a href="https://github.com/orgs/modelcontextprotocol/discussions">Discussions</a></p>

This repository contains atemplate for creating a Model Context Protocol (MCP) application in .NET. It provides a basic structure and example code to help you get started with building your own MCP-enabled applications.

PackageVersionDescription
Nall.ModelContextProtocol.TemplateNugetTemplates
Nall.ModelContextProtocol.Inspector.Aspire.HostingNugetAspire Hosting Integration

Getting Started

Install:

dotnet new install Nall.ModelContextProtocol.Template# dotnet new install ./Artefact/Nall.ModelContextProtocol.Template

Verify installation:

dotnet new list mcp# These templates matched your input: 'mcp'# Template Name      Short Name         Language  Tags# -----------------  -----------------  --------  -------------# Template Name         Short Name            Language  Tags# --------------------  --------------------  --------  -------------# MCP Server            mcp-server            [C#]      dotnet/ai/mcp# MCP Server HTTP       mcp-server-http       [C#]      dotnet/ai/mcp# MCP Server HTTP Auth  mcp-server-http-auth  [C#]      dotnet/ai/mcp# MCP Server Hybrid     mcp-server-hybrid     [C#]      dotnet/ai/mcp

Practically, you want to switch between modes, so I recommend using themcp-server-hybrid template. It allows you to run the server in bothStdio andHTTP modes.

Verify output:

dotnet new mcp-server -o MyAwesomeMCPServer -n MyAwesomeMCPServer --dry-run# File actions would have been taken:#   Create: MyAwesomeMCPServer\.vscode\launch.json#   Create: MyAwesomeMCPServer\MyAwesomeMCPServer.csproj#   Create: MyAwesomeMCPServer\Program.cs#   Create: MyAwesomeMCPServer\Properties\launchSettings.json#   Create: MyAwesomeMCPServer\README.md#   Create: MyAwesomeMCPServer\appsettings.Development.json#   Create: MyAwesomeMCPServer\appsettings.json

Create from template:

dotnet new mcp-server -o MyAwesomeMCPServer -n MyAwesomeMCPServer

Here is a content ofProgram.cs:

using Microsoft.Extensions.Hosting;var builder = Host.CreateApplicationBuilder(args);builder.Services    .AddMcpServer()    .WithStdioServerTransport()    .WithToolsFromAssembly();await builder.Build().RunAsync();[McpServerToolType]public static class EchoTool{    [McpServerTool, Description("Echoes the message back to the client.")]    public static string Echo(string message) => $"hello {message}";}

It is a simple echo server that listens for incoming messages and responds with a greeting. You can add more tools by creating additional methods with the[McpServerTool] attribute. TheWithToolsFromAssembly() method automatically registers all tools in the assembly.

Run Locally

Build from the project directory:

dotnet build -o Artefacts -c Release

Run the inspector:

npx @modelcontextprotocol/inspector -e DOTNET_ENVIRONMENT=Production dotnet "$(PWD)/Artefacts/MyAwesomeMCPServer.dll"

Open inspector in your browser and test the server:

<p align="center"><img src="assets/inspector-demo.png" alt="Inspector Demo" /></p>

Distribute as .NET Tool

Pack from the project directory:

dotnet pack -o Artefacts -c Release

Install the tool globally:

dotnet tool install --global --add-source ./Artefacts MyAwesomeMCPServer

Now, after you installed this tool globally, you can run it from anywhere on your system. The tool will be available asMyAwesomeMCPServer (ormyawesomemcpserver) in your terminal.

💡 You can also create local tool manifest and install MCPs as tools locally.

Run the inspector:

npx @modelcontextprotocol/inspector -e DOTNET_ENVIRONMENT=Production myawesomemcpserver

Run with Aspire

InStdio mode

InAppHost/Program.cs:

var builder = DistributedApplication.CreateBuilder(args);builder.AddMCPInspector().WithStdio<Projects.MCPServer>();builder.Build().Run();

InHTTP mode

InAppHost/Program.cs:

var builder = DistributedApplication.CreateBuilder(args);var mcp = builder.AddProject<Projects.MCPServerRemote>("server");builder.AddMCPInspector().WithMcp(mcp);builder.Build().Run();

Reference

ProductCompatible and additional computed target framework versions.
.NETnet10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more aboutTarget Frameworks and.NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

VersionDownloads Last Updated
0.10.0 15712/29/2025
0.7.0 1,5435/31/2025
0.6.0 4975/9/2025
0.4.0 2494/11/2025
0.3.0 2544/8/2025
0.2.0 1914/4/2025
Downloads
Total3.3K
Current version157
Per day average10
About
Owners

aimcpinspector

Share this package on FacebookShare this package on XUse the Atom feed to subscribe to new versions of Nall.ModelContextProtocol.Inspector.Aspire.Hosting