dahlsailrunner/carvedrock-developer
If you are the rightful owner of carvedrock-developer and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The CarvedRock Developer MCP Server is a template for creating Model Context Protocol servers using C#, designed for developer use cases in IDEs like VS Code and Visual Studio.
CarvedRock Developer MCP Server
A slightly-more than the starter version of the MCP Server project template that
uses the STDIO transport and is mostly suited to developer use cases inside VS Code
and Visual Studio or other IDEs that can support NuGet-hosted MCP servers.
Tools
get_random_number: The default tool included in the template; takes min and max values to define the range of the random number to return, and they default to 1 and 100.get_test_products: A tool to generate test product records for the simple CarvedRockProductclass using the Bogus library. Takes an input parameter for the number you want to generate (default is 10).
Original README Content
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-x64
If 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.
Checklist before publishing to NuGet.org
- Test the MCP server locally using the steps below.
- Update the package metadata in the .csproj file, in particular the
<PackageId>. - Update
.mcp/server.jsonto declare your MCP server's inputs.- See configuring inputs for more details.
- Pack the project using
dotnet pack.
The bin/Release directory will contain the package file (.nupkg), which can be published to NuGet.org.
Developing locally
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": {
"CarvedRock.Developer": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"<PATH TO PROJECT DIRECTORY>"
]
}
}
}
Testing the MCP Server
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 CarvedRock.Developer MCP server and show you the results.
Publishing to NuGet.org
- Run
dotnet pack -c Releaseto create the NuGet package - Publish to NuGet.org with
dotnet nuget push bin/Release/*.nupkg --api-key <your-api-key> --source https://api.nuget.org/v3/index.json
Using the MCP Server from NuGet.org
Once 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.
- VS Code: Create a
<WORKSPACE DIRECTORY>/.vscode/mcp.jsonfile - Visual Studio: Create a
<SOLUTION DIRECTORY>\.mcp.jsonfile
For both VS Code and Visual Studio, the configuration file uses the following server definition:
{
"servers": {
"CarvedRock.Developer": {
"type": "stdio",
"command": "dnx",
"args": [
"<your package ID here>",
"--version",
"<your package version here>",
"--yes"
]
}
}
}
More information
.NET MCP servers use the ModelContextProtocol C# SDK. For more information about MCP:
Refer to the VS Code or Visual Studio documentation for more information on configuring and using MCP servers: