LABSCO SUMMARY
Many generative models, one key.
The appeal is breadth without integration work: image, video, music and 3D across a dozen named models, all behind a single PiAPI key. The contract-backed tools are the interesting engineering — a tool exists for every committed model-and-task pairing, and a drift detector keeps that surface aligned with PiAPI's catalog as it changes. The practical caveat is timeouts: video and other heavy jobs can outrun a client's default limit, so budget for that when wiring it up.
What it is
A TypeScript MCP server that fronts PiAPI's media-generation API, so an assistant can create images, video, music and 3D models directly. It ships hand-written convenience tools plus a contract-backed tool for every committed PiAPI model-and-task pairing, kept in sync with PiAPI's versioned catalog by a drift detector.
What you get
- Image generation from text or image prompts with Flux, and Midjourney imagine
- Video generation from text or image prompts — Hunyuan, Skyreels, Wan, Kling and Luma Dream Machine
- Music generation with Suno, and MMAudio music from video, plus zero-shot TTS voice generation
- 3D model generation from an image with Trellis
- A contract-backed tool per committed PiAPI capability, named
piapi_<model>_<task_type>, generated from the committed catalog - A drift detector that diffs the catalog against PiAPI Manager's versioned contract to flag new, deprecated or changed APIs
Requirements
A PiAPI API key in PIAPI_API_KEY, from the PiAPI workspace. Node.js 16.x or higher. Clone, then npm install and npm run build, which produces dist/index.js for the client to launch with node. The package.json names it piapi-mcp-server at 1.0.0. The README warns that time-consuming jobs like video generation may not finish within a client's timeout — the MCP Inspector, for instance, defaults to 10 seconds, which it suggests raising for generation tasks.
Setup effort
Build from source
USE CASES
01
Generating an image from a description
Send a text or image prompt to Flux or Midjourney imagine and get a picture back in the conversation.
02
Making a short video
Drive one of the video models — Hunyuan, Kling, Luma and others — from a text or image prompt, allowing for the longer run time.
03
Producing music or a voice clip
Generate a track with Suno, score a video with MMAudio, or synthesise speech with zero-shot TTS.
04
Turning an image into a 3D model
Pass an image to Trellis for 3D model generation.
BEFORE YOU INSTALL
What to know first
Requires
- Node.js 16 or later
- PIAPI_API_KEY in your environment
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
MCP Clients
Claude Desktop, Cursor
JSON
{
"mcpServers": {
"piapi": {
"command": "node",
"args": [
"<YOUR_PATH_TO_PIAPI_MCP_SERVER>/dist/index.js"
],
"env": {
"PIAPI_API_KEY": "<YOUR_PIAPI_API_KEY>"
}
}
}
}