MCP Server for PiAPI image generation
Piapi becomes available to MCP clients through the piapi mcp server. MCP Server for PiAPI image generation.
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.
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, whichThe 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.
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.
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.
| Tool | What it does |
|---|---|
| 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 holds the separately owner-approved MCP credential and can vali |
{
"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.
| Variable | Description | Required |
|---|---|---|
| PIAPI_API_KEY | Credential the server authenticates with. | Yes |
| MCP_SYNC_GITHUB_TOKEN | Credential the server authenticates with. | Yes |
Build a programmable telecommunications stack for connecting telephony services with the Internet via a cloud-based utility.
Search built for AI, not humans — semantic web search that returns model-ready content, plus code context.
Answers, not links — delegate questions to Perplexity's search-grounded models and get cited responses back.
Give your assistant a voice — text-to-speech, voice cloning and audio tools from the ElevenLabs API.
Give your assistant a real code sandbox — isolated cloud VMs for actually running the code it writes.
The ML hub in your context window — search models, datasets, papers and run Spaces from the official server.