
mc-asset — Minecraft Pixel Asset Engine
io.github.smile-minecraftPublished by GitHub account smile-minecraftv0.5.0Updated Nov 1, 2026
Deterministic Minecraft pixel-art engine: textures, animation sheets, and pack validation.
Overview
Deterministic Minecraft Java resource-pack pixel-art engine that lets an assistant draw, convert, validate and package textures, models and packs.
- What you can do
- Draw and build textures: render character grids, build editable sources, apply batch pixel operations, import and transform rasters
- Convert and recolor art: pixelize reference images, quantize palettes, clean up defects, recolor and fan out material variants
- Generate and tile: seeded procedural patterns, seam checks, GUI nine-slice scaling, animation sheet packing and mcmeta metadata
- Inspect and compare: analyze metrics, palette reports, structure or composited views, pixel-by-pixel PNG diffs, lossless PNG optimization
- Validate and package: single-texture and whole-pack checks, Java block model create/validate/preview, pack scaffolding, cataloging and reproducible zips
- When to use it
- Useful when building or auditing Minecraft Java resource packs and pixel art, especially when an assistant must produce exact, reproducible textures from text instead of placing pixels by eye, or check a pack for broken references and naming.
- Requirements
- Runs locally over stdio, typically started with npx -y mc-asset mcp, so Node.js is needed (tested with Node.js 22; Bun 1.3 also works). No accounts, API keys or environment variables are declared. Desktop client only.
Installation
In SourceWeft
- Open mc-asset — Minecraft Pixel Asset Engine in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
mc-asset
[CI] [Release] [License] [npm]
mc-asset is a texture and model tool for Minecraft Java Edition resource packs, built for both creators and AI agents over the command line (CLI) or MCP.
Language models can't place pixels by eye, so mc-asset turns texture work into text and commands: draw a sprite as a character grid, pixelize reference art, generate tiling textures, pack animation sheets, preview cuboid models, and validate a whole resource pack, from a shell or over MCP. The same input and seed always produce identical files.
[A sword, pickaxe, apple, potion, sapphire, and key, each a 16×16 sprite in the vanilla style]
Six 16×16 items, each written as a text grid and drawn by mc-asset render (shown ×6), following the vanilla style rules in the minecraft-pixel-art skill. The grids are in docs/assets/showcase/items/.
Contents
- What It Does
- Highlights
- Showcase
- Installation
- For AI agents
- Quickstart
- Practical Recipes
- MCP Server
- Command Reference
- Batch Operations (
--operations) - Architecture & Reliability Guarantees
- Development
- License
What It Does
- Draw textures from text character grids (
render) - Downsample reference art into pixel art (
pixelize) and reduce colors (quantize) - Fan one sprite out into material variants (
variant) - Generate and seam-check tiling textures (
generate,tile) - Pack animation sprite sheets and write
.mcmetafiles (animate,mcmeta) - Scale GUI sprites with nine-slice borders (
gui-scale) - Compare two PNGs pixel by pixel (
compare) - Validate a single texture or a whole resource pack (
validate,validate-pack) - Losslessly compress PNGs (
optimize) - Create, validate, and preview Java block models (
model) - Author complete resource packs from declarative recipes, audit styles, catalog vanilla assets, and export reproducible zips (
pack,style) - Expose all capabilities to AI agents over an MCP server (
mcp)
Highlights
- Text in, texture out. Sprites are character grids (
.grid) or editable multi-layer sources (.mcpx) that build to PNG. Seedocs/mcpx-format.md. - Identical output. No unseeded randomness and integer-only color blending, so PNG and
.mcpxoutput is identical run to run and between Bun and Node. - One engine, two front ends. The CLI and the stdio MCP server call the same core, so an agent gets the exact same result as a shell script.
- Uniform JSON output.
--jsonalways returns{ success, result, error }with a stable error code, and logs never mix into stdout data. - No surprise writes. Every output path is explicit, existing files need
--force, and each file is written to a temp file before being renamed into place.
Showcase
Every image below is produced by mc-asset itself, with fixed seeds for the generated textures, so the whole set is reproducible. The commands live in docs/assets/showcase/README.md.
Material variants — the sword from the top of this page fanned out into all nine built-in materials (copper, crystal, diamond, gold, iron, netherite, oxidized_copper, stone, wood, shown ×5). Its palette gives each color a role, so the blade and guard take the new ramp while the darkest outline, the white glint, the wooden grip, and the guard's gem keep their colors:
[the sword recolored into nine materials]
Generated patterns — every generate pattern as a 16px swatch from a fixed seed (shown ×4):
Seamless tiling — a 16px brick block face (left, ×8) and a 4×4 wall of it (right, ×4); the mortar lines continue across every edge:
[tile source] [4x4 tiled wall]
Block textures — stone, dirt, and oak planks as 16×16 textures (left, ×8) that tile cleanly across all four edges. On the right is a 4×4 wall of the planks texture (×4):
[three block faces] [4x4 planks wall]
Animation sheet — four frames of a glowing ore block packed into one vertical strip (×4), the layout Minecraft reads with an .mcmeta animation:
Potion variants and compare — the potion recolored into crystal, gold, and iron (×5) while the glass bottle, wooden cork, and white glint keep their colors; compare of the iron and gold variants finds 72 changed liquid pixels, marked in magenta on the diagnostic (×8):
[the potion recolored into three materials] [compare diagnostic of two potion variants]
Button nine-slice — a 16px button frame (left, ×4) scaled to 48×16 with nine-slice (middle, ×4) and with plain stretch (right, ×4); the nine-slice keeps the corners and bevels crisp while the stretch smears them:
[button source] [button nine-slice result] [button stretched result]
Java model three-view preview — a five-cuboid stepped shrine model (model-shrine.json) using the brick, planks, stone, and glowing ore textures shown above. model preview --size 128 looks at it three times: from the front (north, front), from the side (east, right), and from above (top):
[three-view diagnostic preview of a stepped shrine block model]
Installation
Via npm (recommended)
Run the server straight from the registry — no local install needed:
Install the CLI globally to get the mc-asset command on your PATH:
Via Homebrew (macOS / Linux)
Via Bun or Node.js (From Source)
Prerequisites: tested with Node.js 22 and Bun 1.3. bun run build needs Bun and ./bin/mc-asset.js needs Node.js; with Bun alone, run bun ./bin/mc-asset.js.
For AI agents
llms.txt— a compact index of the repository for agents.llms-full.txt— the same material as a single file: install, the twenty-five MCP tools, batch operations, the error model, and the limits.docs/cli-surface.md— the frozen CLI commands, the batch operations specification, and the exit-code registry.docs/mcpx-format.md— the editable multi-layer.mcpxand.gridgrammar and specification.docs/mcp-guide.md— registration, one verbatim capture per MCP tool, and the error model.docs/mcp-surface.md— the frozen MCP surface: tool names, inputs, and the read/write contract.AGENTS.md— the rules for changing this repository.
Agent skills
The repository ships two Agent Skills in skills/, installable with the skills CLI:
mc-asset— the draw → render → preview → measure → validate loop with this tool, the CLI/MCP command map, and how palette roles drive recoloring.minecraft-pixel-art— the vanilla style rules for items, blocks, GUI sprites, and animations: palettes and hue-shifted ramps, material outlines, top-left light, tiling, and an anti-pattern review checklist.
Add --skill mc-asset or --skill minecraft-pixel-art to install only one.
Quickstart
From a Text Grid to a Validated Texture
Draw a 16×16 gem as a character grid, one character per pixel:
Render the grid into a PNG texture and save the editable .mcpx source:
The rendered gem.png, shown ×8:
Check its colors and alpha:
Validate it as a Minecraft item texture:
Practical Recipes
Recipe 1: Downsampling Reference Art (pixelize)
Turn a high-resolution reference image into a 16×16 item texture. The same image and preset always give the same pixels:
--preset itemsets a 16-color budget and turns on the crop, background, subject, edge, and cluster stages.- The other presets are
block,gui,particle, andgeneric.
Recipe 2: Procedural Textures & Seam Tiling (generate & tile)
Generate a stone texture from a fixed seed, then check whether it tiles:
Recipe 3: Palette Quantization & Artifact Cleanup (quantize & cleanup)
Cut a sprite down to 8 colors, then remove the stray pixels left behind:
These fix classes can change alpha, and with it the render pass the texture needs, so cleanup refuses them without --allow-render-pass-change.
Recipe 4: Material Variants (variant & recolor)
Fan one source out into several material tiers, or recolor it to a single
material. The source can be an editable .mcpx or a flat PNG (a PNG
carries no palette roles, so its pixels map by integer luminance bands
with no invented layer roles):
Recipe 5: Animated Sprite Sheets (animate)
Pack a folder of frames into a vertical sheet, then check it against its .mcmeta:
Recipe 6: Full Resource Pack Validation (validate-pack)
Scan a whole resource pack for missing textures, bad namespaces, orphaned textures, broken model references, and reference cycles. --minecraft-version picks the pack format to check against:
Recipe 7: Batch Edits with Visual Feedback (build & apply_asset_operations)
Edit the Quickstart gem in one batch: a 4×4 gold square framed by a 6×6 black outline. The CLI applies the batch and writes a PNG:
Before and after the batch (both ×8):
[gem before the batch] → [gem after the batch]
Over MCP, apply_asset_operations runs the same batch and can send back a picture of what changed:
With feedback, the result keeps its usual fields and adds a PNG image block cropped to the changed area and upscaled by scale (1–16), plus a diff summary (raw, composited, structural, outsideSelectionUnchanged). An edit with no visible change returns noVisibleChange instead of an image. The agent sees its edit without pulling the whole canvas. The output path differs from the CLI run because MCP tools never overwrite an existing file.
Recipe 8: Nine-Slice GUI Scaling (gui-scale)
Resize a GUI frame without smearing its border. With nine_slice, the corners copy 1:1 and the edges and center tile (or stretch, with stretch_inner: true). The 16×16 dialog.png declares a 4px border in dialog.png.mcmeta:
gui-scale never picks up a sibling .mcmeta on its own; without --mcmeta it stretches the whole sprite.
All three are shown ×4. With the mcmeta the cut corners and the 2px bevels copy 1:1 and keep their width; the plain stretch thickens the bevels unevenly and smears the corners.
Recipe 9: Lossless PNG Optimization & Java Models (optimize & model)
optimize re-encodes PNGs into the smallest encoding that holds the same pixels exactly, or keeps the source when nothing is smaller. It takes explicit PNG paths (up to 256 files) or a whole directory (--input-dir, up to 4096 PNGs, optional --recursive, preserving relative paths). It never rewrites its inputs; pick --output, --output-dir, --stdout, or --dry-run.
model works on Java block/item model JSON (cuboid elements only). Create a model, edit it with typed operations, and validate it against a pack:
model apply takes --operations and applies all of them or none; model export places the model and, with --binding, writes an item definition and a blockstate next to it. The checks cover structure and reference validity. No Minecraft client renders the result, so appearance and in-game behavior are not verified.
model preview renders a fixed diagnostic image from cuboid elements: three square panels side by side (front = north face, right = east face, top = up face with north at the top), each --size pixels (64, 128, or 256; default 64):
[three-view diagnostic preview of a stepped shrine block model]
Exactly one of --output or --stdout is required. The report carries panel names and coordinates, the input range, coverage, and warnings. A missing texture renders as a fixed checkerboard with a warning; element rotation, non-1/256 coordinates, translucent faces, and unresolvable textures are listed as partial coverage. display transforms and game lighting are not applied: this is a diagnostic view, not a game renderer.
MCP Server
mc-asset mcp starts a stdio MCP server on the same core as the CLI, so a tool call and the matching command return the same result. It exposes 27 tools.
Exposed MCP Tools
inspect_asset has two modes: structure reports layers, regions, color usage, and overlaps; view returns the composited canvas as a PNG image block, with optional crop and scale (1–16). A view wider than 1024px is refused with a crop hint instead of being downscaled. apply_asset_operations takes an optional feedback object (Recipe 7); without it the result is unchanged. docs/mcp-guide.md has one captured call per tool.
Configuration
Every client runs the same stdio command, npx -y mc-asset mcp. Config file locations change between client versions, so check the client's own docs if one below has moved.
Claude Code
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Cursor
Add to .cursor/mcp.json:
OpenCode
Add to opencode.json or opencode.jsonc:
Command Reference
Generate animation and GUI metadata (mcmeta)
animation- Required:
--frame-size <N|WxH>(a single row or column of equal frames dividing the PNG; grids are not accepted). - Optional:
--frametime <int>(default1),--frames <json>(frame indices or{index,time}objects with positive integer times),--interpolate.
- Required:
gui- Required:
--type <stretch|tile|nine_slice>;nine_slicealso requires--border <N|json>with non-negativeleft,top,right,bottomand a positive center. - Optional:
--stretch-inner(nine_sliceonly). GUI scaling requires pack format16.0(stretch_innerrequires42.0); seedocs/cli-surface.mdfor version gates and output options.
- Required:
Compare PNG changes (compare)
Compares two same-size PNGs and reports rawChangedPixels, visibleChangedPixels, rawBounds, and visibleBounds. With --output or --stdout (--scale 1..16, longest edge at most 1024px), it writes a diagnostic marker PNG where visible changes are magenta (255,0,255,255), raw-only alpha-zero RGB changes are cyan (0,255,255,255), and unchanged pixels are transparent.
Batch Operations (--operations)
The import, render, and build commands support batch pixel edits via --operations <path> or --operations - (stdin).
- Atomicity: Execution is all-or-nothing. If an operation fails (e.g. out of bounds), all preceding operations in the batch roll back.
- Color Values: Accepts
transparent,#RRGGBB, or#RRGGBBAA. - Vocabulary: 25 typed variants, including 9 pixel operations (
setPixel,clearPixel,drawLine,drawRect,fillRect,floodFill,ellipse,polygonFill,strokeMask) plus layer, region,stampRect, andregionFromSelectionoperations. The full per-type table lives indocs/cli-surface.md. - Shapes:
ellipsefills or outlines the ellipse inside arect;polygonFilltakes up to 4096 integer[x, y]points (more isRESOURCE_LIMIT_EXCEEDED; a self-intersecting ring isSELF_INTERSECTING_POLYGON; no holes);strokeMaskoutlines asourceselection on one layer. - Selection: Pixel operations accept an optional
selectionexpression; an empty match refuses the write withEMPTY_SELECTIONand rolls the batch back.
Architecture & Reliability Guarantees
Determinism Model
- Byte-Identical PNG Encoding: Uses fixed deflate levels and filter strategies (
src/io/png.ts) with pure integer color blending. Output files do not embed timestamps or host metadata. - Seed-Driven PRNG: Procedural generation relies exclusively on an integer xorshift32 PRNG initialized via
--seed. - Cross-Runtime Consistency: Output bytes produced under Bun match bytes produced under Node.js byte for byte for the commands covered by the
scripts/compare-runtime.mjsmatrix.
File & Channel Safety
- Atomic Writes: Every output file is written to a unique temporary file (
.tmp-<pid>-<counter>-<randomhex>-<original name>) in the target directory and committed via atomic rename. - Collision Protection: Paths are resolved to absolute normalized paths folded with Unicode NFC and case-folding. Aliasing the input without
--in-placeor defining duplicate output targets fails before any bytes land on disk. - Channel Isolation:
- Without
--stdout: Human logs route to stdout. With--json, a structured{ success, result, error }envelope routes to stdout and logs route to stderr. - With
--stdout: Raw artifact bytes exclusively own stdout. Envelope and logs route to stderr.
- Without
Standardized Exit Codes
Development
License
MIT © 2026 Smile Minecraft Project
Source: README.md at commit a6c46dc
Tools
0Version history
4- v0.5.0LatestOct 18, 2026
- v0.4.0Oct 15, 2026
- v0.3.2Sep 23, 2026
- v0.3.1Sep 21, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts