2d-assets-mcp
Enables creation of placeholder sprites, UI elements, health bars, and spritesheets for GameMaker game development.
Enables creation of placeholder sprites, UI elements, health bars, and spritesheets for Unity game development.
Enables creation of placeholder sprites, UI elements, health bars, and spritesheets for Unreal Engine game development.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@2d-assets-mcpGenerate a 64x64 gold coin with radial gradient and 'COIN' label."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
2d-assets-mcp
An MCP (Model Context Protocol) server that generates advanced mock 2D PNG assets for games prototypes — directly from any MCP-compatible AI client such as Claude Desktop.
This MCP is engine-agnostic and works with any game engine that supports PNG import:
Godot
Unity
Unreal Engine
GameMaker
Construct
RPG Maker
And many more...
Create placeholder sprites, UI elements, health bars, spritesheets, and more with full support for gradients, patterns, transparency, text rotation, and auto-scaling — all without opening an image editor.
Each generated PNG embeds rich JSON metadata (dimensions, color, shape, description) directly in its EXIF data, so AI models without vision can still understand what an asset contains.
Features
Single asset generation — one tool call, one PNG, full visual configuration
Batch + spritesheet mode — generate multiple assets or composite them into a single animation-strip spritesheet in one request
Rich visual options — solid fills, linear/radial gradients, stripe/dot/grid pattern overlays, rounded corners, circles, opacity, and border control
Progress/health bar fills —
fillPercent+trackColorfor partially-filled assetsAuto-scaling text — labels fit the asset; override with explicit
fontSizeif neededEmbedded JSON metadata — readable back via
read_image_metadatawithout loading image pixels, ideal for non-vision AI workflowsFilename dimensions — output files are named
player_idle_128x128.pngautomatically to help models with no vision know the dimensions when using the asset
Generated Assets Examples
Here are some example assets generated by this MCP server:
Character Sprites & Animations
Hero Idle Animation (4 frames, 532×136)
![]()
4-frame idle animation spritesheet with breathing effect and progressive blue shades
UI Elements
Attack Button (128×48)

Button with red gradient, rounded corners, and "ATTACK" label
Health Bar (200×24)

Health bar at 75% fill with green color and dark gray track
Game Items
Gold Coin (32×32)

Circular coin with radial gradient, dot pattern overlay, and "COIN" label
Animation Spritesheets
Player Run Cycle (4 frames, 276×72)
![]()
4-frame run animation spritesheet with progressive blue shades
Related MCP server: ComfyUI MCP Server
Tools Reference
This MCP server provides 3 tools for generating and reading 2D asset metadata.
1. generate_mock_asset
Generates a single PNG asset and writes it to disk. Supports gradients, patterns, transparency, text rotation, and embedded metadata.
Required parameters
Parameter | Type | Description |
|
| Output filename, e.g. |
|
| Absolute path to the output folder (created if missing) |
|
| Label rendered on the asset |
|
| Background hex color, e.g. |
Optional parameters — shape & size
Parameter | Type | Default | Description |
|
|
| Width in pixels |
|
|
| Height in pixels |
|
|
| Geometric shape |
|
|
| Background opacity |
|
|
| Border hex color |
|
|
| Border width in px; |
Optional parameters — fill & gradient
Parameter | Type | Default | Description |
|
|
| Background fill type |
|
| auto-derived | Second gradient stop; auto-shaded from |
|
|
| Angle in degrees for linear gradients (ignored for radial) |
Optional parameters — progress/health bar
Parameter | Type | Default | Description |
|
|
| How much of the asset is filled (left to right) |
|
| — | Color of the unfilled portion; transparent if omitted |
Optional parameters — pattern overlay
Parameter | Type | Default | Description |
|
|
| Pattern overlay type |
|
| auto-derived | Pattern color; contrast-auto if omitted |
|
|
| Pattern overlay opacity |
|
|
| Pattern tile size in pixels |
Optional parameters — text
Parameter | Type | Default | Description |
|
|
| Vertical text alignment |
|
| auto-scaled | Explicit font size in px; auto-fits if omitted |
|
|
| Text rotation angle in degrees |
Optional parameters — metadata
Parameter | Type | Default | Description |
|
| — | Human-readable description embedded in the PNG EXIF for non-vision AI context |
Output filename format
The server automatically appends the dimensions to the filename before writing:
player_idle.png → player_idle_128x128.png2. generate_mock_asset_batch
Generates multiple assets in one request. Supports individual PNGs or a single composed spritesheet.
Required parameters
Parameter | Type | Description |
|
| Array of asset configs (same fields as |
Optional parameters
Parameter | Type | Default | Description |
|
|
|
|
|
|
| Output filename for the spritesheet |
|
| first asset's directory | Output directory for the spritesheet |
|
|
| Outer padding around the spritesheet in pixels |
|
|
| Gap between frames in pixels |
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.png3. 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 — they can understand what an asset contains without decoding the image.
Required parameters
Parameter | Type | Description |
|
| Absolute 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
{
"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",
"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,
"createdAt": "2025-01-15T10:30:00.000Z"
}Usage Examples
Below are example prompts you can give Claude Desktop once the server is connected.
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%, 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 your project's sprites folder."
Read metadata
"Read the metadata from your 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 Claude Desktop:
{
"mcpServers": {
"2d-assets": {
"command": "npx",
"args": ["-y", "2d-assets-mcp"]
}
}
}Option 2 — Manual installation with package manager (npm, pnpm, yarn)
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
# build
pnpm run build
# or
npm run build
# or
yarn run buildOption 3 — Install globally with npm or pnpm
This project works with any Node.js package manager. Choose your preferred one:
npm
npm install -g 2d-assets-mcppnpm
pnpm add -g 2d-assets-mcpThen reference the installed binary:
{
"mcpServers": {
"2d-assets": {
"command": "2d-assets-mcp"
}
}
}Claude Code
Add to your Claude Code 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"]
}
}
}Claude Desktop Configuration
Open your Claude Desktop config file and add the server under mcpServers.
macOS — ~/Library/Application Support/Claude/claude_desktop_config.json
Windows — %APPDATA%\Claude\claude_desktop_config.json
Linux — ~/.config/Claude/claude_desktop_config.json
Using npx (recommended — always runs latest version)
{
"mcpServers": {
"2d-assets": {
"command": "npx",
"args": ["-y", "2d-assets-mcp"]
}
}
}Using a global install
{
"mcpServers": {
"2d-assets": {
"command": "2d-assets-mcp"
}
}
}Development
Prerequisites
Node.js 18 or later
npm 9 or later or pnpm 8 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 installScripts
Command | Description |
| Compile TypeScript to |
| Run directly from source with |
| Run the compiled server from |
| Type-check without emitting files |
| Run all checks: format, lint, and typecheck |
Adding a new tool
Create
src/tools/yourTool.tsand export aregisterYourTool(server: McpServer)functionImport and call it in
src/server.tsAdd any new Zod schemas to
src/schemas.tsand types tosrc/types.ts
License
MIT — see LICENSE for full text.
Contributing
Issues and pull requests are welcome. Before opening a PR:
Run
npm run checkorpnpm check— zero errors requiredKeep new tools in their own file under
src/tools/Export new types from
src/types.tsand schemas fromsrc/schemas.tsUpdate this README's Tools Reference section for any new or changed parameters
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/crony-io/2d-assets-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server