MCP server for generating 2D placeholder game assets

MCP server for generating 2D placeholder game assets

2d-assets-mcp•bycrony-io

An engine-agnostic MCP server that lets AI assistants generate mock 2D game assets such as sprites, spritesheets, health bars, and UI elements as PNG files in a project folder.

License: MIT•Runtime: Awaiting documentation review•Category: media design

WHAT IT DOES

  • •Generates single PNG assets from a tool call with configurable color, shape, gradients, patterns, opacity, text, and stroke settings.
  • •Creates multiple assets in one request, either as individual PNGs or composed into a single-row spritesheet animation strip.
  • •Embeds JSON metadata directly in PNG EXIF data so AI models without vision can understand asset contents, and exposes a tool to read it back.
  • •Supports partially filled progress and health bars via fill percentage and track color, with auto-scaling text labels.

BEST FOR

  • •Prototyping game feel, scale, timing, and animation frames before final artwork is ready.
  • •Generating placeholder UI elements like buttons and health bars through chat without opening an image editor.

ABOUT 2D-ASSETS-MCP

MCP server for generating 2D placeholder game assets is cataloged as an MCP server attributed to crony-io. An engine-agnostic MCP server that lets AI assistants generate mock 2D game assets such as sprites, spritesheets, health bars, and UI elements as PNG files in a project folder. It is categorized under media design. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for generating 2D placeholder game assets are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How do non-vision AI models learn what a generated asset contains?

Each generated PNG embeds JSON metadata in its EXIF data, which can be read back with the read_image_metadata tool without loading image pixels.

Can multiple animation frames be combined into one spritesheet?

Yes, the batch tool can compose frames into a single-row animation strip, sizing each cell to the largest asset and centering smaller assets within it.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 49e6c76c7f53 · 采集于 2026-11-13 11:34:08 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

2d-assets-mcp

Design your game's feel before you design its art.

npm version npm downloads License: MIT TypeScript

Just like wireframing helps designers visualize user flows before start sketching, 2d-assets-mcp helps game developers visualize timing, frames-per-second (FPS), collision boundaries, and UI layouts before spending hours on final artwork.

