mediamcp

v0.3.0
io.github.legolev/mediamcp Checked 4 days ago Published 3 months ago

Generate and edit images and video via OpenRouter or any OpenAI-compatible API.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_image Generate Image

Generate one or more images from a text prompt using a cloud AI model. Every image is saved to disk and its absolute path is returned, along with a small inline preview. Use edit_image instead when starting from an existing image.

ParameterTypeDescription
prompt *stringDetailed description of the desired result. Be specific about subject, style, lighting, composition.
aspect_ratiostringDesired aspect ratio. Support varies by model; treated as a strong hint.
countintegerNumber of variations to generate (1-4, parallel requests, billed per image).
filename_prefixstringShort label used in the saved filename, e.g. 'hero-banner'. Sanitized to letters, digits, dashes.
modelstringModel slug, e.g. 'google/gemini-2.5-flash-image' or 'openai/gpt-5-image'. Omit to use the configured default. Call list_models to see options.
output_dirstringDirectory to save into (absolute, or ~ for home). Defaults to the configured output directory.

edit_image Edit Image

Edit or transform existing image(s) with a text instruction — restyle, add or remove elements, change background, or combine several images into one scene. The result is saved to disk and its absolute path is returned, along with a small inline preview.

ParameterTypeDescription
images *arraySource image(s): absolute file paths, file:// URLs, https:// URLs, or data: URLs. Pass several images for composition or style-transfer edits.
prompt *stringInstruction describing the edit, e.g. 'remove the background', 'make it night time', 'combine these two photos into one scene'.
filename_prefixstringShort label used in the saved filename, e.g. 'hero-banner'. Sanitized to letters, digits, dashes.
modelstringModel slug, e.g. 'google/gemini-2.5-flash-image' or 'openai/gpt-5-image'. Omit to use the configured default. Call list_models to see options.
output_dirstringDirectory to save into (absolute, or ~ for home). Defaults to the configured output directory.

generate_video Generate Video

Generate a video from a text prompt, and optionally from an input image (image-to-video). Async job: starts generation, then waits and polls. Video generation typically takes 1-5 minutes. The finished file is saved to disk and its absolute path is returned. If waiting times out, a polling_url is returned — pass it to check_video_status later instead of starting a new (billed) job. For image-to-video, pass first_frame_image so the clip animates from that exact picture (e.g. a still produced by generate_image). Image inputs require an image-to-video-capable model such as 'bytedance/seedance-2.…

ParameterTypeDescription
prompt *stringDetailed description of the desired result. Be specific about subject, style, lighting, composition.
aspect_ratiostringDesired aspect ratio. Support varies by model; treated as a strong hint.
duration_secondsintegerClip length in seconds (model-dependent).
filename_prefixstringShort label used in the saved filename, e.g. 'hero-banner'. Sanitized to letters, digits, dashes.
first_frame_imagestringImage-to-video: the generated clip starts on this exact image and animates forward. Accepts an absolute file path, file:// URL, https:// URL, or data: URL.
generate_audiobooleanWhether the clip should include generated audio.
last_frame_imagestringOptional ending frame the clip animates toward. Same accepted formats as first_frame_image.
modelstringVideo model slug, e.g. 'google/veo-3.1' or 'openai/sora-2-pro'. For image-to-video use an i2v-capable model like 'bytedance/seedance-2.0' or 'bytedance/seedance-2.0-fast'. Omit to use the configured d…
output_dirstringDirectory to save into (absolute, or ~ for home). Defaults to the configured output directory.
reference_imagesarrayStyle/content reference image(s) that guide the look without being exact frames (reference-to-video). Same accepted formats as first_frame_image.
resolutionstringOutput resolution (model-dependent).
wait_secondsintegerHow long to wait for completion before returning a resumable polling_url.

check_video_status Check Video Status

Check a previously started video generation job (from generate_video's polling_url or video id). If the job has completed, downloads the video, saves it to disk, and returns the absolute path.

ParameterTypeDescription
filename_prefixstringShort label used in the saved filename, e.g. 'hero-banner'. Sanitized to letters, digits, dashes.
output_dirstringDirectory to save into (absolute, or ~ for home). Defaults to the configured output directory.
polling_urlstringThe polling_url returned by generate_video.
video_idstringAlternatively, the raw video job id.

list_models List Media Models

List image- and video-capable model slugs available on the configured endpoint, with pricing where known. Use this to pick a `model` value for generate_image, edit_image, or generate_video.

ParameterTypeDescription
refreshbooleanBypass the 1h cache and re-query the endpoint.

check_config Check mediamcp Configuration

Diagnose the mediamcp server setup: endpoint, API key presence and validity, default models, and output directory writability. Run this first when any other mediamcp tool fails.

ParameterTypeDescription
pingbooleanAlso verify the API key against the endpoint with a live request.