Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoHTTP server port for remote Streamable HTTP mode.
MEDIA_API_KEYNoAPI key for the gateway, used in local stdio mode.
MEDIA_API_BASE_URLNoThe base URL of the OpenAI-compatible multimodal gateway (e.g. https://your-gateway.example.com/v1).
MEDIA_MCP_DATA_DIRNoData directory for local project files and the encrypted credential vault (e.g. $HOME/.local/share/media-creation-mcp).
MEDIA_MCP_PUBLIC_URLNoPublic URL of the MCP server, used in remote Streamable HTTP mode.
MEDIA_MCP_STORAGE_KEYNoStorage encryption key (AES-256-GCM) for the credential vault, used in remote Streamable HTTP mode.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

使用用户自己的 API 密钥生成图片或视频。先 list_media_models 查看模型、单价与密钥别名,生成前告诉用户预计费用;用户在聊天里附加的图片:ChatGPT 用 image_file/reference_files 直接传入,其他客户端用 create_upload_link 让用户上传后传 upload: 引用;用户明确要求创作后再提交。多镜头短片:先列分镜与全片预计费用,等用户确认后再逐镜 prepare_story_shot → 生成 → get_task,每镜给用户看过再做下一镜;保存人物基准、brief 和 next_shot_context 逐镜复用。完整流程见 make_short_video 提示。每项创作生成一个唯一 operation_id,重试须原样复用;任务较慢时用 get_task 续查,禁止自动新建请求。费用按现行上游网关价格结算。uncertain 表示可能已提交,须核对控制台,不能自动重提。

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_media_modelsA

只读查询各密钥分组中当前可用的图片、视频模型及参数限制,不产生生成费用。

prepare_story_shotA

不收费、不生成:按 AI 创作网页的规则,把项目设定、人物基准图、起止状态合并成下一镜生成参数。将返回的 next_shot_context 保存到本地项目文件并在后续镜头传回,避免依赖聊天记忆;素材不兼容时明确报错,不丢弃人物图。

generate_imageA

用 Grok Imagine、Midjourney 或分组中其他按张计价的图片模型生成图片,会产生上游模型调用费用,返回 estimated_cost_usd。已适配型号可用 reference_images 编辑或融合图片,先查 list_media_models 的素材上限;部分 GPT Image 已接入多图。立即返回 task_id,用 get_task 取结果。Midjourney 按当前每次 4 张估价,实际扣费以使用记录为准;其他图片模型可选 1–4 张。只有用户明确要求创作时调用。

generate_videoA

用 Grok Imagine、Seedance 或 Kling 生成视频,会产生上游模型调用费用,返回 estimated_cost_usd。image 表示首帧;reference_images 表示不固定首帧的参考图。Grok、已适配 Seedance 与 Kling Omni 支持多参考图,数量和组合限制先查 list_media_models;Seedance 首帧与普通参考图不能混用。视频素材编辑暂未开放,上游编辑端点实测返回 HTTP 404;不要调用 video。长片先 prepare_story_shot,逐镜复用人物和衔接设定。立即返回 task_id,每约 5 秒用 get_task 续查。只有用户明确要求创作时调用。

get_taskA

查询已有 task_id,返回状态和作品的本地路径或限时下载链接。视频完成后查询可能触发现有网关的一次性结算;不创建新生成任务。重复查询不会重复提交。

Prompts

Interactive templates invoked by user choice

NameDescription
make_short_video按分镜 → 估价确认 → 人物基准 → 逐镜生成与检查 → 交付的顺序,用多模态模型制作多镜头短片。只给出流程,不会自动生成或收费。

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 5 tools

Disambiguation4/5

The five tools split cleanly along lifecycle lines: discovery (list_media_models), planning (prepare_story_shot), execution (generate_image/generate_video), and polling (get_task). The only soft spots are generate_image vs generate_video, which share reference_images semantics, estimated_cost_usd, and task_id return behavior, requiring prose warnings (e.g. 'do not call video for editing') to keep them apart.

Naming Consistency5/5

All five names follow a strict verb_noun snake_case pattern (list_, prepare_, generate_, generate_, get_). Verb choice is also semantically consistent: list/get for reads, prepare for non-billable assembly, generate for billable creation, which reinforces the cost-safety contract.

Tool Count5/5

Five tools is well-scoped for a media generation server: one discovery tool, one cost-free planning tool, two generation tools split by modality, and one task poller. No tool looks redundant, and the small surface keeps the 'only call when the user asks to create' rule enforceable.

Completeness4/5

The core loop is closed: find models and limits, assemble shot parameters, submit a billable job, poll for the artifact. Minor gaps remain—there is no tool to list recent tasks, cancel/retry a job, or query usage/billing records, even though the descriptions defer actual charges to '使用记录' that no tool exposes.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues