Get the FREE Ultimate OpenClaw Setup Guide →

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.

How to use

The piapi server is a robust TypeScript implementation of the Model Context Protocol (MCP) that facilitates seamless integration with PiAPI's API. This server enables you to generate media content using powerful tools like Midjourney, Flux, Kling, LumaLabs, Udio, Chrip, and Trellis directly from Claude or any MCP-compatible applications. By utilizing piapi, you can simplify your media creation workflow and leverage advanced AI capabilities to enhance your projects.

Once you have connected to the piapi server, you can send specific commands to generate media content. You can interact with various tools available through PiAPI by making requests that specify your desired media type, parameters, and any relevant context. Common queries may include generating images, audio, or other forms of media, depending on the tools you wish to utilize. Make sure to familiarize yourself with the API documentation for each integrated tool to optimize your requests.

How to install

Prerequisites

  • You need to have Node.js installed on your machine. Ensure that you have at least version 12.x or later.

Option A: Quick Start with npx

If you want to quickly get started, you can use npx to run the server without a global install:

npx -y piapi-mcp-server

Option B: Global Install Alternative

For a global installation, you can clone the repository and install the necessary dependencies:

git clone https://github.com/apinetwork/piapi-mcp-server.git
cd piapi-mcp-server
npm install
npm start

Additional notes

When configuring the piapi server, ensure that you have the appropriate API keys for the integrated tools set as environment variables. This might include keys for Midjourney, Flux, and others. A common gotcha is forgetting to set these environment variables, which will lead to authentication errors when making requests. Refer to the configuration section in the repository for detailed setup instructions.

Related MCP Servers

Sponsor this space

Reach thousands of developers