Skip to main content

multimodal-mcp

PyPI version PyPI downloads Python version License CI

One MCP server for media generation and media understanding across OpenAI, Gemini, MiniMax, Volcengine Ark, DeepSeek, self-hosted vLLM and vLLM-Omni deployments, multi-provider gateways and more. It covers reference-guided and masked image generation and editing (image), text, frame and multimodal-reference video generation (video), speech synthesis, zero-shot voice cloning, voice design and timed speech (tts), timed and speaker-labeled speech recognition (asr), text and layout recognition in documents and images (ocr), background multimodal sub-agents (omni) and structured decisions (decision).

  • Capability-gated tools and model selection: Declare providers, models and capabilities in TOML; the server registers only tools backed by a configured model, scopes each tool's model enum to capable models, and validates call-specific requirements (references, masks, first and last frames, reference video and audio, voice samples, timestamps, speakers, hotwords) before sending a request.
  • Model-specific prompt and API guides: get_model_guide pairs endpoint and model parameter rules with per-family official vendor prompt guides fetched from upstream on demand and indexed to the exact sections for the task; with the companion multimodal skill, agents check guides before drafting prompts, inspect generated images, video frames, transcripts and OCR pages afterward, and make at most one targeted repair call.
  • Background omni sub-agents: Built on Pydantic AI, omni agents give text-only coding harnesses asynchronous background inspection of images, audio and video with native image and audio inputs, ffmpeg/ffprobe, and transcription tools.

Installation

The server requires Python 3.12 or later and runs over stdio:

uvx multimodal-mcp

or install it with pip install multimodal-mcp and run multimodal-mcp. For the development version, run uvx --from git+https://github.com/Vigilans/multimodal-mcp multimodal-mcp.

Register it with your MCP client as a stdio server named multimodal, for example:

{
  "mcpServers": {
    "multimodal": {
      "command": "uvx",
      "args": ["multimodal-mcp", "--config", "/home/me/.agents/mcp/multimodal/config.toml"]
    }
  }
}

Install the companion multimodal skill (-g installs it globally):

npx skills add Vigilans/multimodal-mcp -s multimodal

Claude Code, Codex, OpenCode and Pi can install the server and the skill together as the multimodal plugin from this repository:

claude plugin marketplace add Vigilans/multimodal-mcp
claude plugin install multimodal@multimodal-mcp

codex plugin marketplace add Vigilans/multimodal-mcp
codex plugin add multimodal@multimodal-mcp

opencode plugin add multimodal@git+https://github.com/Vigilans/multimodal-mcp.git   # OpenCode 2.x
opencode plugin -g multimodal@git+https://github.com/Vigilans/multimodal-mcp.git    # OpenCode 1.x

pi install git:github.com/Vigilans/multimodal-mcp

Each plugin runs the server with uvx from the installed plugin's own copy, and finds the config as described under Configuration; Codex passes MULTIMODAL_MCP_CONFIG through to the server, and OpenCode and Pi pass their whole environment.

Without the skill installed, the server's built-in MCP instructions still direct clients to call list_models and get_model_guide before writing prompts.

On Windows, omni agents run their commands in Git Bash, so they require Git for Windows with git on PATH.

Configuration

The config file is read from --config <path>, then MULTIMODAL_MCP_CONFIG, then ~/.agents/mcp/multimodal/config.toml.

[providers.openai]
endpoint = "openai"           # default for models without endpoint
env_key = "OPENAI_API_KEY"    # or: api_key = "..."; base_url omitted: the official API

[providers.gateway]           # a gateway serving several endpoints
env_key = "GATEWAY_API_KEY"

[providers.gateway.endpoints] # each endpoint's base_url; models name their endpoint
openai = "https://gateway.example.com/openai/v1"
ark = "https://gateway.example.com/ark/api/v3"
minimax = "https://gateway.example.com/minimax"

[providers.gemini]
endpoint = "gemini"
env_key = "GEMINI_API_KEY"

[[models.image]]              # models.<image|video|tts|asr|ocr|omni|decision>
provider = "openai"
model = "gpt-image-2.6-flare"
description = "Fast image generation and editing"
capabilities = ["generate", "edit", "reference", "mask"]

