
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
sterlingxu_samplemcpserver
Advanced tools
This README was created using the C# MCP server project template. It demonstrates how you can easily create an MCP server using C# and publish it as a NuGet package.
The MCP server is built as a self-contained application and does not require the .NET runtime to be installed on the target machine. However, since it is self-contained, it must be built for each target platform separately. By default, the template is configured to build for:
win-x64win-arm64osx-arm64linux-x64linux-arm64linux-musl-x64If your users require more platforms to be supported, update the list of runtime identifiers in the project's <RuntimeIdentifiers /> element.
See aka.ms/nuget/mcp/guide for the full guide.
Please note that this template is currently in an early preview stage. If you have feedback, please take a brief survey.
<PackageId>..mcp/server.json to declare your MCP server's inputs.
dotnet pack.The bin/Release directory will contain the package file (.nupkg), which can be published to NuGet.org.
To test this MCP server from source code (locally) without using a built MCP server package, you can configure your IDE to run the project directly using dotnet run.
{
"servers": {
"SampleMcpServer": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"<PATH TO PROJECT DIRECTORY>"
]
}
}
}
Refer to the VS Code or Visual Studio documentation for more information on configuring and using MCP servers:
Once configured, you can ask Copilot Chat for a random number, for example, Give me 3 random numbers. It should prompt you to use the get_random_number tool on the SampleMcpServer MCP server and show you the results.
dotnet pack -c Release to create the NuGet packagedotnet nuget push bin/Release/*.nupkg --api-key <your-api-key> --source https://api.nuget.org/v3/index.jsonOnce the MCP server package is published to NuGet.org, you can configure it in your preferred IDE. Both VS Code and Visual Studio use the dnx command to download and install the MCP server package from NuGet.org.
<WORKSPACE DIRECTORY>/.vscode/mcp.json file<SOLUTION DIRECTORY>\.mcp.json fileFor both VS Code and Visual Studio, the configuration file uses the following server definition:
{
"servers": {
"SampleMcpServer": {
"type": "stdio",
"command": "dnx",
"args": [
"<your package ID here>",
"--version",
"<your package version here>",
"--yes"
]
}
}
}
{
"servers": {
"my-mcp-server-local-project-test": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"SampleMcpServer.csproj"
],
"env":{
"WEATHER_CHOICES": "sunny,humid,freezing"
}
}
},
"inputs": []
}
.NET MCP servers use the ModelContextProtocol C# SDK. For more information about MCP:
FAQs
Unknown package
We found that sterlingxu_samplemcpserver demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.