npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-avatar-builder

v0.3.0

Published

MCP server that generates composable avatars via SVG layer composition

Readme

MCP Avatar Builder

An MCP server that generates composable avatars via SVG layer composition. Plug it into Claude Code (or any MCP client) to create avatars on the fly.

Install as Agent Skill

npx skills add Desperado/mcp-avatar-builder

This registers the avatar-builder skill so your AI agent knows when and how to generate avatars. Browse it on skills.sh.

Quick Start

npm install
npm run build

Add to Claude Code

Add to your MCP settings (~/.claude/settings.json or project .mcp.json):

{
  "mcpServers": {
    "avatar-builder": {
      "command": "npx",
      "args": ["-y", "mcp-avatar-builder"]
    }
  }
}

Or point to a local build:

{
  "mcpServers": {
    "avatar-builder": {
      "command": "node",
      "args": ["/path/to/mcp-avatar-builder/build/index.js"]
    }
  }
}

Other MCP Clients

Any MCP-compatible client (Cursor, Cline, GitHub Copilot, etc.) can use this server. Configure the command as shown above in your client's MCP settings.

Tools

generate_avatar

Generate a composable avatar with customizable parts and colors.

| Parameter | Type | Default | Description | | --------- | ------ | --------- | ------------------------------------ | | style | string | "chibi" | Style: chibi, cyberpunk, horror, retro | | options | object | random | Part selections per category | | colors | object | palette | Color overrides (hex or palette name)| | seed | string | — | Seed for deterministic generation | | format | string | "svg" | Output: svg or png | | size | number | 200 | PNG size in pixels (16–2048) |

Example:

{
  "style": "cyberpunk",
  "options": {
    "background": "rain_city",
    "head": "angular",
    "eyes": "led",
    "mouth": "smirk",
    "hair_back": "mohawk",
    "hair_front": "mohawk",
    "face_mods": "led_tattoo",
    "clothing": "techwear",
    "effects": "glitch"
  },
  "colors": {
    "neon": "hot-pink",
    "hair": "electric-blue",
    "eyes": "cyan"
  },
  "seed": "my-avatar",
  "format": "png",
  "size": 800
}

list_styles

List all available avatar styles with their categories and palettes.

list_parts

List available parts/variants for a style, optionally filtered by category.

{ "style": "cyberpunk", "category": "eyes" }

Available Styles

Chibi (200x200)

Simple, cute pixel-art style.

Categories: head, eyes, eyebrows, mouth, hair_back, hair_front, clothing, accessories

Palettes:

  • Skin: porcelain, ivory, sand, honey, chestnut, espresso
  • Hair: black, dark-brown, brown, auburn, ginger, blonde, platinum, pink
  • Eyes: brown, hazel, green, blue, gray, violet

Cyberpunk (400x400)

High-detail style with neon glow effects, dark backgrounds, and cybernetic parts. Uses SVG filters (glow, scanlines, noise) and gradient fills for a rich look.

Categories: background, head, eyes, eyebrows, mouth, hair_back, hair_front, face_mods, clothing, accessories, effects

Palettes:

  • Skin: pale-tech, porcelain, tan, bronze, dark, deep
  • Hair: jet-black, chrome, neon-pink, electric-blue, toxic-green, white, purple, red
  • Eyes: amber-led, cyan, red, white, green-circuit, chrome
  • Neon: hot-pink, cyan, yellow, purple, green, orange
  • Accent: chrome, gunmetal, matte-black, brushed-steel

Parts:

| Category | Variants | | ------------- | -------------------------------------------- | | background | circuit_grid, rain_city, dark_void | | head | angular, scarred, implanted | | eyes | led, visor, cyber | | eyebrows | sharp, none | | mouth | neutral, respirator, smirk | | hair | mohawk, undercut, wired, shaved | | face_mods | neural_port, led_tattoo, jaw_plate | | clothing | techwear, tactical_vest, collar_rig | | accessories | none, headset, holo_visor | | effects | none, scanlines, glitch |

Horror (400x400)

Dark survival-horror style with sickly skin tones, wound effects, and atmospheric backgrounds. Inspired by Resident Evil, Silent Hill, and The Last of Us.

Categories: background, head, eyes, eyebrows, mouth, hair_back, hair_front, face_mods, clothing, accessories, effects

Palettes:

  • Skin: pallid, gray-green, jaundiced, ashen, bruised, corpse
  • Hair: matted-black, dirty-brown, gray, blood-red, white, rust
  • Eyes: amber, bloodshot-blue, milky, green-sick, red, dead-gray
  • Blood: crimson, dark-red, black-blood, dried-brown, arterial, infected-green
  • Atmosphere: steel, rust, concrete, moss

Parts:

| Category | Variants | | ------------- | -------------------------------------------- | | background | lab_corridor, hive, dark_forest | | head | gaunt, scarred, infected | | eyes | bloodshot, mutant, hollow | | eyebrows | thin, furrowed, none | | mouth | grimace, gas_mask, stitched | | hair | military, messy, slicked | | face_mods | bite_wound, stitches, infection | | clothing | tactical_vest, lab_coat, jumpsuit | | accessories | none, dog_tags, herb_vial | | effects | none, fog, blood_splatter |

Retro (400x400)

Warm 1980s nostalgia style inspired by Stranger Things, The Goonies, and Stand By Me. Sunset backgrounds, feathered hair, denim jackets, and VHS effects.

Categories: background, head, eyes, eyebrows, mouth, hair_back, hair_front, face_mods, clothing, accessories, effects

Palettes:

  • Skin: porcelain, fair, warm, tan, brown, deep
  • Hair: black, dark-brown, brown, auburn, ginger, blonde, platinum, strawberry
  • Eyes: brown, hazel, green, blue, gray, amber
  • Retro: sunset-orange, neon-pink, electric-blue, arcade-yellow, synth-purple, miami-teal
  • Accent: denim, leather, chrome, matte-black

Parts:

| Category | Variants | | ------------- | -------------------------------------------- | | background | sunset, arcade, suburban | | head | round, square_jaw, soft | | eyes | wide, determined, cool | | eyebrows | thick, thin, arched | | mouth | grin, bubblegum, neutral | | hair | feathered, mullet, shaved, ponytail | | face_mods | nosebleed, freckles, band_aid | | clothing | denim_jacket, hawkins_tee, leather_jacket | | accessories | none, headband, shades | | effects | none, vhs_lines, warm_glow |

Examples

The examples/ directory has runnable scripts showing how to use the avatar builder programmatically (no MCP server needed):

npm run build                              # build first

node examples/basic-generation.mjs         # one avatar per style → SVG files
node examples/custom-cyberpunk.mjs         # fully customized cyberpunk avatar
node examples/team-avatars.mjs             # deterministic seed-based team avatars
node examples/png-export.mjs               # export as PNG at multiple sizes
node examples/list-all-parts.mjs           # print all styles, parts, and palettes
node examples/list-all-parts.mjs retro     # filter to a single style

Output goes to examples/output/. See the source for the programmatic API (compose, getStyle, listStyles, rasterize).

Architecture

Avatars are composed from SVG fragment layers stacked in z-order. Each style defines its own categories (head, eyes, hair, etc.), color palettes, and part variants. The composer assembles fragments into a complete SVG, and an optional rasterizer converts to PNG via resvg.

Style → Part Renderers → Composer (SVG) → Rasterizer (PNG)

Adding a New Style

  1. Create src/styles/<name>/ with index.ts, palettes.ts, and parts/ directory
  2. Implement the AvatarStyle interface (see src/styles/style.ts)
  3. Register in src/styles/index.ts

License

MIT