This MCP (Model Context Protocol) server lets any AI assistant (Antigravity, Claude Code, Codex, Devin, or any of them as long as it's MCP-compatible) generate advanced 2D mock/placeholder assets in PNG format right into your project folder. Save time and prototype faster, nail your game's feel with 2d-assets-mcp, and then replace the mockups with original artwork when you are ready.

This MCP is engine-agnostic and it works flawlessly with any game engine that supports PNG import, like:

  • Godot
  • Unity
  • Unreal Engine
  • GameMaker
  • Construct
  • RPG Maker
  • And many more!

Save time and create placeholder health bars, spritesheets, and whatever UI elements you can think of with full support for gradients, patterns, transparency, text rotation, and auto-scaling, all via chat and without ever opening an image editor. The idea behind it is to help you test and iterate how your game feels first by prototiping scale, jump arcs, and animation timing without waiting on final art assets, and also with zero friction: Need that placeholder button to be 20% larger? Just ask your AI client to regenerate it.

[!TIP] 2d-assets-mcp has AI-Friendly Metadata → meaning each generated PNG embeds rich JSON metadata (dimensions, color, shape, gradient properties, pattern details, text properties, stroke properties, description) directly in its EXIF data, so AI models without vision can still understand what an asset contains.

Generated Assets Examples

Here are some example assets generated by this MCP server:

readme_assets_display.gif

showcase_gallery.png

Character Sprites & Animations

Hero Idle Animation (8 frames, 512x64)

Hero Idle

8-frame idle animation spritesheet with effect

UI Elements

Attack Button (128×48)

Attack Button

Button with red gradient, rounded corners, and "ATTACK" label

Health Bar (200×24)

Health Bar

Health bar at 75% fill with green color and dark gray track

Game Items

Gold Coin (32×32)

Gold Coin

Circular coin with radial gradient, dot pattern overlay, and "COIN" label

Grass and water

tile_grass.png tile_water.png

Trees

prop_tree.png

Animation Spritesheets

Fire animation (4 frames, 192x48)

Fire animation

4-frame spritesheet

Security Considerations

Asset Content

  • Generated assets are pure placeholder graphics and they do not contain malicious code.
  • Embedded metadata is plain JSON and is not executable.

Because this MCP server writes files directly to your machine to save you time, please review these security best practices:

File System Access

  • The server can write files to any path specified by the AI assistant.
  • Recommendation: Configure your AI client to restrict access strictly to your game's project directories.
  • Warning: Be cautious when asking the AI to generate assets outside your project directory.

Path Traversal

  • This server validates paths, but you should always be aware of potential path traversal attempts when dealing with MCP servers, and review generated file paths before confirming operations.

Overall Best Practices

  • Use absolute paths in configurations to prevent ambiguity.
  • Restrict AI access to your game project directory only.
  • Review generated assets before committing to version control.
  • Keep your Node.js dependencies updated.

Core Features

  • Instant asset generation: one tool call, one PNG, full visual configuration.
  • Spritesheet & Batch mode: generate multiple frames or composite them into a single animation-strip spritesheet in one request.
  • Rich visuals: support for solid fills, linear/radial gradients, stripe/dot/grid pattern overlays, rounded corners, circles, opacity, and stroke control.
  • Dynamic UI Elements: create partially filled progress/health bars using fillPercent and trackColor for partially-filled assets.
  • Auto-scaling labels: text automatically scales to fit the asset, or you can override it with explicit fontSize if needed.
  • Non-vision AI friendly: embedded JSON metadata readable back via read_image_metadata, without loading image pixels, ideal for non-vision AI workflows.
  • Smart naming: output files are automatically named with their dimensions (e.g. player_idle_128x128.png) to help models with no vision know the dimensions when using the asset.

Tools Reference

This MCP server equips your AI with 3 tools to generate and read 2D asset metadata.

1. generate_mock_asset

Generates a single PNG asset and writes it to the disk. It supports gradients, patterns, transparency, text rotation, and embedded metadata.

Parameters (press to expand)

Required parameters

ParameterTypeDescription
filenamestringOutput filename, e.g. player_idle.png
directorystringAbsolute path to the output folder (created if missing)
textstringLabel rendered on the asset
colorstringBackground hex color, e.g. #FF5733

Optional parameters: shape & size

ParameterTypeDefaultDescription
widthnumber128Width in pixels
heightnumber128Height in pixels
shaperectangle | rounded-rectangle | circlerectangleGeometric shape
opacitynumber 0–11.0Background opacity
strokeColorstring#000000Border hex color
strokeWidthnumber4Border width in px; 0 removes the border

Optional parameters: fill & gradient

ParameterTypeDefaultDescription
fillModesolid | linear-gradient | radial-gradientsolidBackground fill type
secondaryColorstringauto-derivedSecond gradient stop; auto-shaded from color if omitted
gradientAnglenumber45Angle in degrees for linear gradients (ignored for radial)

Optional parameters: progress/health bar

ParameterTypeDefaultDescription
fillPercentnumber 0–100100How much of the asset is filled (left to right)
trackColorstring—Color of the unfilled portion; transparent if omitted

Optional parameters: pattern overlay

ParameterTypeDefaultDescription
patternnone | stripes | dots | gridnonePattern overlay type
patternColorstringauto-derivedPattern color; contrast-auto if omitted
patternOpacitynumber 0–10.18Pattern overlay opacity
patternScalenumber ≥216Pattern tile size in pixels

Optional parameters: text

ParameterTypeDefaultDescription
textPositioncenter | top | bottomcenterVertical text alignment
fontSizenumberauto-scaledExplicit font size in px; auto-fits if omitted
textRotationnumber0Text rotation angle in degrees
textColorstringauto-contrastingHex color for text; auto-calculated if omitted

Optional parameters: metadata

ParameterTypeDefaultDescription
assetDescriptionstring—Human-readable description embedded in the PNG EXIF for non-vision AI context

[!NOTE] Output filename format

The server automatically appends the dimensions to the filename before writing:

player_idle.png  →  player_idle_128x128.png

2. generate_mock_asset_batch

Generates multiple assets in one request. Supports individual PNGs or a single composed spritesheet.

Parameters (press to expand)

Required parameters

ParameterTypeDescription
assetsAssetConfig[]Array of asset configs (same fields as generate_mock_asset)

Optional parameters

ParameterTypeDefaultDescription
spritesheetModeindividual \ spritesheetspritesheetindividual writes separate PNGs; spritesheet composes a single PNG
sheetFilenamestringspritesheet.pngOutput filename for the composed spritesheet
sheetDirectorystringfirst asset's directoryOutput directory for the spritesheet
sheetMarginnumber8Outer padding around the spritesheet in pixels
sheetSpacingnumber8Gap between animation frames in pixels

[!NOTE] Spritesheet layout

All assets are arranged in a single row (traditional animation strip). Each frame cell is sized to the largest asset in the batch; smaller assets are centered within their cell. The output filename includes the total sheet dimensions:

player_run.png  →  player_run_648x136.png

3. read_image_metadata

Reads the JSON metadata embedded in the EXIF ImageDescription field of any PNG generated by this server. Useful for AI models that lack vision, because they can understand what an asset contains without decoding the image.

Parameters (press to expand)

Required parameters

ParameterTypeDescription
filepathstringAbsolute path to the PNG file

How metadata embedding works

Metadata is stored as a JSON string in the PNG's EXIF IFD0.ImageDescription field using the sharp library's withMetadata API.

Reading it back uses a deliberate bypass of standard TIFF byte-walking: instead of parsing the binary TIFF structure, the raw EXIF buffer is scanned as a UTF-8 string for the known "generator":"2d-assets-mcp" key, then the surrounding JSON object is extracted. This makes the reader immune to TIFF padding, byte-order variations, and unusual IFD layouts across different PNG writers.

Example response (press to expand)
{
  "generator": "2d-assets-mcp",
  "type": "asset",
  "name": "player_idle",
  "width": 128,
  "height": 128,
  "color": "#4A90E2",
  "shape": "rounded-rectangle",
  "fillMode": "linear-gradient",
  "fillPercent": 100,
  "trackColor": null,
  "pattern": "none",
  "secondaryColor": "#2E5A8A",
  "gradientAngle": 45,
  "textRotation": 0,
  "textPosition": "center",
  "strokeColor": "#000000",
  "strokeWidth": 4,
  "description": "Player idle placeholder, blue rounded rectangle 128x128",
  "createdAt": "2025-01-15T10:30:00.000Z"
}

Spritesheet metadata fields (additional fields returned for spritesheet files)

{
  "generator": "2d-assets-mcp",
  "type": "spritesheet",
  "totalWidth": 648,
  "totalHeight": 136,
  "columns": 4,
  "rows": 1,
  "frameCount": 4,
  "frameWidth": 128,
  "frameHeight": 128,
  "margin": 8,
  "spacing": 8,
  "frames": [
    {
      "index": 0,
      "x": 8,
      "y": 8,
      "width": 128,
      "height": 128,
      "name": "frame_0",
      "color": "#4A90E2",
      "shape": "rounded-rectangle"
    }
  ],
  "createdAt": "2025-01-15T10:30:00.000Z"
}

Example Prompts for Your AI

Once connected to an AI coding assistant, try these prompts to speed up your workflow:

Single asset

"Create a 128×128 blue rounded-rectangle placeholder for my player character at C:\Users\me\project\assets\sprites\ (Windows) or /home/me/project/assets/sprites/ (Linux) or /Users/me/project/assets/sprites/ (macOS). Label it 'Player' and give it a radial gradient."

Health bar

"Generate a health bar PNG at 200×24 pixels, filled 65%, thin stroke, red fill color, dark gray track, at your project's UI folder. Call the file health_bar.png."

Spritesheet

"Create a 4-frame run cycle spritesheet for my player. Each frame should be 64×64, different shades of blue, labeled Frame 1 through Frame 4. Save it to my project's sprites folder."

Read metadata

"Read the metadata from my project's sprites folder, file player_idle_128x128.png."


Installation

Option 1: Use directly with npx (no install required)

The fastest way to connect it to any AI coding assistant:

{
  "mcpServers": {
    "2d-assets": {
      "command": "npx",
      "args": ["-y", "2d-assets-mcp"]
    }
  }
}

Option 2: Manual installation with package manager (pnpm, npm, yarn)

1. Clone the repository

git clone https://github.com/crony-io/2d-assets-mcp.git
cd 2d-assets-mcp

2. Install dependencies

pnpm install   # recommended
# or: npm install
# or: yarn install

3. Build the project

pnpm run build
# or: npm run build
# or: yarn run build

4. Configure your MCP client

{
  "mcpServers": {
    "2d-assets-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/2d-assets-mcp/dist/index.js"]
    }
  }
}

