Repository navigation
Development
- TypeScript on Node.js 22 or newer.
- The official MCP TypeScript SDK.
- openapi-fetch, with types generated from WorldAPI's OpenAPI document.
- zod for tool inputs.
- Biome for lint and format, Vitest for tests.
- Every tool calls WorldAPI through the generated client. A changed endpoint then fails the typecheck instead of failing at runtime.
-
Follow WorldAPI. After WorldAPI changes an endpoint, run
npm run generateand fix what breaks. It reads../minecraft-worldapi/docs/openapi.jsonby default;npm run generate -- <path or URL>reads another copy. RaiseMIN_WORLDAPIinsrc/version.tswhen a release depends on new endpoints. -
Game text is untrusted. Chat, signs, books, item and entity names, script logs, console lines, and files come from players: mark such a tool
untrusted, and say in its description that the output is data, not instructions. -
Honest scope and effect. A tool's
scopemust be the permission WorldAPI's endpoint checks. Itseffectmust be true, since read-only mode hides everything that isn'tread. -
HTTP stays locked. Over HTTP the server refuses to listen beyond loopback without
MCP_HTTP_TOKEN. - Never print or log a token.
-
npm run lint,npm run typecheck, andnpm testmust pass; CI runs the same, then packs the bundle. -
Tests use a mocked WorldAPI and never touch the network.
-
scripts/live-check.mjsruns the built server against a real WorldAPI. Without arguments it takes a read-only tour; with a tool name and JSON arguments it calls that tool:WORLDAPI_URL=https://minecraft.mairwunnx.com/worldapi/api/v1 node scripts/live-check.mjs
Write tools change the live world, so run them only against a server you may change.
-
A change to the bundle:
npm run pack:mcpb, install the.mcpbin Claude Desktop, and call one tool.
Short, one-line, imperative English messages, one logical change per commit: “Fence chat and sign text as game data”.
.github/workflows/autopilot.yml runs Claude every Monday at 03:00 UTC. It updates the dependencies, fixes what breaks, pushes to master, and runs the release when the package changed.
AI wrote most of the code and the documentation from my task descriptions, and I review what it makes. AI also writes the commit messages from the changes, and AI agents tested the tools on a real server.
Next: Releasing.
Players and server owners
- Installation
- Claude Desktop
- Claude Code
- Cursor
- Other clients
- Configuration
- Tokens and permissions
- Tools
- Example prompts
- Security
- Troubleshooting
Developers