Atlas / MCP servers / apinetwork / PiAPI

PiAPISAFE

mcp/apinetwork/piapi

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.

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
23 21r · 1w · 1d
Transport
—
License
MIT
Stars
75
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://piapi.ai) [](https://piapi.ai/docs) [](https://discord.gg/qRRvcGa7Wb)

[](https://smithery.ai/server/piapi-mcp-server)

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.

Features (more coming soon)

Note: Time-consuming tools like video generation may not complete due to Claude's timeout limitations

  • [x] Base Image toolkit
  • [x] Base Video toolkit
  • [x] Flux Image generation from text/image prompt
  • [x] Hunyuan Video generation from text/image prompt
  • [x] Skyreels Video generation from image prompt
  • [x] Wan Video generation from text/image prompt
  • [x] MMAudio Music generation from video
  • [x] TTS Zero-Shot voice generation
  • [ ] Midjourney Image generation
  • [x] imagine
  • [ ] other
  • [x] Kling Video and Effects generation
  • [x] Luma Dream Machine video generation
  • [x] Suno Music generation
  • [ ] Suno Lyrics generation
  • [ ] Udio Music and Lyrics generation
  • [x] Trellis 3D model generation from image
  • [ ] Workflow planning inside LLMs

Working with Claude Desktop Example

Prerequisites

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

Installation

Installing via Smithery

Read from source at commit 1b74857ee812OBSERVED · 2026-10-07
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add piapi-mcp-server --env PIAPI_API_KEY=${PIAPI_API_KEY} --env PIAPI_CONTRACT_GITHUB_TOKEN=${PIAPI_CONTRACT_GITHUB_TOKEN} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "piapi-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "PIAPI_API_KEY": "${PIAPI_API_KEY}",
        "PIAPI_CONTRACT_GITHUB_TOKEN": "${PIAPI_CONTRACT_GITHUB_TOKEN}"
      }
    }
  }
}
03

Exposed tools (23)

21 read · 1 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
derive_imagereadDerive a image using Qubico Flux, variation
generate_3d_modelreadGenerate a 3d model using Qubico Trellis
generate_imagereadGenerate a image using Qubico Flux
generate_image_controlnetreadGenerate a image using Qubico Flux with ControlNet
generate_music_for_videoreadGenerate a music for a video using Qubico MMAudio
generate_music_sunoreadGenerate music using Suno
generate_video_effect_klingreadGenerate a video effect using Kling
generate_video_hailuoreadGenerate a video using Hailuo
generate_video_hunyuanreadGenerate a video using Qubico Hunyuan
generate_video_klingreadGenerate a video using Kling
generate_video_lumareadGenerate a video using Luma
generate_video_skyreelsreadGenerate a video using Qubico Skyreels
generate_video_wanreadGenerate a video using Qubico Wan
image_faceswapreadFaceswap an image
image_rmbgdestructiveRemove the background of an image
image_segmentreadSegment an image
image_upscalereadUpscale an image to a higher resolution
midjourney_imaginereadGenerate a image using Midjourney Imagine
modify_imagewriteModify a image using Qubico Flux, inpaint or outpaint
show_imagereadShow an image with pixels less than 768*1024 due to Claude limitation
tts_zero_shotreadZero-shot TTS using Qubico f5-tts
video_faceswapreadFaceswap a video
video_upscalereadUpscale video resolution to 2x
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (2 observation(s))
Network
declared (5 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (3)

MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
image_rmbg
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/sync/catalog.ts:20
resolve(__dirname, "../../src/sync/baseline.piapi-catalog.json"),
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
dotenv, fastmcp, zod, @types/node, typescript
Why it matters. 5 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha 1b74857ee812full audit observations/trust-audit/mcp-server/apinetwork__piapi.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-071b74857ee812SAFEB89first audit
06

Questions

What is the PiAPI MCP server?

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.

What tools does PiAPI expose?

23 in total: 21 read-only, 1 that write, and 1 that can delete or overwrite (image_rmbg). Every one is listed on this page with its risk.

Is PiAPI safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does PiAPI need?

It reads PIAPI_API_KEY and PIAPI_CONTRACT_GITHUB_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How current is this page?

The grade is for one exact copy of the source (1b74857ee812), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement