Skip to main content
Glama
pz-modding-mcp

pz-modding-mcp

by MrMikojo

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PZ_DIRNoThe folder with projectzomboid.jar. Defaults to the usual Steam folders on Windows, Linux and macOS.
PZ_MCP_CFRNoPath to a CFR jar. pz_source is off without it. Not set by default.
PZ_MCP_JAVANoJava to run CFR with. Defaults to PZ's jre64, then java on PATH.
PZ_MCP_CACHENoWhere the indexes go. Defaults to %LOCALAPPDATA%\pz-modding-mcp, ~/.cache/pz-modding-mcp, or ~/Library/Caches/pz-modding-mcp.
PZ_MCP_WORKSPACENoFolders show_lua_function may read, separated by ';' on Windows or ':' elsewhere. Defaults to the folder the server starts in.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Project Zomboid (Build 42) modding tools that read the user's installed game. Never guess a PZ name: pz_check or pz_api for any Java class, method, field, event or global; pz_items for item and recipe names; pz_lua_search to see how PZ's own Lua does something; show_lua_function to read ONE function instead of a whole file; pz_source (if enabled) for what a Java method does. If a tool says something is missing, call pz_status.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
pz_statusA

Setup check: which PZ folder is used, whether the indexes are built, and whether pz_source is on. Call it first if another tool says something is missing.

pz_checkA

Is a Project Zomboid name real? Answers YES or NO, with the real signature. query = a command and its names: "method IsoPlayer getStats", "field IsoPlayer x", "class ItemContainer" (also says if Lua can see it), "members IsoPlayer Stat", "find getModData", "event OnZombieDead", "global getPlayer", "lua ISTimedActionQueue.add", "grep sendClientCommand(", "script item Hammer". If it says NO, do not use that name.

pz_apiA

Project Zomboid's Java API, from the installed game's jar: the public methods and fields Lua can call on PZ objects, with argument and return types. name = a class ("IsoPlayer": its members and its parents'), "Class.member" ("IsoPlayer.getStats", parents count too), or a member name alone ("getModData": every class that has it). Lua calls methods with a colon: player:getStats().

pz_lua_searchA

Search the game's own files for text (plain text, not a regex) and get file:line plus the line. folder = "lua" (media/lua, default), "scripts" (media/scripts) or "all" (all of media). Use it to see how PZ itself uses a function or event; then show_lua_function to read one function.

show_lua_functionA

Print ONE Lua function or table from a file, with line numbers, instead of reading a whole file. path = a file in your workspace (your mod) or in PZ's media folder, e.g. "media/lua/client/ISUI/ISInventoryPane.lua"; name = "ISInventoryPane:onMouseDown", "MyMod.onTick", "Recipe". A short path is searched for under the readable folders (see pz_status).

pz_itemsA

The game's items and recipes (from the installed game's media/scripts), searchable. Examples: "Base.Axe" one item, all its fields "ItemType=base:weapon sort=MaxDamage" weapons, highest damage first (= is an exact match) "Tagsripclothing" items whose Tags contain that text ( means contains) "poncho" items whose name or DisplayName contains it "recipe RipClothing" one craftRecipe, evolvedrecipe or fixing block Use it to see which items exist and their full names (Module.Name) before you use them in code.

pz_sourceA

What a PZ Java method actually does: its decompiled code, made on your PC from your own game jar with CFR (off unless PZ_MCP_CFR is set). cls = "IsoPlayer" or "zombie.characters.IsoPlayer"; method = a name (all its overloads) or "" for the class outline. For understanding PZ only: never copy PZ code into a mod.

pz_rebuild_indexesA

Rebuild the Java API and item indexes from the installed game. Only needed after a PZ update if a tool seems out of date: the tools rebuild by themselves when the game files change.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 8 tools

Disambiguation4/5

Each tool targets a distinct facet of the modding workflow (setup, index rebuild, name validation, Java API browse, Lua search, function reading, item/recipe lookup, decompiled source). The only soft overlap is between pz_check and pz_api/pz_source, since all three can report a signature — but the descriptions explicitly separate 'validate this name', 'browse the API', and 'read the decompiled body'.

Naming Consistency4/5

Seven of eight tools use a pz_-prefixed snake_case convention (pz_api, pz_check, pz_items, pz_rebuild_indexes, pz_lua_search, pz_source, pz_status). The single outlier, show_lua_function, drops the prefix and leads with a verb, which is a minor but noticeable inconsistency.

Tool Count5/5

Eight tools is tightly scoped for a knowledge/lookup server covering PZ's Java API, Lua sources, and item/recipe data. Every tool earns its place: no redundant entry points and no obvious padding.

Completeness4/5

The surface covers the full lookup lifecycle: setup verification, index rebuild, name validation, Java API and decompiled source, Lua text search plus targeted function reading, and item/recipe queries. Minor gaps exist around file/directory browsing (you must already know a path for show_lua_function) and any mod-editing or linting operation.

Maintenance

ActivityMaintained
ResponsivenessOutdated data