MCP Server Studio
A sample MCP server using the MCP C# SDK. Generates random numbers and random weather.
Registry name: com.joelverhagen.mcp/Knapcode.SampleMcpServer
Add to claude_desktop_config.json:
{
"mcpServers": {
"knapcode-samplemcpserver": {
"command": "dnx",
"args": [
"Knapcode.SampleMcpServer@0.10.0-beta.10",
"--yes"
],
"env": {
"WEATHER_CHOICES": "<WEATHER_CHOICES>"
}
}
}
}Run in your terminal:
claude mcp add knapcode-samplemcpserver -e WEATHER_CHOICES='<WEATHER_CHOICES>' -- dnx Knapcode.SampleMcpServer@0.10.0-beta.10 --yesAdd to .cursor/mcp.json:
{
"mcpServers": {
"knapcode-samplemcpserver": {
"command": "dnx",
"args": [
"Knapcode.SampleMcpServer@0.10.0-beta.10",
"--yes"
],
"env": {
"WEATHER_CHOICES": "<WEATHER_CHOICES>"
}
}
}
}Add to .vscode/mcp.json:
{
"servers": {
"knapcode-samplemcpserver": {
"type": "stdio",
"command": "dnx",
"args": [
"Knapcode.SampleMcpServer@0.10.0-beta.10",
"--yes"
],
"env": {
"WEATHER_CHOICES": "<WEATHER_CHOICES>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"knapcode-samplemcpserver": {
"command": "dnx",
"args": [
"Knapcode.SampleMcpServer@0.10.0-beta.10",
"--yes"
],
"env": {
"WEATHER_CHOICES": "<WEATHER_CHOICES>"
}
}
}
}| Name | Required | What it is |
|---|---|---|
WEATHER_CHOICES | No |