2D Assets Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited 2D Assets Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
_Design your game's feel before you design its art._
[](https://modelcontextprotocol.io/introduction)
[](https://www.typescriptlang.org/)
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)](https://modelcontextprotocol.io/) 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:
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.
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
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
Gold Coin (32×32)
Gold Coin
Circular coin with radial gradient, dot pattern overlay, and "COIN" label
tile_grass.png tile_water.png
prop_tree.png
Fire animation (4 frames, 192x48)
Fire animation
4-frame spritesheet
#### File System Access
#### Path Traversal
#### Overall Best Practices
fillPercent and trackColor for partially-filled assets.fontSize if needed.read_image_metadata, without loading image pixels, ideal for non-vision AI workflows.player_idle_128x128.png) to help models with no vision know the dimensions when using the asset.This MCP server equips your AI with 3 tools to generate and read 2D asset metadata.
generate_mock_assetGenerates a single PNG asset and writes it to the disk. It supports gradients, patterns, transparency, text rotation, and embedded metadata.
<details> <summary><strong>Parameters (press to expand)</strong></summary>
Required parameters
| Parameter | Type | Description |
|---|---|---|
filename | string | Output filename, e.g. player_idle.png |
directory | string | Absolute path to the output folder (created if missing) |
text | string | Label rendered on the asset |
color | string | Background hex color, e.g. #FF5733 |
Optional parameters: _shape & size_
| Parameter | Type | Default | Description | ||
|---|---|---|---|---|---|
width | number | 128 | Width in pixels | ||
height | number | 128 | Height in pixels | ||
shape | rectangle \ | rounded-rectangle \ | circle | rectangle | Geometric shape |
opacity | number 0–1 | 1.0 | Background opacity | ||
strokeColor | string | #000000 | Border hex color | ||
strokeWidth | number | 4 | Border width in px; 0 removes the border |
Optional parameters: _fill & gradient_
| Parameter | Type | Default | Description | ||
|---|---|---|---|---|---|
fillMode | solid \ | linear-gradient \ | radial-gradient | solid | Background fill type |
secondaryColor | string | auto-derived | Second gradient stop; auto-shaded from color if omitted | ||
gradientAngle | number | 45 | Angle in degrees for linear gradients (ignored for radial) |
Optional parameters: _progress/health bar_
| Parameter | Type | Default | Description |
|---|---|---|---|
fillPercent | number 0–100 | 100 | How much of the asset is filled (left to right) |
trackColor | string | — | Color of the unfilled portion; transparent if omitted |
Optional parameters: _pattern overlay_
| Parameter | Type | Default | Description | |||
|---|---|---|---|---|---|---|
pattern | none \ | stripes \ | dots \ | grid | none | Pattern overlay type |
patternColor | string | auto-derived | Pattern color; contrast-auto if omitted | |||
patternOpacity | number 0–1 | 0.18 | Pattern overlay opacity | |||
patternScale | number ≥2 | 16 | Pattern tile size in pixels |
Optional parameters: _text_
| Parameter | Type | Default | Description | ||
|---|---|---|---|---|---|
textPosition | center \ | top \ | bottom | center | Vertical text alignment |
fontSize | number | auto-scaled | Explicit font size in px; auto-fits if omitted | ||
textRotation | number | 0 | Text rotation angle in degrees | ||
textColor | string | auto-contrasting | Hex color for text; auto-calculated if omitted |
Optional parameters: _metadata_
| Parameter | Type | Default | Description |
|---|---|---|---|
assetDescription | string | — | Human-readable description embedded in the PNG EXIF for non-vision AI context |
</details>
[!NOTE] Output filename format
The server automatically appends the dimensions to the filename before writing:
player_idle.png → player_idle_128x128.pnggenerate_mock_asset_batchGenerates multiple assets in one request. Supports individual PNGs or a single composed spritesheet.
<details> <summary><strong>Parameters (press to expand)</strong></summary>
Required parameters
| Parameter | Type | Description |
|---|---|---|
assets | AssetConfig[] | Array of asset configs (same fields as generate_mock_asset) |
Optional parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
spritesheetMode | individual \ spritesheet | spritesheet | individual writes separate PNGs; spritesheet composes a single PNG |
sheetFilename | string | spritesheet.png | Output filename for the composed spritesheet |
sheetDirectory | string | first asset's directory | Output directory for the spritesheet |
sheetMargin | number | 8 | Outer padding around the spritesheet in pixels |
sheetSpacing | number | 8 | Gap between animation frames in pixels |
</details>
[!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.pngread_image_metadataReads 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.
<details> <summary><strong>Parameters (press to expand)</strong></summary>
Required parameters
| Parameter | Type | Description |
|---|---|---|
filepath | string | Absolute path to the PNG file |
</details>
#### 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.
<details> <summary><strong>Example response (press to expand)</strong></summary>
{
"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"
}</details>
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 atC:\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."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"]
}
}
}1. Clone the repository
git clone https://github.com/crony-io/2d-assets-mcp.git
cd 2d-assets-mcp2. Install dependencies
pnpm install # recommended
# or: npm install
# or: yarn install3. Build the project
pnpm run build
# or: npm run build
# or: yarn run build4. Configure your MCP client
{
"mcpServers": {
"2d-assets-mcp": {
"command": "node",
"args": ["/absolute/path/to/2d-assets-mcp/dist/index.js"]
}
}
}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"
}
}
}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"]
}
}
}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
}
}
}Create .cursor/mcp.json in your project:
{
"mcpServers": {
"2d-assets-mcp": {
"command": "node",
"args": ["/absolute/path/to/2d-assets-mcp/dist/index.js"]
}
}
}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| Command | Description |
|---|---|
npm run build / pnpm run build | Compile TypeScript to dist/ |
npm run dev / pnpm run dev | Run directly from source with tsx (no build needed) |
npm run start / pnpm run start | Run the compiled server from dist/ |
npm run typecheck / pnpm run typecheck | Type-check without emitting files |
npm run check / pnpm run check | Run all checks: format, lint, and typecheck |
src/tools/yourTool.ts and export a registerYourTool(server: McpServer) functionsrc/server.tssrc/schemas.ts and types to src/types.tsMIT — see LICENSE for full text.
Issues and pull requests are always welcome. Just please, before you open a PR make sure to:
pnpm run check or npm run check (zero errors required).src/tools/.src/types.ts and schemas from src/schemas.ts.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.