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 To install PiAPI MCP Server for Claude Desktop automatically via Smithery: Manual Installation 1. Clone the repository: 2. Install dependencies: 3. Build the project: After building, a dist/index.js file will be generated. You can then configure this file with Claude Desktop and other applications. For detailed configuration instructions, please refer to the Usage section. 4. (Optional) Test server with MCP Inspector: First, create a .env file in the project root directory with your API key: Then run the following command to start the MCP Inspector: After running the command, MCP Inspector will be available at http://localhost:5173 (default port: 5173). Open this URL in your browser to start testing. The default timeout for inspector operations is 10000ms (10 seconds), which may not be sufficient for image generation tasks. It's recommended to increase the timeout when testing image generation or other time-consuming operations. You can adjust the timeout by adding a timeout parameter to the URL, for example: http://localhost:5173?timeout=60000 (sets timeout to 60 seconds) The MCP Inspector is a powerful development tool that helps you test and debug your MCP server implementation. Key features include: - **Interactive Testing**: Test your server's functions directly through a web interface - **Real-time Feedback**: See immediate results of your function calls and any errors that occur - **Request/Response Inspection**: View detailed information about requests and responses - **Function Documentation**: Browse available functions and their parameters - **Custom Parameters**: Set custom timeout values and other configuration options - **History Tracking**: Keep track of your previous function calls and their results For detailed information about using the MCP Inspector and its features, visit the official MCP documentation. Usage Connecting to Claude Desktop 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): After updating your configuration file, you need to restart Claude for Desktop. Upon restarting, you should see a hammer icon in the bottom right corner of the input box.