[[models.image]]              # capabilities from the API notes
provider = "gateway"
endpoint = "ark"
model = "doubao-seedream-5.0-pro"
description = "High-resolution generation from text and reference images"

[[models.video]]              # an open-weight model the gateway serves with vLLM-Omni
provider = "gateway"
endpoint = "openai"
model = "MiniMaxAI/MiniMax-H3"
description = "Video with synchronized audio; text, first/last frame, or reference driven"

[[models.tts]]
provider = "gateway"
endpoint = "ark"
model = "doubao-seed-tts-2.0"

[[models.asr]]
provider = "gateway"
endpoint = "minimax"
model = "asr-1.0"

[[models.omni]]               # omni models use the endpoint's chat completions
provider = "gemini"
model = "gemini-3.8-flash"

[defaults]                    # optional, per category
image = "gpt-image-2.6-flare"

A model without capabilities takes the list from api-notes.toml for its endpoint and model ID, and the config fails to load when the API notes have none; the server treats unlisted capabilities as unsupported. A model without description likewise takes any default description in api-notes.toml for its model ID (used to distinguish variants within a family), while an explicit description always wins. Capabilities in the config must match what the endpoint implements for that model, since the server sends every call the listed capabilities allow. Tools, list_models and defaults name a model by its model value, or by <provider>/<model> when several entries in the same category share that value, such as gateway/gpt-image-2.6-flare beside openai/gpt-image-2.6-flare.

Capabilities

Category Capability Meaning
image generate, edit Create an image from a prompt; modify given images
reference Generate a new image following a reference's subject or style
mask Edit only a masked region
video text Text-only generation
frames First frame, or first and last frames
reference Reference images, videos or audio
tts voice Speak with a preset or registered voice ID
reference Imitate a voice sample sent with the request
timestamps Return segment and word timing of the generated speech
design Create a reusable voice ID from a description
asr text Plain transcription
segment, word Timestamp granularity
speaker Speaker labels
hotwords A dedicated hotword field: vLLM hotwords, Gemini custom_vocabulary
ocr text The text of each page
layout Labeled text blocks with their positions
omni image, audio The media the model reads
decision image, audio, video, pdf Media and PDF files the model reads

Model guides and prompt workflow

Multimodal models differ across vendors in accepted parameters, reference-media labels and prompt structure. get_model_guide fetches each family's official vendor prompting guides from upstream on first use into ~/.cache/multimodal-mcp/references/<family>/ so guidance stays complete and current, uses prompt-guides.toml to point the agent at only the task-relevant sections without flooding context with full manuals, and includes endpoint parameter rules from api-notes.toml. Cached files are reused across lang (en or zh); update=true re-downloads them in lang and keeps the existing copy if a download fails.

The companion multimodal skill turns this into a five-step loop (Prepare -> Write -> Run -> Check and fix -> Deliver): settle the model and read the named sections, write a model-specific prompt while keeping settings in tool parameters, run the call, inspect the output (images, sampled video frames, transcripts or truncated OCR pages) with at most one targeted retry, and deliver the result.

Tools and results

Tool Registered when
list_models(category?, capability?) always
get_model_guide(model, lang, category?, update?, api_notes?, prompt_guide?) always
generate_image an image model has generate
edit_image an image model has edit
generate_video, get_video_job a video model exists; both list every video model
generate_speech a tts model has voice or reference
voice_design a tts model has design
transcribe_audio an asr model has text
transcribe_audio_with_timestamps an asr model has segment or word
recognize_text an ocr model has text
recognize_text_with_layout an ocr model has layout
start_omni_agent, continue_omni_agent, get_omni_agent, wait_omni_agents, stop_omni_agent an omni model exists
decide, decide_batch a decision model exists

Model selection and options

Each tool's model parameter is an enum of the models that can perform it. Call arguments add capability requirements:

Category Call argument Required capability
image references reference
mask mask
video neither frames nor references text
first_frame, last_frame frames
reference_images, reference_videos, reference_audios reference
tts voice voice
reference_audio reference
timestamps timestamps
asr granularity: "word" word
speakers speaker
hotwords hotwords

A named model that lacks a requirement is rejected before any request. Without model, the server uses the only capable model, else the category default if capable, else asks for a choice. Results report the model used.

