piapi-mcp-server
@apinetwork
A TypeScript implementation of a Model Context Protocol (MCP) server that integrates with PiAPI's API. PiAPI makes user able to generate media content with Midjourney/Flux/Kling/LumaLabs/Udio/Chrip/Trellis directly from Claude or any other MCP-compatible apps.
Overview
What is piapi-mcp-server?
It is a TypeScript implementation of a Model Context Protocol (MCP) server that integrates with PiAPI’s API, enabling users to generate media content (images, videos, music, 3D models) directly from Claude or any other MCP-compatible app.
How to use piapi-mcp-server?
Install via Smithery (npx -y @smithery/cli install piapi-mcp-server --client claude) or manually clone the repo, run npm install and npm run build. Obtain a PiAPI API key from piapi.ai and configure the server in Claude Desktop or Cursor by adding a piapi entry in the mcpServers configuration with the PIAPI_API_KEY environment variable. After setup, send prompts for media generation.
Key features of piapi-mcp-server
- Base image and video toolkits
- Flux image generation from text/image prompts
- Hunyuan, Skyreels, Wan video generation
- MMAudio music generation from video
- Kling video and effects generation
- Luma Dream Machine video generation
- Suno music generation
- Trellis 3D model generation from image
- TTS zero-shot voice generation
Use cases of piapi-mcp-server
- Generate images using Flux or Midjourney (imagine) directly from chat.
- Create videos with Kling, Luma, Hunyuan, Wan, or Skyreels from text or image prompts.
- Produce music tracks via Suno or MMAudio from video.
- Generate 3D models from images using Trellis.
- Perform zero-shot voice cloning with TTS.
FAQ from piapi-mcp-server
What media types can I generate?
Images (Flux, Midjourney), videos (Kling, Luma, Hunyuan, Wan, Skyreels), music (Suno, MMAudio), 3D models (Trellis), and voice (TTS).
What are the prerequisites?
Node.js 16.x or higher, npm or yarn, and a PiAPI API key from piapi.ai.
How do I install the server?
Via Smithery automatically, or manually by cloning the repo, running npm install and npm run build.
Are there any timeout limitations?
Yes, time-consuming tools like video generation may not complete due to Claude’s timeout limitations.
How do I configure it for Claude Desktop?
Add a “piapi” entry in claude_desktop_config.json with command