Work
Live

GZW Wiki

I built a wiki agents can edit, and kept a human moderator on every change.

Year
2026
Role
Solo Developer
Screenshot of GZW Wiki

I built GZW Wiki, an unofficial wiki for Gray Zone Warfare. It covers ammo, weapons, parts, gear, keys, vendors, tasks and the hideout, and every record carries its game version and a source. Changes come in as proposals, and a moderator approves them before they are published.

The interesting bit is the MCP server, with 35 tools. Claude or any MCP client can read the wiki and propose edits, behind its own OAuth flow with PKCE and a consent screen. The site's own /assistant uses the same read tools and has no write tool at all, and Mastra agents moderate comments, listings, messages and edit proposals.

I test every MCP tool against every role. The repo is private; the site is live.

Context

GZW Wiki is an unofficial community wiki for Gray Zone Warfare, built for players who want data they can trust: ammo, weapons, parts, gear, keys, vendors, tasks and the hideout, each record tagged with a game version and a source. It also has a player marketplace with listings and messages, and an official-patch-notes feed. I built it alone and it is live at gzwiki.org.

How it works

  1. 1

    An agent connects over MCP

    Claude or any MCP client signs in through the wiki's own OAuth flow, with PKCE and a consent screen.

  2. 2

    It reads before it writes

    35 tools let it search and read records, each carrying a game version and a source.

  3. 3

    Edits arrive as proposals

    The agent never publishes directly. A change lands in the review queue as a proposal.

  4. 4

    A moderator decides

    A human approves the proposal before it goes live. The site's own assistant only has the read tools.

Architecture

Next.js 16 front end organised with Feature-Sliced Design and next-intl, PocketBase for data, auth and files (with hooks and migrations shipped in the image), an Elysia API mounted under /api serving REST and the MCP endpoint, Mastra agents for moderation and the site assistant, all deployed with Docker Compose on Coolify.

Engineering notes

  • Agents propose, humans publish

    Every change, from a person or an agent, is a proposal carrying a source and a game version. Approving one applies it, and the review tool refuses to overwrite a record that changed since the moderator looked unless it is forced. The permission model sits in PocketBase rules and hooks, not in the MCP layer, so a contributor's agent is limited to what that contributor could do. The 27 public read tools are defined once and shared by the MCP server and the site's own /assistant, which has no write tool and can only prepare a draft for the reader to send.

  • Agents act as the user, not as a super-account

    The MCP server issues its own tokens through an OAuth flow with PKCE and a consent screen. The agent runs as the signed-in user, with a separate, expiring token, and cannot touch the account itself. I wrote this because MCP clients differ in when they offer to sign in, so the server exposes a variant endpoint that always asks.

  • AI moderation with the decision kept in code

    Mastra agents check comments, listings, messages and proposals and return a strict structured verdict. Anything that fails validation leaves the item pending, never a default verdict. What the verdict is allowed to do is decided in code after the model: for proposals, the AI can only approve when the author already has a clean history with human moderators, and only humans can make an author trusted. Traces go to a Mastra Studio instance reachable only on a private network.

  • Permissions tested as a table

    Integration tests run against a throwaway PocketBase in Docker. One test crosses every MCP tool and REST route with anonymous, contributor, moderator and invalid-token callers, and fails when a new tool or route has no row in the matrix.

Features

  • MCP server with 35 tools, read and propose or review edits
  • Its own OAuth flow with PKCE and a consent screen
  • Agents propose edits, moderators approve before publishing
  • Site assistant with the same read tools and no write tool
  • AI moderation of comments, listings, messages and edit proposals
  • Tests check every MCP tool against every role

Built with

  • Next.js
  • PocketBase
  • Elysia
  • Mastra
  • Bun
  • Tailwind CSS