generate_image, edit_image, generate_video, generate_speech, transcribe_audio, transcribe_audio_with_timestamps, recognize_text, recognize_text_with_layout, decide and decide_batch take options, merged into the endpoint's request body, for fields beyond the common parameters; the API notes list the useful ones.

Output files and schemas

Results are written to ~/.cache/multimodal-mcp/<YYYY-MM-DD>/<category>/ unless an absolute output_path is given, and tools return the file path:

  • Images: generate_image and edit_image save the generated images and return paths.
  • Videos: generate_video submits a job without waiting; get_video_job saves the MP4 when the job completes, to its own output_path when given.
  • Speech: generate_speech saves the audio file and returns path, plus timestamps_path when timestamps=true returns timings; voice_design saves a preview clip and returns voice_id and preview_path.
  • Transcripts and timings: transcribe_audio saves the provider's JSON response and returns text and path. transcribe_audio_with_timestamps and generate_speech(timestamps=true) write {text, duration?, segments: [{start, end, text, speaker?}], words: [{start, end, word, speaker?}]} with times in seconds, where either list may be empty; transcribe_audio_with_timestamps also saves the provider's response beside the result.
  • OCR: recognize_text writes the pages to Markdown, each opened by <!-- page N -->; recognize_text_with_layout writes {page_count, pages: [{page, complete, blocks: [{label, box, text}]}]}, where box is [x1, y1, x2, y2] scaled to 0-1000 of the page's width and height. Both save the provider's response beside the result and return incomplete_pages, the pages whose text was cut short.

Background omni agents

Omni agents run in the background on Pydantic AI (pydantic-ai and pydantic-ai-harness):

  • Lifecycle: start_omni_agent starts a run and returns an agent_id at once; wait_omni_agents waits until any listed agent's run ends or the timeout passes; get_omni_agent returns its status, answer or error, and a page of the tool calls it made.
  • Steering and cancellation: continue_omni_agent adds a message to the active run, or starts a new run on the conversation after the previous one ended; stop_omni_agent cancels the current run while keeping the conversation so far.
  • Runtime and limits: Agents read files (receiving wav and mp3 files as native audio when the model has audio), call list_models, get_model_guide and the transcription tools, and run shell commands such as ffmpeg and ffprobe, taken from PATH or, when PATH lacks either, downloaded once with static-ffmpeg. Agents live in server memory and are lost when the server restarts, and a provider request already in flight may complete and be billed after cancellation.

Structured decisions

Decision models make structured judgments in a single forward pass, complementing background omni agents:

  • System 2 (omni): A multi-turn reasoning loop with shell and media tools for open-ended inspection.
  • System 1 (decision): A single forward pass that evaluates independent noul, choice and score questions with calibrated probabilities.

Subjects are passed as state (text or JSON), local files (UTF-8 text, media or PDF), or both, and tools return structured answers directly without writing files. decide evaluates one subject; decide_batch runs the same questions across independent records in input order, isolating record-level errors and placing shared state or leading files first for prefix caching.

Endpoints

An endpoint is an API protocol the server speaks, such as OpenAI's or Ark's. Each endpoint sends requests to a base_url, the API root that the paths in the table below are appended to. Without one, it uses the default API root in the table.

A provider's endpoint applies to all its models, and a model can name a different one with its own endpoint, so one gateway can serve several endpoints under one base_url. A gateway whose endpoints sit under different API roots sets endpoints instead of endpoint and base_url: each key is an endpoint, each value is that endpoint's base_url, and every model on the gateway names its endpoint.

A base_url without a path gets the path of the endpoint's default base_url, so https://gateway.example.com becomes .../v1 for openai, .../v1beta for gemini and .../api/v3 for ark. The vllm/openai, systemone and vllm/systemone endpoints also use .../v1, and ark/systemone uses .../api/v1. A base_url with a path is used as given.

