Knapcode.SampleMcpServer 0.0.1-beta

This is a prerelease version of Knapcode.SampleMcpServer.
There is a newer prerelease version of this package available.
See the version list below for details.
{
  "inputs": [],
  "servers": {
    "Knapcode.SampleMcpServer": {
      "type": "stdio",
      "command": "dnx",
      "args": ["Knapcode.SampleMcpServer@0.0.1-beta", "--yes", "--", "start-mcp"],
      "env": {
        "MAX_RANDOM_NUMBER": ""
      }
    }
  }
}
                    
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's .vscode/mcp.json settings file.
dotnet tool install --global Knapcode.SampleMcpServer --version 0.0.1-beta
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Knapcode.SampleMcpServer --version 0.0.1-beta
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Knapcode.SampleMcpServer&version=0.0.1-beta&prerelease
                    
nuke :add-package Knapcode.SampleMcpServer --version 0.0.1-beta
                    

MCP Server

This README was created using the .NET MCP server template project. It demonstrates how you can easily create an MCP server using .NET and then package it in a NuGet package.

See aka.ms/nuget/mcp/guide for the full guide.

Checklist before publishing to NuGet.org

  • Update package metadata in the .csproj file
  • Update the .mcp/server.json to declare your MCP server's inputs
  • Test the MCP server locally using the steps below

Developing locally

To test this MCP server from source code (locally) without using a built MCP server package, use the following MCP configuration in VS Code. See Use MCP servers in VS Code (Preview) for more information about using MCP servers in VS Code.

{
  "mcp": {
    "servers": {
      "my-custom-mcp": {
        "type": "stdio",
        "command": "dotnet",
        "args": [
          "run",
          "--project",
          "<PATH TO PROJECT DIRECTORY>",
          "--",
          "start-mcp"
        ],
        "env": {
          "MAX_RANDOM_NUMBER": 100
        }
      }
    }
  }
}

Then ask the Copilot chat for a random number. It should prompt to use the GetRandomNumber tool on the my-custom-mcp MCP server.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.6.0-beta 0 7/10/2025
0.5.0-beta 3 7/10/2025
0.4.0-beta 0 7/10/2025
0.3.0-beta 0 7/10/2025
0.2.0-beta 0 7/10/2025
0.0.1-beta 0 7/10/2025