Option 3: Install globally with pnpm or npm

This project works with any Node.js package manager. Choose your preferred one:

npm

npm install -g 2d-assets-mcp

pnpm

pnpm add -g 2d-assets-mcp

Then reference the installed binary:

{
  "mcpServers": {
    "2d-assets": {
      "command": "2d-assets-mcp"
    }
  }
}

Claude Code / Claude Desktop

Add to your Claude Code/Claude Desktop MCP settings:

{
  "mcpServers": {
    "2d-assets-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/2d-assets-mcp/dist/index.js"]
    }
  }
}

Devin

Add to your Devin MCP settings (mcp_config.json):

{
  "mcpServers": {
    "2d-assets-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/2d-assets-mcp/dist/index.js"],
      "disabled": false
    }
  }
}

Cursor

Create .cursor/mcp.json in your project:

{
  "mcpServers": {
    "2d-assets-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/2d-assets-mcp/dist/index.js"]
    }
  }
}

Development

Prerequisites

  • Node.js 18 or later
  • pnpm 8 or later or npm 9 or later (any package manager works)

Setup

git clone https://github.com/crony-io/2d-assets-mcp.git
cd 2d-assets-mcp
# Choose your package manager:
pnpm install   # recommended
# or
npm install
# or
yarn install

Scripts

