Model Context Protocol .NET Template
About
This repository contains a template for creating a Model Context Protocol (MCP) applications in .NET.
Details
- Author
- NikiforovAll
- GitHub stars
- 26
- Downloads
- 391
- Categories
- Developer Tools
Jump to
- Four templates: mcp-server, mcp-server-http, mcp-server-http-auth, and mcp-server-hybrid
- Supports both Stdio and HTTP transport modes
- Automatic tool discovery with WithToolsFromAssembly()
- Can be packaged and distributed as a global .NET tool
- Integrates with Aspire hosting for cloud-native scenarios
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Model Context Protocol .NET TemplateCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install the template using dotnet new install Nall.ModelContextProtocol.Template, then create a new project with commands like dotnet new mcp-server -o MyProject -n MyProject. The generated code registers tools marked with the [McpServerTool] attribute automatically. Build and run locally, or distribute as a .NET tool.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"model context protocol .net template": {
"mcp-template-dotnet": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"-e",
"DOTNET_ENVIRONMENT=Production",
"dotnet",
"$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
]
}
}
}
}
McpServers
{
"mcp-template-dotnet": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"-e",
"DOTNET_ENVIRONMENT=Production",
"dotnet",
"$(PWD)/Artefacts/MyAwesomeMCPServer.dll"
]
}
}
Model Context Protocol .NET Template
<p align="center">

</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 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
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





