Skip to main content
Glama
README.md
# particle-text-mcp

**Particle text-morph videos, as an MCP tool.** Glowing particles fountain
upward, converge to form your text line by line, burst apart between lines,
and finally disperse into a rotating galaxy swirl — the style of the
code-generated particle videos popular on Douyin/TikTok, rendered with pure
Python (numpy + Pillow + ffmpeg). No After Effects, no templates.

https://github.com/jujus-minglike/particle-text-mcp

## Demo

| Palette | Look |
| --- | --- |
| `gold` | warm gold particles, white-gold highlights, cyan accents |
| `nebula` | purple / lavender star-cloud with pink accents |
| `rose` | pink / rose with gold accents — birthdays & celebrations |

Output: silent vertical MP4, 720x1280 @ 30 fps, ~8-18 s depending on the
number of text lines. Add music in your publishing app.

## Install

```bash
pip install particle-text-mcp   # or from source: pip install .
```

System requirements: Python 3.10+, `ffmpeg` on PATH, and a CJK-capable font
(Noto Sans CJK Bold is auto-detected; on Debian/Ubuntu:
`apt install fonts-noto-cjk`).

## Use as an MCP server

Add to your MCP client config:

```json
{
  "mcpServers": {
    "particle-text": {
      "command": "particle-text-mcp",
      "env": { "PARTICLE_OUT_DIR": "/path/to/output" }
    }
  }
}
```

Tools:

- **`make_particle_text_video`** — `texts` (1-4 short lines), `palette`
  (`gold` | `nebula` | `rose`), `filename`. Returns the output path,
  duration and size as JSON.
- **`list_palettes`** — describes the available palettes.

## Use as a CLI / Skill

```bash
particle-text "生日快乐" "心想事成" --palette rose -o birthday.mp4
particle-text "Grand Opening" --palette nebula -o opening.mp4
```

A `SKILL.md` is included at the repo root, so agent skill catalogs can index
this repo directly and agents can learn the workflow from it.

## How it works

Each frame, ~4,200 particles are simulated with simple spring physics toward
target points sampled from the rendered text mask, splatted into an RGB
buffer with `numpy`, glow-composited, and encoded with ffmpeg. A full video
renders in ~40-60 s on a modest CPU.

## License

MIT

TDQS

A4.1/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one lists available colour palettes, and the other generates a particle-text video. There is no overlap in action or resource, so an agent can easily choose the correct tool.

Naming Consistency5/5

Both names follow a consistent snake_case verb_noun pattern: list_palettes and make_particle_text_video. The convention is predictable and readable.

Tool Count3/5

Only two tools are exposed, which is thin even for this narrow video-generation domain. Each tool does earn its place, but the surface feels minimal rather than well-scoped.

Completeness4/5

The core workflow is covered: agents can discover palettes and create the video, receiving the output path and metadata. Minor gaps exist around listing or managing previously generated videos, but these are not fatal for the stated short-form video use case.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues