Skip to main content
Glama
README.md
# MCP Face Transform Server

<!-- mcp-name: io.github.AceDataCloud/mcp-face-transform -->

A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that
exposes the AceDataCloud Face Transform API — face keypoint detection,
beautification, age/gender transform, face swap, cartoonization, and liveness
detection.

> **Status:** All Face APIs are currently in **Alpha**. Interfaces may evolve.

## Features

- **Keypoint detection** — 90+ landmarks per face, multi-face supported
- **Beautification** — smoothing, whitening, face slimming, eye enlarging
- **Age transform** — age or de-age a portrait
- **Gender transform** — swap perceived facial gender characteristics
- **Face swap** — move a source face onto a target image (with optional async webhook)
- **Cartoonize** — render a portrait in animated / cartoon style
- **Liveness detection** — distinguish live captures from printed / screen photos

## Installation

```bash
pip install mcp-face-transform
```

## Configuration

Set your AceDataCloud API token:

```bash
export ACEDATACLOUD_API_TOKEN=your_token_here
```

Get your token from [https://platform.acedata.cloud](https://platform.acedata.cloud).

## Usage

### stdio mode (default)

```bash
mcp-face-transform
```

### HTTP mode

```bash
mcp-face-transform --transport http --port 8000
```

## Tool Reference

| Tool | Description |
|------|-------------|
| `face_detect_keypoints` | Detect 90+ keypoints per face (multi-face supported). |
| `face_beautify` | Smoothing, whitening, face slimming, and eye enlarging. |
| `face_change_age` | Age or de-age a portrait. |
| `face_change_gender` | Swap perceived facial gender characteristics. |
| `face_swap` | Move a source face onto a target image (with optional async webhook). |
| `face_cartoonize` | Render a portrait in cartoon / animated style. |
| `face_detect_liveness` | Distinguish a live capture from a printed / screen photo. |
| `face_get_usage_guide` | Concise client-side tool usage reference. |

## Example

```text
"Detect all faces in https://example.com/group.jpg and return their keypoints."
→ face_detect_keypoints(image_url="https://example.com/group.jpg")

"Lighten and smooth my portrait."
→ face_beautify(image_url="https://example.com/me.jpg", smoothing=15, whitening=25)

"Replace the face in the scene with the headshot."
→ face_swap(
    source_image_url="https://example.com/headshot.jpg",
    target_image_url="https://example.com/scene.jpg",
  )
```

## Configuration in Claude Desktop / Claude Code

```json
{
  "mcpServers": {
    "face-transform": {
      "command": "uvx",
      "args": ["mcp-face-transform"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_api_token_here"
      }
    }
  }
}
```

Or use the hosted endpoint with bearer auth:

```json
{
  "mcpServers": {
    "face-transform": {
      "url": "https://face.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer your_api_token_here"
      }
    }
  }
}
```

## Development

```bash
pip install -e ".[dev,test]"
pytest --cov=core --cov=tools
ruff check .
```

## Service details

<!-- canonical-documentation -->
[Service details](https://platform.acedata.cloud/services/8efa1d83-9b75-4562-b44a-af95ce563d05)

## License

MIT — see [LICENSE](LICENSE).

TDQS

A3.7/5.0

Scored across 8 tools

Disambiguation5/5

Each tool targets a distinct face transformation or detection task. There is no overlap: age change, cartoonize, keypoint detection, beautification, gender change, swap, liveness detection, and a usage guide all have clearly different purposes.

Naming Consistency5/5

All tool names follow a consistent 'face_' prefix followed by a descriptive verb or verb phrase in snake_case (e.g., face_change_age, face_detect_keypoints). This pattern makes the tool set easy to navigate and select from.

Tool Count5/5

With 8 tools, the server is well-scoped for face-related transformations and detections. Each tool addresses a specific and non-trivial capability, and the count feels appropriate for a focused image processing domain.

Completeness4/5

The tool set covers the most common face manipulation requests (aging, cartoonizing, beautifying, gender swap, swapping) and detection needs (keypoints, liveness). The included usage guide is a nice touch. A minor gap could be the absence of a general face_generate tool, but the core workflow is well-covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues