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.
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.
git clone https://github.com/apinetwork/piapi-mcp-server
cd piapi-mcp-server
npm install
.env
file in the project root:PIAPI_API_KEY=your_api_key_here
npm run build
npm start
Add this to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json
on macOS or %APPDATA%\Claude\claude_desktop_config.json
on Windows):
{
"mcpServers": {
"piapi": {
"command": "node",
"args": ["/absolute/path/to/piapi-mcp-server/dist/index.js"],
"env": {
"PIAPI_API_KEY": "your_api_key_here"
}
}
}
}
piapi-mcp-server/
├── src/
│ ├── index.ts # Main server entry point
├── package.json
├── tsconfig.json
└── .env
MIT