PiAPI
About
PiAPI MCP server makes user able to generate media content with Midjourney/Flux/Kling/Hunyuan/Udio/Trellis directly from Claude or any other MCP-compatible apps.
Details
- Author
- apinetwork
- Repository
- apinetwork/piapi-mcp-server
- GitHub stars
- 61
- Downloads
- 299
- License
- MIT License
- Categories
- Other, Community, Productivity, Developer Tools, Design, AI, Media, Frontend, Security, Infrastructure, API
Jump to
- 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
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
PiAPICommand (node, npx, python, etc.)nodeArguments-
Argument 1
/absolute/path/to/piapi-mcp-server/dist/index.js
Environment-
PIAPI_API_KEY
your_api_key_here
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
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.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"piapi": {
"env": {
"PIAPI_API_KEY": "your_api_key_here"
},
"args": [
"/absolute/path/to/piapi-mcp-server/dist/index.js"
],
"command": "node"
}
}
}
Linux
{
"env": {
"PIAPI_API_KEY": "your_api_key_here"
},
"args": [
"/absolute/path/to/piapi-mcp-server/dist/index.js"
],
"command": "node"
}
Macos
{
"env": {
"PIAPI_API_KEY": "your_api_key_here"
},
"args": [
"/absolute/path/to/piapi-mcp-server/dist/index.js"
],
"command": "node"
}
Windows
{
"env": {
"PIAPI_API_KEY": "your_api_key_here"
},
"args": [
"/absolute/path/to/piapi-mcp-server/dist/index.js"
],
"command": "node"
}
Keeping tools in sync with PiAPI (sync task)
src/index.tsregisters a contract-backed MCP tool foreverycommitted PiAPI(model, task_type)capability. Tool names are deterministic:piapi_<model>_<task_type>(for example,piapi_qubico_flux1_schnell_txt2img), and their input schemas are generated from the committed catalog. The existing hand-written convenience tools remain available; the contract-backed tools ensure the exposed surface stays complete as the Manager catalog changes.
The legacy convenience tools insrc/index.tsremain hand-written, but the complete contract-backed surface is generated from the committed catalog. This repository includes a repeatabledrift detectorthat compares that catalog baseline with PiAPI Manager's versioned API contract. It detectsnew APIs,deprecated APIs,parameter changes, anddescription changes.
Source of truth:theGo API.postman_collection.jsoncontract in the PiAPI Manager GitHub repository (Gocyber-world/midjourney-http-v2). The task fetches that versioned contract directly from GitHub and extracts thePOST /api/v1/taskexamples into(model, task_type)capabilities. If the Manager repository is private, set the CI secretMCP_SYNC_GITHUB_TOKENwith least-privilegecontents: readon that source repository (and only the separate approved write permissions needed for MCP update automation). It has no Apidog dependency and deliberately doesnotinspect or report pricing.
npm run build # compile the MCP server and sync task npm run test:sync # offline sync-engine tests (no network or credentials) npm run sync # fetch contract and diff baseline; exit 0 = in sync, 2 = drift npm run sync:snapshot # print the normalized current contract catalog npm run sync:report # write the Markdown drift report to sync-report.md npm run sync:accept # after updating src/index.ts, refresh the baseline
By default,npm run syncuses the Manager GitHub contract. For recovery or local development, an exported OpenAPI JSON file can be supplied instead:
node dist/sync/cli.js diff --file ./piapi-openapi.json
When a drift report is produced, a new capability is already represented by its contract-backed MCP tool after the baseline is accepted. Validate the MCP server, runnpm run sync:accept, and commit the refreshed baseline. Update a hand-written convenience tool only when a curated model-specific UX is useful.
.github/workflows/sync-piapi.ymlis 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 validate, accept, and push catalog updates after its sensitive-information gate passes.
piapi-mcp-server/ ├── assets/ ├── src/ │ ├── index.ts # Main server entry point │ └── sync/ # PiAPI -> MCP sync task │ ├── cli.ts # CLI: snapshot / diff / accept / report-file │ ├── fetchers.ts # GitHub Postman contract + local-file sources │ ├── normalize.ts # OpenAPI -> (model, task_type) catalog │ ├── diff.ts # catalog diff + Markdown report │ ├── catalog.ts # baseline load/save │ ├── mcp_tools.ts # catalog -> contract-backed FastMCP tool schemas │ ├── selftest.ts # offline engine test (npm run test:sync) │ ├── types.ts │ └── baseline.piapi-catalog.json # committed baseline ├── .github/workflows/sync-piapi.yml # weekly drift check ├── package.json ├── tsconfig.json └── .env.example
Multimodal MCP server for generating images, audio, and text with no authentication required
FastAPI and MCP service providing Islamic prayer times and other useful calculations.
Read and write access to Airtable databases.
A Model Context Protocol (MCP) server that enables AI assistants to integrate with Prometheus Alertmanager
A comprehensive MCP server for tooling interactions(40+) and resource accessibility(60+) plus many useful prompts to interact with Algorand Blockchain.
An MCP server that provides control over Android devices through ADB. Offers device screenshot capture, UI layout analysis, package management, and ADB command execution capabilities.
AniList MCP server for accessing AniList API data
AnkiConnect MCP server for interacting with Anki via AnkiConnect.
Chat with any other OpenAI SDK Compatible Chat Completions API, like Perplexity, Groq, xAI and more
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




