gemini-media-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GEMINI_API_KEY | No | Your Gemini API key (required for generation with the default provider) | |
| OPENROUTER_API_KEY | No | Your OpenRouter key, only read when the provider is `openrouter` | |
| GEMINI_MEDIA_CONFIG | No | Path to a TOML file that overrides or adds models and prices | |
| GEMINI_MEDIA_PROVIDER | No | Provider to use: `google` or `openrouter` | |
| GEMINI_MEDIA_LOG_LEVEL | No | Log level (logs go to stderr) | WARNING |
| GEMINI_MEDIA_STATE_DIR | No | Cost log and video job list. Defaults to `<output>/.gemini-media` | |
| GEMINI_MEDIA_OUTPUT_DIR | No | Where images, videos and sidecars are written | ~/gemini-media |
| GEMINI_MEDIA_ALLOWED_DIRS | No | Folders input images may be read from, separated by `:` (`;` on Windows). Must contain the output dir. Defaults to the output dir | |
| GEMINI_MEDIA_DAILY_BUDGET | No | Max estimated USD per day (local time) | 2.00 |
| GEMINI_MEDIA_MAX_INPUT_MB | No | Max size per input image | 7 |
| GEMINI_MEDIA_MONTHLY_BUDGET | No | Max estimated USD per calendar month | 20.00 |
| GEMINI_MEDIA_TIMEOUT_SECONDS | No | Timeout per API request | 180 |
| GEMINI_MEDIA_MAX_COST_PER_CALL | No | Max estimated USD per call | 0.50 |
| GEMINI_MEDIA_DEFAULT_IMAGE_MODEL | No | Default for image tools | gemini-nano-banana-2.1 |
| GEMINI_MEDIA_DEFAULT_VIDEO_MODEL | No | Default for video tools | gemini-omni-1.1-flash |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Generate and edit images (Nano Banana models) and videos (Gemini Omni Flash) with the Gemini API. Every paid call is checked against cost limits first. Files are written to the configured output directory with a JSON sidecar describing prompt, model and cost. Videos take minutes: start_video returns a job_id (call it once without confirm_cost to see the price), then poll get_video_status. Input images must be inside the allowed directories.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| generate_imageA | Create an image from a text prompt. Costs money; checked against the budget first. |
| edit_imageB | Edit or combine one or more images according to the prompt. |
| start_videoA | Start a video generation job and return a job_id immediately (no waiting). |
| get_video_statusA | Check a video job; when it is done, download the MP4 to the output directory. |
| list_modelsA | List configured models with estimated prices and supported options. |
| cost_reportA | Show estimated spend today, this month and in total, plus remaining budgets. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool targets a distinct action: image creation, image editing, model listing, video job start, video job polling, and budget reporting. The only mild overlap is that list_models shows prices while cost_report shows spend, but their purposes (catalog vs. accounting) are clearly separated.
Five of six tools follow a clean verb_noun pattern (generate_image, edit_image, list_models, start_video, get_video_status). cost_report is a noun phrase and breaks the pattern slightly, but the set remains highly readable and predictable.
Six tools is well-scoped for a media generation + budget server, with each tool earning its place. The async video flow is correctly split into start/status rather than bloating the surface.
Core lifecycle is covered: model discovery, image create/edit, video start/poll, and cost tracking. Minor gaps exist — no job cancellation, no way to list previously generated assets or inspect a single video job without downloading, and no equivalent edit_video.