Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"sampledotnetmcpserver": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
This project is a sample implementation of a Model Context Protocol (MCP) server in .NET, designed to demonstrate how to build, run, and publish an MCP server using C# and the ModelContextProtocol SDK.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in other
Pi Coding Agent extension (CLI-first) — routes bash/read/grep/find/ls through lean-ctx CLI for strong token savings. Optional MCP bridge can register advanced tools.
Apify MCP Server
97% token reduction for AI coding sessions — zero deps, 21 languages, MCP server
MCP proxy that compresses prose fields (tool descriptions, etc.) using caveman rules. Same accuracy, fewer context tokens.
MCP Security Weekly
Get CVE alerts and security updates for SampleDotnetMcpServer and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
This project is a sample implementation of a Model Context Protocol (MCP) server in .NET, designed to demonstrate how to build, run, and publish an MCP server using C# and the ModelContextProtocol SDK.
mcp-name: io.github.timheuer/sampledotnetmcpserver
SampleDotnetMcpServer is a reference MCP server for .NET, showing how to:
Tools/RandomNumberTools.cs, Tools/SayHelloName.cs, Tools/WeatherTools.cs)Program.cs)The included tools demonstrate various MCP capabilities:
get_random_number: Generates random numbers within a specified rangesay_hello_name and say_goodbye_name: Simple greeting toolsget_weather_by_zip_code: Gets current weather information for any US zip codeget_weather_forecast: Gets a multi-day weather forecast for any US zip codeget_random_number: Returns a random integer in a specified rangesay_hello_name and say_goodbye_name: Simple greeting toolsget_weather_by_zip_code: Gets current weather for any US zip code using wttr.in APIget_weather_forecast: Gets multi-day weather forecast for any US zip codeYou can run the MCP server directly from source for development and testing:
dotnet run --project .
Or configure your IDE to use the following MCP server definition:
{
"servers": {
"SampleDotnetMcpServer": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"<PATH TO PROJECT DIRECTORY>"
]
}
}
}
Once running, you can use Copilot Chat or any MCP client to invoke the available tools:
Weather Tools:
Other Tools:
CI handles publishing to NuGet, using NuGet Trusted Publishing for the key and automatic versioning using Nerdbank.GitVersioning.
After publishing, configure your IDE to use the MCP server from NuGet.org. Example configuration (replace package id and version):
{
"servers": {
"SampleDotnetMcpServer": {
"type": "stdio",
"command": "dnx",
"args": [
"TimHeuer.SampleMcpServer",
"--version",
"0.1.0-beta",
"--yes"
]
}
}
}
Program.cs: MCP server entry point and configurationTools/RandomNumberTools.cs: Example MCP tool for generating random numbersTools/SayHelloName.cs: Example MCP tools for greetingsTools/WeatherTools.cs: Weather-related MCP tools for checking weather by zip code.mcp/server.json: MCP server metadata and NuGet package infoSampleDotnetMcpServer.csproj: Project and NuGet packaging configuration