# apinetwork/piapi-mcp-server [Health: Active]

**Category:** 🛠️ Other Tools and Integrations  
**Repository:** https://github.com/apinetwork/piapi-mcp-server  
**GitHub Stars:** 75  
**npm Downloads (last month):** 33418  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/apinetwork-piapi-mcp-server

## Description
PiAPI MCP server makes users able to generate media content with Midjourney/Flux/Kling/Hunyuan/Udio/Trellis directly from Claude or any other MCP-compatible apps.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "piapi-mcp-server": {
    "command": "npx",
    "args": ["-y","@smithery/cli"],
    "env": {
      "PIAPI_API_KEY": "",
      "MCP_SYNC_GITHUB_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `PIAPI_API_KEY`, `MCP_SYNC_GITHUB_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What apinetwork/piapi-mcp-server MCP server does

apinetwork/piapi-mcp-server MCP server connects MCP-compatible clients to PiAPI's media-generation API. It provides tools for creating several kinds of content, including images, videos, music, speech, and 3D models. The repository describes support for Flux image generation, Hunyuan, Skyreels, Wan, Kling, and Luma video generation, along with Suno music, MMAudio generation from video, zero-shot text-to-speech, and Trellis 3D model generation from an image.

The project also includes base image and base video toolkits. Midjourney's `imagine` capability is listed as implemented, while other Midjourney functions are not complete. Suno lyrics, Udio music and lyrics, and workflow planning are listed as unfinished.

## How it works

The server is implemented in TypeScript and communicates with PiAPI using the `PIAPI_API_KEY` environment variable. MCP clients invoke the exposed tools, which submit requests to PiAPI for the selected model or task. The repository registers contract-backed tools using deterministic names based on a model and task type, while retaining hand-written convenience tools for selected workflows.

The contract-backed surface is generated from a committed catalog of PiAPI capabilities. A synchronization process compares that catalog with PiAPI Manager's versioned API contract and can report new APIs, deprecated APIs, parameter changes, and description changes. The sync process is separate from normal client use and includes offline tests and commands for creating or accepting a baseline.

## Setup and configuration

To build apinetwork/piapi-mcp-server MCP server locally, use Node.js 16 or newer, clone the repository, install dependencies with npm or yarn, and run the project's build command. The build creates `dist/index.js`, which can then be registered as a local MCP process.

Claude Desktop and Cursor configurations shown by the project start Node with the built `dist/index.js` file and pass `PIAPI_API_KEY` through the server environment. The API key must be obtained from PiAPI. After changing a client configuration, restart or refresh the MCP entry as appropriate.

The repository also documents installation through Smithery for Claude Desktop. MCP Inspector can be used for local testing after setting the API key, with a configurable timeout for longer operations.

## Tools and capabilities

Supported or listed capabilities include:

- Generate images from text or image prompts with Flux.
- Generate videos with Hunyuan, Skyreels, Wan, Kling, and Luma.
- Generate music with Suno or create music from video with MMAudio.
- Generate zero-shot speech and Trellis 3D models from images.
- Use Midjourney's implemented `imagine` operation.
- Access contract-backed tools for committed PiAPI model and task combinations.

## Limitations and notes

apinetwork/piapi-mcp-server MCP server depends on a PiAPI API key and the availability of the corresponding PiAPI capabilities. The README warns that video generation and other time-consuming operations may not finish before Claude's timeout. Several listed functions remain incomplete, including additional Midjourney operations, Suno lyrics, Udio music and lyrics, and workflow planning.

The synchronization commands fetch or compare PiAPI Manager contract data. They are intended for maintaining the server's tool catalog rather than for ordinary MCP client configuration. A private Manager repository may require the separate `MCP_SYNC_GITHUB_TOKEN` secret for synchronization tasks.

_Full upstream README: https://allmcps.com/mcp/apinetwork-piapi-mcp-server/readme_

