Knapcode.SampleMcpServer for Gemini CLI
io.github.joelverhagen/knapcode.samplemcpserver
A sample MCP server using the MCP C# SDK. Generates random numbers and random weather.
client:Gemini CLI
transport:stdio
runtime:nuget
Install Knapcode.SampleMcpServer in Gemini CLI
~/.gemini/settings.json · windows: %USERPROFILE%\.gemini\settings.json
{
"mcpServers": {
"knapcode.samplemcpserver": {
"command": "dnx",
"args": [
"Knapcode.SampleMcpServer",
"--yes"
],
"env": {
"WEATHER_CHOICES": "<WEATHER_CHOICES>"
}
}
}
}
Gemini expands $VAR and ${VAR} inside env values, so a secret can live in your shell rather than this file. Gemini CLI docs