2D Assets MCP
v0.1.4MCP server for generating advanced mock 2D PNG assets for game prototypes.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_mock_asset
Generates a single advanced custom mock 2D PNG asset (supports gradients, patterns, text rotation, transparency, and auto-scaling) for game prototypes. Embeds JSON metadata into the PNG (dimensions, color, shape, description) readable by read_image_metadata.
| Parameter | Type | Description |
|---|---|---|
color * | string | Background hex color code, e.g., '#FF5733' |
directory * | string | Absolute path to the target project folder |
filename * | string | Name of the file, e.g., 'player_idle.png' |
text * | string | Text to display on the asset |
assetDescription | string | Human-readable description of this asset stored as image metadata. Useful for models without vision to understand the asset later. E.g. 'Player idle placeholder, blue rectangle 128x128' |
fillMode | string | Background fill mode. Default is solid when missing. |
fillPercent | number | Percentage of the asset to fill, useful for health or progress bars (0-100). Default is 100. |
fontSize | number | Optional explicit font size in pixels. If omitted, it auto-scales to fit. |
gradientAngle | number | Angle for linear gradients in degrees. Ignored for radial gradients. Default is 45 when missing. |
height | number | Height in pixels. Default is 128 when missing. |
opacity | number | Opacity of the background shape from 0.0 (transparent) to 1.0 (opaque). Default is 1.0 when missing. |
pattern | string | Optional pattern overlay. Default is none when missing. |
patternColor | string | Pattern color. If omitted, a derived contrast color will be used. |
patternOpacity | number | Pattern overlay opacity from 0.0 to 1.0. Default is 0.18 when missing. |
patternScale | number | Pattern tile size in pixels. Default is 16 when missing. |
secondaryColor | string | Secondary color used for gradients. If omitted, a derived variant of color will be used. |
shape | string | The geometric shape of the asset. Default is rectangle when missing. |
strokeColor | string | Color of the asset border hex code. Default is #000000 when missing. |
strokeWidth | number | Width of the asset border in pixels. Set to 0 for no border. Default is 4 when missing. |
textColor | string | Optional hex color for the text. If omitted, a contrasting color (black or white) will be automatically calculated based on the background. |
textPosition | string | Vertical alignment of the text. Default is center when missing. |
textRotation | number | Rotation angle for the text in degrees. Default is 0 when missing. |
trackColor | string | Background color for the unfilled portion of the asset when fillPercent < 100. Hex code, e.g., '#333333' |
width | number | Width in pixels. Default is 128 when missing. |
generate_mock_asset_batch
Generates multiple mock 2D PNG assets at once. Can create individual files, a spritesheet, Each PNG has embedded JSON metadata readable by read_image_metadata.
| Parameter | Type | Description |
|---|---|---|
assets * | array | An array of asset configuration objects to generate simultaneously |
sheetDirectory | string | Optional output directory for the spritesheet. Defaults to the first asset directory. |
sheetFilename | string | Filename for the generated spritesheet. Default is spritesheet.png when missing. |
sheetMargin | number | Outer margin around the spritesheet in pixels. Default is 8 when missing. |
sheetSpacing | number | Spacing between spritesheet cells in pixels. Default is 8 when missing. |
spritesheetMode | string | individual = create separate PNGs only, spritesheet = create only a spritesheet PNG. Default is spritesheet when missing. |
read_image_metadata
Reads the embedded JSON metadata from a PNG file generated by this MCP server. Returns the metadata object with dimensions, color, shape, description, etc.
| Parameter | Type | Description |
|---|---|---|
filepath * | string | Absolute path to the PNG file to read metadata from |