# Modelflare [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/modelflare-ai/modelflare-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 363  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/modelflare

## Description
Local stdio MCP server (MIT, npm @modelflare/mcp-server) for image and video generation with one Modelflare Smart API Key. Install: npx -y @modelflare/mcp-server. Homepage: https://modelflare.dev

## Tools
Capabilities this server exposes over MCP:

- **list_models** — Lists the models this Modelflare API key can call, with the docs page that holds each media model's exact request contract. Defaults to image and video models.
- **generate_image** — Generates an image, or edits one with edit=true, using a Modelflare image model, and saves the result to the output directory. Billed to the Modelflare balance by actual usage.
- **create_video** — Starts an asynchronous Modelflare video task and returns its task ID. Poll with get_video_status and save with download_video. Billed to the Modelflare balance by actual usage.
- **get_video_status** — Returns the status and progress of a Modelflare video task.
- **download_video** — Saves a completed Modelflare video to the output directory. Optionally waits for the task first. Result URLs expire, so download soon after completion.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "modelflare": {
    "command": "npx",
    "args": ["-y","@modelflare/mcp-server"],
    "env": {
      "MODELFLARE_API_KEY": "",
      "MODELFLARE_BASE_URL": "",
      "MODELFLARE_OUTPUT_DIR": "",
      "MODELFLARE_LOCALE": ""
    }
  }
}
```

**Requires environment variables:** `MODELFLARE_API_KEY`, `MODELFLARE_BASE_URL`, `MODELFLARE_OUTPUT_DIR`, `MODELFLARE_LOCALE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Modelflare does

Modelflare provides image and video generation tools over the Model Context Protocol. It uses one Modelflare Smart API Key to route requests to the image and video models available to the associated account. The server runs locally as a stdio process and can be added to MCP clients such as Claude Desktop, Cursor, and Gemini CLI.

The server supports both new image generation and image editing. Video creation is asynchronous: an agent starts a task, checks its progress, and downloads the completed result. Output files are written to a local directory rather than leaving the result at a temporary provider URL.

## How it works

Install and launch the package with `npx -y @modelflare/mcp-server`. The MCP client starts the process and passes configuration through environment variables. `MODELFLARE_API_KEY` must contain a Modelflare Smart API Key.

Model discovery is account-specific. The `list_models` tool returns callable image and video models, along with documentation links describing each model’s request fields. Passing `kind: "text"` lists text models. Image-specific fields belong in `parameters`, while video-specific fields belong in `request`; these values are forwarded unchanged.

Image requests are handled through the Images API for non-Gemini image models. Gemini image models use `generateContent`. Video requests return a task ID first, after which status can be queried and the finished file can be downloaded.

## Setup and configuration

Add the server to an MCP client using a command of `npx`, with `-y` and `@modelflare/mcp-server` as its arguments. Set the following environment variables as needed:

- `MODELFLARE_API_KEY`: Required Smart API Key.
- `MODELFLARE_BASE_URL`: Uses the global endpoint by default; `china` selects the China endpoint, and a custom URL is also accepted.
- `MODELFLARE_OUTPUT_DIR`: Local destination for generated images and videos. The default is `./modelflare-output`.
- `MODELFLARE_LOCALE`: Error-message language, either `en` or `zh`.

Claude Desktop users can instead open the `.mcpb` bundle from the project’s releases. The bundle prompts for the API key, base URL, and output folder. A Smithery-specific bundle includes tool input schemas in its manifest.

## Tools and capabilities

- `list_models` identifies image and video models callable with the configured key and links to their exact request fields. It can also list text models.
- `generate_image` creates an image or edits one when `edit: true` is used, then saves the result.
- `create_video` starts a video-generation task and returns its task ID.
- `get_video_status` reports the status and progress of a video task.
- `download_video` saves a completed video and can wait up to 300 seconds before returning.

Usage is charged to the Modelflare balance according to actual usage. The available model list can change as models become available to the account, without requiring changes to the MCP client configuration.

## Limitations and notes

A regular API key is limited to models in its own group; the Smart API Key is intended for access to all models available to the account. Authentication failures produce a 401 response, unavailable models can produce `model_not_found`, and insufficient balance can produce `insufficient_user_quota`.

Video generation requires separate steps for creation, status checking, and downloading. Generated results are saved promptly because returned URLs expire. The server is distributed under the MIT license.

_Full upstream README: https://allmcps.com/mcp/modelflare/readme_

