Knapcode.SampleMcpServer
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Knapcode.SampleMcpServerGive me 5 random numbers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server - Knapcode.SampleMcpServer
This README was created using the C# MCP server template project. It demonstrates how you can easily create an MCP server using C# and then package it in a NuGet package.
See aka.ms/nuget/mcp/guide for the full guide.
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.
Related MCP server: Echo MCP Server
Using the MCP Server in VS Code
Once the MCP server package is published to NuGet.org, you can use the following VS Code user configuration to download and install the MCP server package. See Use MCP servers in VS Code (Preview) for more information about using MCP servers in VS Code.
{
"mcp": {
"servers": {
"Knapcode.SampleMcpServer": {
"type": "stdio",
"command": "dnx",
"args": [
"Knapcode.SampleMcpServer@0.4.0-beta",
"--yes",
"--",
"mcp",
"start"
],
"env": {
"WEATHER_CHOICES": "sunny,humid,freezing"
}
}
}
}
}Now 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 Knapcode.SampleMcpServer MCP server and show you the results.
Developing locally in VS Code
To test this MCP server from source code (locally) without using a built MCP server package, create a .vscode/mcp.json file (a VS Code workspace settings file) in your project directory and add the following configuration:
{
"servers": {
"Knapcode.SampleMcpServer": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"<RELATIVE PATH TO PROJECT DIRECTORY>",
"--",
"mcp",
"start"
],
"env": {
"WEATHER_CHOICES": "sunny,humid,freezing"
}
}
}
}Alternatively, you can configure your VS Code user settings to use your local project:
{
"mcp": {
"servers": {
"Knapcode.SampleMcpServer": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"<FULL PATH TO PROJECT DIRECTORY>"
"--",
"mcp",
"start"
]
},
"env": {
"WEATHER_CHOICES": "sunny,humid,freezing"
}
}
}
}This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA basic example MCP server built with the FastMCP framework for demonstration and learning purposes. Provides a starting point for developers to understand MCP server implementation.
- FlicenseNot gradedqualityDmaintenanceA simple demonstration MCP server that provides an echo tool and resource for learning how to build MCP servers. Serves as a starting point and template for creating custom MCP server implementations.
- FlicenseNot gradedqualityDmaintenanceA simple reference implementation demonstrating MCP server basics with two toy tools: generating random animals and simulating 20-sided die rolls.
- FlicenseNot gradedqualityCmaintenanceA beginner-friendly MCP server that provides basic arithmetic operations like addition and random number generation, built with FastMCP.
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, P…
MCP server for generating rough-draft project plans from natural-language prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/joelverhagen/Knapcode.SampleMcpServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server