piapi-mcp-server
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.
Overview
piapi-mcp-server is a TypeScript implementation of a Model Context Protocol (MCP) server that allows integration with PiAPI's API. This tool enables users to generate various types of media content using different services like Midjourney, Flux, Kling, and more directly from Claude or other MCP-compatible applications.
To use piapi-mcp-server, clone the repository from GitHub, install the dependencies, configure your API key in a .env file, and start the server. You then connect it to your Claude Desktop configuration for seamless integration.
- Generates images from text descriptions using Flux - Supports various media generation including images and videos - Integration with multiple content generation platforms - Workflow planning capabilities within LLMs
- Creating images for projects using text prompts.
- Generating videos and audio content for multimedia presentations.
- Facilitating creative workflow in applications powered by LLMs.
Add to your AI client
Use these steps to connect piapi-mcp-server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"piapi-mcp-server-apinetwork": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-piapi-mcp-server-apinetwork"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"piapi-mcp-server-apinetwork": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-piapi-mcp-server-apinetwork"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"piapi-mcp-server-apinetwork": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-piapi-mcp-server-apinetwork"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"piapi-mcp-server-apinetwork": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-piapi-mcp-server-apinetwork"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"piapi-mcp-server-apinetwork": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-piapi-mcp-server-apinetwork"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"piapi-mcp-server-apinetwork": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-piapi-mcp-server-apinetwork"
]
}
}
}FAQ
Is piapi-mcp-server free to use?
Yes, piapi-mcp-server is open-source and free to use.
What are the prerequisites to run this server?
You need Node.js 16.x or higher, npm or yarn, and a valid PiAPI API key.
Can I integrate it with other applications?
Yes, it is designed to be compatible with any MCP-compatible applications.