CommandDescription
npm run build / pnpm run buildCompile TypeScript to dist/
npm run dev / pnpm run devRun directly from source with tsx (no build needed)
npm run start / pnpm run startRun the compiled server from dist/
npm run typecheck / pnpm run typecheckType-check without emitting files
npm run check / pnpm run checkRun all checks: format, lint, and typecheck

Adding a new tool

  1. Create src/tools/yourTool.ts and export a registerYourTool(server: McpServer) function
  2. Import and call it in src/server.ts
  3. Add any new Zod schemas to src/schemas.ts and types to src/types.ts

License

MIT — see LICENSE for full text.


Contributing

Issues and pull requests are always welcome. Just please, before you open a PR make sure to:

  1. Run pnpm run check or npm run check (zero errors required).
  2. Keep new tools in their own file under src/tools/.
  3. Export new types from src/types.ts and schemas from src/schemas.ts.
  4. Update this README's Tools Reference section for any new or changed parameters.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for generating 2D placeholder game assets from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/2d-assets-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related media design MCP Servers

Alternative and complementary servers in the same category

View all in media design →

A Rust CAD application with an MCP server for creating, inspecting and rendering drawings, either headlessly or through a connection to the desktop app.

8K
Media & Design
Liquid Composer
liquid-composer•frontedu

Liquid Composer is a browser-based Liquid Glass icon design tool that offers a local MCP server for agent-driven icon workflows.

69
Media & Design

agent-media makes short drama series and other short vertical videos from Claude, ChatGPT or Codex through one MCP connection, with OAuth sign-in and no API keys.

1
Media & Design