face generator

Local 2025-08-31 23:18:35 0
Image And Video Processing @dasheck0/face-generator

Generates realistic human face images that don't represent real people, offering various output shapes, configurable dimensions, and batch generation capabilities.


A Model Context Protocol (MCP) server for generating human face images using https://thispersondoesnotexist.com.

Face Generator Server MCP server

Features

  • Generate human face images
  • Multiple output shapes: square, circle, rounded rectangle
  • Configurable image dimensions
  • Transparent backgrounds for non-square shapes
  • Batch generation of multiple images

Installation

npm install @dasheck0/face-generator

Usage

As an MCP Server

  1. Start the server:

    npx face-generator

  2. Use the generate_face tool through an MCP client.

Tool Parameters

  • outputDir: (required) Directory to save the images
  • fileName: Optional file name (defaults to timestamp)
  • count: Number of images to generate (default: 1)
  • width: Image width in pixels (default: 256)
  • height: Image height in pixels (default: 256)
  • shape: Image shape (square|circle|rounded, default: square)
  • borderRadius: Border radius for rounded shape (default: 32)

Example

{
  "outputDir": "./output",
  "count": 3,
  "width": 512,
  "height": 512,
  "shape": "circle"
}

License

MIT

[
  {
    "description": "Generate and save a human face image",
    "inputSchema": {
      "properties": {
        "borderRadius": {
          "default": 32,
          "description": "Border radius for rounded shape (default: 32)",
          "maximum": 512,
          "minimum": 0,
          "type": "number"
        },
        "count": {
          "default": 1,
          "description": "Number of images to generate (default: 1)",
          "maximum": 10,
          "minimum": 1,
          "type": "number"
        },
        "fileName": {
          "default": "1741519488156.png",
          "description": "Optional file name (defaults to timestamp)",
          "type": "string"
        },
        "height": {
          "default": 256,
          "description": "Height of the image in pixels (default: 256)",
          "maximum": 1024,
          "minimum": 64,
          "type": "number"
        },
        "outputDir": {
          "description": "Directory to save the image",
          "type": "string"
        },
        "shape": {
          "default": "square",
          "description": "Image shape (square|circle|rounded, default: square)",
          "enum": [
            "square",
            "circle",
            "rounded"
          ],
          "type": "string"
        },
        "width": {
          "default": 256,
          "description": "Width of the image in pixels (default: 256)",
          "maximum": 1024,
          "minimum": 64,
          "type": "number"
        }
      },
      "required": [
        "outputDir"
      ],
      "type": "object"
    },
    "name": "generate_face"
  }
]