sampledotnetmcpserver MCP Server
Sample .NET MCP Server
sampledotnetmcpserver scores 46 (Fair), licensed MIT and written in C#. It installs as a local process. It declares 5 tools. Filed under Uncategorized. GitHub shows 4 stars. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
46 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade A
85/100 for listing completeness. Lost points: short summary, no docs link.
How quality is graded
Where the 46 comes from
22 + 1 + 2 + 10 + 4 + 7 = 46. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 1 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 2 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "timheuer-sampledotnetmcpserver": { "command": "dnx", "args": [ "TimHeuer.SampleDotnetMcpServer" ] } }}
Environment variables
This server does not declare environment variables.
Tools5Tool docs quality grade C
All capabilitiesProgram.cstoolMCP server entry point and configuration
Project and NuGet packaging configuration
Generates random numbers within a specified range
Gets current weather information for any US zip code
Gets a multi-day weather forecast for any US zip code
About
SampleDotnetMcpServer
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
What is this?
SampleDotnetMcpServer is a reference MCP server for .NET, showing how to:
- Implement MCP tools in C# (see
Tools/RandomNumberTools.cs,Tools/SayHelloName.cs,Tools/WeatherTools.cs) - Register tools and configure the MCP server transport (see
Program.cs) - Package and publish the server as a NuGet package for use in IDEs like VS Code and Visual Studio
The included tools demonstrate various MCP capabilities:
get_random_number: Generates random numbers within a specified rangesay_hello_nameandsay_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 code
Features
- Implements the MCP protocol using stdio transport
- Provides multiple sample tools:
get_random_number: Returns a random integer in a specified rangesay_hello_nameandsay_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 code
- Ready to be packed and published as a NuGet MCP server
- Example configuration files and metadata included
How to use
Run locally
You 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>"
]
}
}
}
Test the MCP server
Once running, you can use Copilot Chat or any MCP client to invoke the available tools:
Weather Tools:
- Ask: "What's the weather like in 90210?" to get current weather
- Ask: "Give me a 3-day forecast for 10001" to get a weather forecast
- Ask: "Check the weather in 60601" to test with Chicago's zip code
Other Tools:
- Ask: "Give me 3 random numbers" to use the random number generator
- Ask: "Say hello to John" to use the greeting tools
Publish to NuGet.org
CI handles publishing to NuGet, using NuGet Trusted Publishing for the key and automatic versioning using Nerdbank.GitVersioning.
Use from NuGet.org
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"
]
}
}
}
Project structure
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
Learn more
- ModelContextProtocol SDK
- Model Context Protocol Documentation
- Protocol Specification
- GitHub Organization
- Use MCP servers in VS Code (Preview)
- Use MCP servers in Visual Studio (Preview)
This project is for demonstration and reference purposes only. For feedback or contributions, see the GitHub repository.
Frequently asked questions
What is sampledotnetmcpserver MCP Server?
Sample .NET MCP Server
How do I install sampledotnetmcpserver MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. sampledotnetmcpserver MCP Server runs locally from the NuGet package TimHeuer.SampleDotnetMcpServer with the command dnx TimHeuer.SampleDotnetMcpServer.
Is sampledotnetmcpserver MCP Server free and open source?
Yes. sampledotnetmcpserver MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does sampledotnetmcpserver MCP Server support remote (HTTP) connections?
No remote endpoint is listed for sampledotnetmcpserver MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does sampledotnetmcpserver MCP Server provide?
sampledotnetmcpserver MCP Server provides 5 tools, including Program.cs, SampleDotnetMcpServer.csproj, get_random_number, and get_weather_by_zip_code. See the full tool list for descriptions and parameters.
How is sampledotnetmcpserver MCP Server's trust score calculated?
sampledotnetmcpserver MCP Server scores 46 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.