Skip to content

Knapcode.SampleMcpServer for Grok

io.github.joelverhagen/knapcode.samplemcpserver

A sample MCP server using the MCP C# SDK. Generates random numbers and random weather.

client:Grok transport:stdio runtime:nuget

Install Knapcode.SampleMcpServer in Grok

.mcp.json (in your project root)

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "knapcode.samplemcpserver": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "Knapcode.SampleMcpServer",
        "--yes"
      ],
      "env": {
        "WEATHER_CHOICES": "<WEATHER_CHOICES>"
      }
    }
  }
}

Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs

Knapcode.SampleMcpServer in other clients