Endpoint Default base_url Image Video TTS ASR OCR Decision
openai https://api.openai.com/v1 /images/generations, /images/edits /videos, multipart /audio/speech /audio/transcriptions /decisions
gemini https://generativelanguage.googleapis.com/v1beta /interactions /interactions, background /interactions, /voices /interactions /decisions
minimax https://api.minimaxi.com /v1/image_generation (references are portrait subjects) /v2/video_generation /v1/t2a_v2, /v1/voice_design /v1/speech_to_text
ark https://ark.cn-beijing.volces.com/api/v3 for image and video, https://openspeech.bytedance.com/api/v3 for speech, https://ark.cn-beijing.volces.com/api/v1 for decisions /images/generations /contents/generations/tasks /tts/unidirectional /sauc/bigmodel_nostream WebSocket /systemone
deepseek https://api.deepseek.com /v1/tools/tts /v1/tools/asr /v1/tools/ocr
vllm/openai http://localhost:8000/v1 /images/generations, /images/edits /videos, multipart /audio/speech /audio/transcriptions /decisions
systemone https://api.typesafe.ai/v1 /systemone
vllm/systemone http://localhost:8000/v1 /systemone
ark/systemone https://ark.cn-beijing.volces.com/api/v1 /systemone

Omni models use OpenAI-compatible chat completions on every endpoint except systemone, vllm/systemone and ark/systemone: at the API root on openai, vllm/openai and ark, at /openai below it on gemini, and at /v1 on deepseek and minimax. Their default capabilities come from the vllm/openai API notes for models listed there, otherwise from the openai ones. ark and deepseek ASR decode audio with ffmpeg from PATH, downloaded once with static-ffmpeg when PATH lacks it, the same copy omni agents use.

  • Volcengine Ark: An ark base_url replaces both default roots (media and speech), so a provider with separate image/video and speech roots needs one provider entry per root. Decisions post to the ark/systemone route beside the base_url, with a trailing /api/v3 replaced by /api/v1. Include any plan prefix, such as .../api/plan/v3 for Agent Plan images and video and .../api/v3/plan for Agent Plan speech. Ark speech models select their service with X-Api-Resource-Id: doubao-seed-tts-2.0 and doubao-seed-asr-2.0 map to seed-tts-2.0 and volc.seedasr.sauc.duration; any other model name is sent as the resource ID.
  • DeepSeek: DeepSeek's speech and OCR requests name no model; configure them as deepseek-tts, deepseek-asr and deepseek-ocr, which take their capabilities from the API notes.
  • Video media inputs: minimax and ark video inputs pass URLs, data: URIs and asset URIs such as asset://ID through unchanged and inline local files as base64. Ark accepts reference videos only as public URLs or asset:// IDs.
  • vLLM and System One: On shared gateways, openai uses native Decisions for gpt-* except gpt-oss*, systemone uses TypeSafe for jev-* and the ark/systemone format for doubao-*, and other decision models use the corresponding vLLM format.

Development

uv sync --locked
uvx ruff check src/multimodal_mcp tests
uv run pytest
uv build

CI runs the tests on Linux and Windows. Changes to how omni agents run shell commands should also pass uv run pytest tests/test_workspace.py on Windows.

License

MIT

Metadata

Release files for multimodal-mcp 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multimodal-mcp 0.6.1
File Size Uploaded Provenance Actions
multimodal_mcp-0.6.1.tar.gz 81.5 kB With provenance Details for multimodal_mcp-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for multimodal-mcp 0.6.1
File Interpreter ABI Platform Actions
multimodal_mcp-0.6.1-py3-none-any.whl Python 3 none any Details for multimodal_mcp-0.6.1-py3-none-any.whl

Total release size: 174.1 kB

Release files / multimodal_mcp-0.6.1.tar.gz

Download URL multimodal_mcp-0.6.1.tar.gz
Size 81.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e47dd105e98db820fb5a1c4be133e82395a2c9d1b811b5102467512237ab540f
BLAKE2b-256 checksum
How to use checksums
b8b59a127c3d144bfd0d2ff760fbf9506591dcdf42b616a47f37f084f1fefa59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / multimodal_mcp-0.6.1-py3-none-any.whl

Download URL multimodal_mcp-0.6.1-py3-none-any.whl
Size 92.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ee3ad37181b1ba9bb24624f6631cc8bc1657708a606b375d2bca95e2e817adc
BLAKE2b-256 checksum
How to use checksums
96e8037e325ff87c0f7627374e45d6047d655b7bd5f30dadb1ae337a1ca2071f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for multimodal-mcp 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for multimodal_mcp-0.6.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page