Back to MCP directory
publicPublicdnsLocal runtime

face-generator

一个基于MCP协议的人脸生成服务器,可生成多种形状的人脸图像

article

README

🚀 人脸生成 MCP 服务器

本项目是一个基于 Model Context Protocol (MCP) 的服务器,借助 https://thispersondoesnotexist.com 来生成人类脸部图像,为用户提供便捷的人脸图像生成服务。

🚀 快速开始

本项目是一个使用 https://thispersondoesnotexist.com 生成人类脸部图像的 Model Context Protocol (MCP) 服务器。你可以通过以下步骤快速使用该服务器。

✨ 主要特性

  • 🔍 能够生成逼真的人类脸部图像。
  • 🟦 支持多种输出形状,包括正方形、圆形和圆角矩形。
  • 📏 图像尺寸可灵活配置,满足不同需求。
  • 🌫️ 非正方形形状的图像采用透明背景。
  • 📄 支持批量生成多张图像,提高效率。

📦 安装指南

在你的项目中安装人脸生成工具,可使用以下命令:

npm install @dasheck0/face-generator

💻 使用示例

基础用法

作为 MCP 服务器运行

  1. 启动服务器:
npx face-generator
  1. 使用 MCP 客户端调用 generate_face 工具。

工具参数说明

| 参数 | 详情 | |------|------| | outputDir | (必填)保存图像的目录 | | fileName | 可选文件名(默认为时间戳) | | count | 生成的图像数量(默认:1) | | width | 图像宽度(以像素为单位,默认:256) | | height | 图像高度(以像素为单位,默认:256) | | shape | 图像形状(square|circle|rounded,默认:square) | | borderRadius | 圆角矩形的边距半径(默认:32) |

高级用法

以下是一个使用示例,展示如何批量生成特定尺寸和形状的图像:

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

📄 许可证

本项目采用 MIT 许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client