Piapi MCP Server

MCP Server for PiAPI image generation

Local serverstdioTypeScript

What is the Piapi MCP server?

Piapi becomes available to MCP clients through the piapi mcp server. MCP Server for PiAPI image generation.

What Piapi does

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.

Key capabilities

  • Base Image toolkit
  • Base Video toolkit
  • Flux Image generation from text/image prompt
  • Hunyuan Video generation from text/image prompt
  • Skyreels Video generation from image prompt
  • Wan Video generation from text/image prompt
  • MMAudio Music generation from video
  • TTS Zero-Shot voice generation

Tools it exposes

Once connected, the assistant can call these 2 tools directly:

  • Commands — By default, npm run sync uses the Manager GitHub contract. For recovery or local development, an exported OpenAPI JSON file can be supplied instead:
  • Automation — .github/workflows/sync-piapi.yml is retained for manual dispatch only. Periodic synchronization is run from the approved local automation environment, which

Installing the piapi mcp server

The server is distributed via npm as @smithery/cli, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 2 environment variables: PIAPI_API_KEY, MCP_SYNC_GITHUB_TOKEN. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

  • Node.js 16.x or higher - npm or yarn - A PiAPI API key (get one at piapi.ai)

Where it fits

AI-service servers chain other models into your assistant, turning a single chat into a small production pipeline. Piapi sits in that group, and the shape of its toolset — Commands, Automation — tells you what it is really for. Worth comparing against the other ai services servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by apinetwork, written in TypeScript.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the piapi mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
CommandsBy default, npm run sync uses the Manager GitHub contract. For recovery or local development, an exported OpenAPI JSON file can be supplied instead:
Automation.github/workflows/sync-piapi.yml is retained for manual dispatch only. Periodic synchronization is run from the approved local automation environment, which holds the separately owner-approved MCP credential and can vali

How to install the Piapi MCP server

{
  "mcpServers": {
    "piapi": {
      "command": "node",
      "args": ["/absolute/path/to/piapi-mcp-server/dist/index.js"],
      "env": {
        "PIAPI_API_KEY": "your_api_key_here"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 16.x or higher - npm or yarn - A PiAPI API key (get one at piapi.ai)
VariableDescriptionRequired
PIAPI_API_KEYCredential the server authenticates with.Yes
MCP_SYNC_GITHUB_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Piapi to Commands.
  • Use Piapi to Automation.

Frequently asked questions

It connects Piapi to MCP-compatible AI assistants such as Claude and Cursor, exposing 2 tools (Commands, Automation) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Piapi directly.