mcp-mavae

mcp-mavae

0

MAVAE is a server providing an interface for AI agents to generate and manipulate images using the Model Context Protocol. It features image generation and editing tools, collection management, and secure API token handling.

MAVAE - IMAGE TOOLBOX

A powerful creative and editing toolkit designed for AI Agents.

smithery badge TypeScript Node.js MCP Docker

MAVAE is a Model Context Protocol (MCP) server for interacting with image media tools. It provides a standardized interface for AI Agents to generate and manipulate images.

šŸš€ Features

  • Image Generation: Generate images using both raw configurations and predefined collections
  • Image Editing: Compress, crop, and resize images with proportional or fixed dimensions
  • Collection Management: Create, manage, and share configurations for consistent image generation
  • Model & Lora Management: List and utilize available models and Loras
  • API Token Management: Handle authentication for secure interaction with Mavae services

šŸ“‹ Prerequisites

  • Node.js (v16 or higher)
  • MAVAE API Key (set as environment variable, Apply here)

šŸ› ļø Installation

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm start

MCP Json

{
  "mcpServers": {
      "mavae": {
          "command": "node",
          "args": [
              "***/dist/index.js"
          ],
          "env": {
              "MAVAE_API_KEY": MAVAE_API_KEY
          }
      }
  }
}

When using MAVAE MCP locally, this path is an absolute path šŸ‘‰šŸ» "***/dist/index.js"

🐳 Docker Support

# Build Docker image
docker build -t mavae-mcp-server .

# Run Docker container
docker run -e MAVAE_API_KEY=your_api_key mavae-mcp-server

šŸ“ Project Structure

mavae/
ā”œā”€ā”€ src/                  # Source code
│   ā”œā”€ā”€ actions/          # API endpoint implementation handlers
│   │   ā”œā”€ā”€ aigc.ts       # Image generation operations
│   │   ā”œā”€ā”€ collection.ts # Collection management operations
│   │   ā”œā”€ā”€ edit.ts       # Image editing operations
│   │   └── token.ts      # API token operations
│   ā”œā”€ā”€ tools/            # MCP tool definitions
│   │   ā”œā”€ā”€ aigc.ts       # Image generation tool definitions
│   │   ā”œā”€ā”€ collection.ts # Collection management tool definitions
│   │   └── edit.ts       # Image editing tool definitions
│   ā”œā”€ā”€ types/            # TypeScript type definitions
│   │   ā”œā”€ā”€ aigc.ts       # Image generation types
│   │   ā”œā”€ā”€ collection.ts # Collection types
│   │   ā”œā”€ā”€ edit.ts       # Image editing types
│   │   └── response.ts   # API response types
│   ā”œā”€ā”€ utils/            # Utility functions
│   │   └── constants.ts  # Constant values
│   └── index.ts          # Server entry point
ā”œā”€ā”€ dist/                 # Compiled JavaScript files
ā”œā”€ā”€ package.json          # Project dependencies and scripts
└── tsconfig.json         # TypeScript configuration

šŸ›ļø Available Tools

Image Generation

  • image_raw_generate - Generate an image using raw AIGC configuration
  • image_collection_generate - Generate an image using a collection's AIGC configuration
  • image_retry_generate - Retry a failed image generation
  • image_state - Get the details of an owned image
  • generate_task_state - Get the generation state of an image by task id

Collection Management

  • collection_create - Create a new collection
  • collection_delete - Delete a collection
  • collection_toggle_public - Toggle the public status of a collection
  • collection_list - Get the list of owned collections
  • collection_state - Get the details of an owned collection

Image Editing

  • compress_image - Lossless compression of images
  • crop_image - Crop images with local path and URL support
  • resize_image - Resize images with proportional or fixed dimensions

Model & Resources

  • list_images - Get the list of owned images
  • list_loras - Get the list of available loras
  • list_models - Get the list of available models

Authentication

  • token_state - Get the x-api-token state