N
NikiforovAll/mcp-template-dotnet
Template for an MCP application in .NET
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Install & config
Client config (built from the install command this repo gives)
{
"mcpServers": {
"nikiforovall-mcp-template-dotnet": {
"command": "npx",
"args": ["@modelcontextprotocol/inspector"]
}
}
}Parsed from the README we fetched on 2026-11-06; we have not executed it.
command/args come from the install command the repository states. When it is ambiguous, the project README wins.
VS Code (.vscode/mcp.json - the key is servers)
{
"servers": {
"nikiforovall-mcp-template-dotnet": {
"command": "npx",
"args": ["@modelcontextprotocol/inspector"]
}
}
}Same server, but VS Code keeps it under <code>servers</code>.
Claude Code (command line)
claude mcp add --transport stdio nikiforovall-mcp-template-dotnet -- npx @modelcontextprotocol/inspector
Claude Code does not read a config file; add the server with this command.
Key names differ by client: Clients & CLI
- Source
- collected from the abordage/awesome-mcp list · type: MCP server
- Harvest history
- first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
- Score
- score 1,003 · 10 sources · mcp
- Install
npx @modelcontextprotocol/inspector
FAQ (answers come from our records)
How do I install it?
The repository provides this install command:
npx @modelcontextprotocol/inspector. It comes from the repository itself; we cannot guarantee it runs as-is in your client.Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.
# Model Context Protocol .NET Template
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A protocol for seamless integration between LLM applications and external data sources
Documentation |
Specification |
Discussions
This repository contains a template 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.
| Package | Version | Description |
| Nall.ModelContextProtocol.Template | | Templates |
| Nall.ModelContextProtocol.Inspector.Aspire.Hosting | | Aspire Hosting Integration |
## Getting Started
### Install:
bash
dotnet new install Nall.ModelContextProtocol.Template
# dotnet new install ./Artefact/Nall.ModelContextProtocol.Template
Verify installation:
bash
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
> [!TIP]
> Practically, you want to switch between modes, so I recommend using the mcp-server-hybrid template. It allows you to run the server in both Stdio and HTTP modes.
Verify output:
bash
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:
bash
dotnet new mcp-server -o MyAwesomeMCPServer -n MyAwesomeMCPServer
Here is a content of Program.cs:
csharp
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. The WithToolsFromAssembly() method automatically registers all tools in the assembly.
### Run Locally
Build from the project directory:
bash
dotnet build -o Artefacts -c Release
Run the inspector:
bash
npx @modelcontextprotocol/inspector -e DOTNETENVIRONMENT=Production dotnet "$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
Open inspector in your browser and test the server:
Documentation |
Specification |
Discussions
This repository contains a template 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.
| Package | Version | Description |
| Nall.ModelContextProtocol.Template | | Templates |
| Nall.ModelContextProtocol.Inspector.Aspire.Hosting | | Aspire Hosting Integration |
## Getting Started
### Install:
bash
dotnet new install Nall.ModelContextProtocol.Template
# dotnet new install ./Artefact/Nall.ModelContextProtocol.Template
Verify installation:
bash
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
> [!TIP]
> Practically, you want to switch between modes, so I recommend using the mcp-server-hybrid template. It allows you to run the server in both Stdio and HTTP modes.
Verify output:
bash
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:
bash
dotnet new mcp-server -o MyAwesomeMCPServer -n MyAwesomeMCPServer
Here is a content of Program.cs:
csharp
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. The WithToolsFromAssembly() method automatically registers all tools in the assembly.
### Run Locally
Build from the project directory:
bash
dotnet build -o Artefacts -c Release
Run the inspector:
bash
npx @modelcontextprotocol/inspector -e DOTNETENVIRONMENT=Production dotnet "$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
Open inspector in your browser and test the server:
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/nikiforovall-mcp-template-dotnet/)
- Source
- awesome · https://github.com/NikiforovAll/mcp-template-dotnet
- Browse by field
- MCP servers
- Listed by
- 10 independent sources
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.