Skip to content

Claude Code

Pavel Erokhin edited this page Oct 19, 2026 · 1 revision

Claude Code

Claude Code starts minecraft-mcp with npx, so you need Node.js 22 or newer.

  1. Add the server. Replace the URL, the token, and the player name with yours:

    claude mcp add minecraft \
      -e WORLDAPI_URL=http://localhost:8110/api/v1 \
      -e WORLDAPI_TOKEN=your-token \
      -e WORLDAPI_PLAYER=Steve \
      -- npx -y @mairwunnx/minecraft-mcp

    Add --scope user to have it in every project. Leave out WORLDAPI_TOKEN to read only what visitors may.

  2. Start Claude Code and run /mcp. You should see minecraft connected, with its tools.

  3. Ask “who's online?”.

Try it on Moonlands

claude mcp add moonlands -e WORLDAPI_URL=https://minecraft.mairwunnx.com/worldapi/api/v1 -- npx -y @mairwunnx/minecraft-mcp

Then ask “who played the most on Moonlands this week?”.

Connect over HTTP

When minecraft-mcp runs on another machine (see Other clients):

claude mcp add --transport http minecraft http://your-host:3333/mcp \
  --header "Authorization: Bearer a-long-random-secret"

Next: Tokens and permissions.

Clone this wiki locally