How qwenlm/qwen-mm-plugins works
Purpose and Delivery Model
Qwen-MM-Plugins is a Python-based marketplace of independently installable multimodal agent capabilities. A capability combines agent instructions (“skill”) with an optional stdio MCP server exposing tools. It targets multiple agent harnesses rather than providing a standalone web application. Main distribution/install entry points are install.sh, .claude-plugin/marketplace.json, and per-capability plugin manifests such as src/capabilities/core/.claude-plugin/plugin.json.
Runtime Entry Points and MCP Boundary
Python MCP servers are launched on demand, generally through each package’s module entry point, e.g. src/capabilities/core/qwen_mm_plugins_core/__main__.py and src/capabilities/video-memory/qwen_mm_plugins_video_memory/__main__.py. src/mcp_framework.py is the likely shared server/tool-registration abstraction; stdio response streaming is implemented for core at src/capabilities/core/qwen_mm_plugins_core/stdio_streaming.py. Skills define model-facing workflow and tool-use guidance independently of the executable server, e.g. src/capabilities/core/skill/SKILL.md.
Shared Platform Layer
Cross-capability infrastructure centralizes configuration, API access, execution, caching, and media utilities:
• Environment/config resolution: src/shared/env.py
• DashScope and OpenAI-compatible API clients: src/shared/api_dashscope.py, src/shared/api_openai.py
• Process, retry, cache, and content/image/video utilities: src/shared/syscmd.py, src/shared/retry.py, src/shared/video.py
Configuration prefers process environment and supports a shared user config file. External API boundaries include DashScope for perception/generation and Serper for web/search functions; native rendering and parsing additionally depend on local system tools.
Core Multimodal Processing
The core capability is the base perception and artifact-rendering layer. Readers ingest images and videos; API adapters provide OCR, ASR, visual grounding, segmentation, vision chat, and web retrieval. Producers create derivative views such as crops or bounding-box overlays. Renderers turn diverse source artifacts—PDF, Office, notebooks, HTML, LaTeX, SVG, geo data, and 3D models—into inspectable output.
Paths: src/capabilities/core/qwen_mm_plugins_core/readers/video.py, src/capabilities/core/qwen_mm_plugins_core/apis/vision_chat.py, src/capabilities/core/qwen_mm_plugins_core/renderers/.
Long-Video Memory Pipeline
Video memory creates and queries a hierarchical event graph for long-video QA. The build workflow coordinates extraction/analysis, embeddings, graph assembly, and merging; the runtime server loads this representation and exposes temporal, textual, summary, and subgraph queries. This is a persistent-data boundary: build artifacts are separate from request-time querying.
Paths: src/capabilities/video-memory/skill/script/build_memory/pipeline_worker.py, src/capabilities/video-memory/skill/script/build_memory/build_graph.py, src/capabilities/video-memory/qwen_mm_plugins_video_memory/query_memory.py.
Creative and Education Workflows
Video editing combines model-backed image/video/speech generation tools with skill-driven editing plans, FFmpeg-oriented execution guidance, media assets, and review gates. Educational content is skill-only: it guides image/problem analysis through scripting, narration, storyboard, component composition, rendering, and validation for Chinese explainer videos/pages.
Paths: src/capabilities/video-edit/qwen_mm_plugins_video_edit/tools/wan_t2v.py, src/capabilities/video-edit/skill/engines/ffmpeg-direct.md, src/capabilities/edu-agent/skill/scripts/_render.py.
Stateful 3D/CAD Thin Clients
Blender and FreeCAD capabilities are clients for already-running desktop applications, not embedded geometry engines. Their loaders/launchers establish the application boundary; MCP tools execute code and manipulate or inspect the current scene/document. Blender additionally integrates external asset catalogs and 3D generation services; FreeCAD supports parametric operations and FEM analysis.
Paths: src/capabilities/blender/qwen_mm_plugins_blender/_launch.py, src/capabilities/blender/qwen_mm_plugins_blender/tools/execute_blender_code.py, src/capabilities/freecad/qwen_mm_plugins_freecad/tools/execute_code_async.py.
Infrastructure Dependencies
The intended runtime is Python packaged via pyproject.toml and launched with uvx. Local dependencies materially affect capabilities: FFmpeg for audio/video; LibreOffice, Blender, TeX Live, and Chromium for selected render/visualization paths; running Blender/FreeCAD instances for their respective thin clients. Third-party API credentials gate DashScope-backed capabilities and Serper-backed web retrieval.
Main entry points: __main__.py Core MCP server · plugin.json Core plugin manifest · vision_chat.py Vision API adapters · env.py Shared runtime services
Components 21
Distribution
- Installer · Installs marketplace capabilities for agent harnesses.
install.sh - Marketplace manifest
.claude-plugin/marketplace.json - Core plugin manifest
src/capabilities/core/.claude-plugin/plugin.json
Shared platform
- MCP framework · Registers tools and provides the stdio MCP boundary.
src/mcp_framework.py - Shared runtime services · Resolves environment, calls model APIs, and supplies process, retry, cache, and media helpers.
src/shared/env.py
Core capability
- Core skill · Guides model workflow independently of the MCP server.
src/capabilities/core/skill/SKILL.md - Core MCP server · On-demand stdio server for base multimodal tools.
src/capabilities/core/qwen_mm_plugins_core/__main__.py - Media readers · Ingests images and video for core processing.
src/capabilities/core/qwen_mm_plugins_core/readers/video.py - Vision API adapters · Provides vision chat and related model-backed perception.
src/capabilities/core/qwen_mm_plugins_core/apis/vision_chat.py - Artifact renderers · Converts documents, web, geo, and 3D artifacts into inspectable output.
Video memory
- Memory build worker · Coordinates extraction, analysis, embeddings, graph assembly, and merge.
src/capabilities/video-memory/skill/script/build_memory/pipeline_worker.py - Event graph builder · Creates the hierarchical long-video memory representation.
src/capabilities/video-memory/skill/script/build_memory/build_graph.py - Memory query service · Loads persistent memory for temporal, textual, summary, and subgraph queries.
src/capabilities/video-memory/qwen_mm_plugins_video_memory/query_memory.py
Creative & desktop capabilities
- Video editing tools · Model-backed video generation supports skill-driven editing and review.
src/capabilities/video-edit/qwen_mm_plugins_video_edit/tools/wan_t2v.py - FFmpeg editing engine
src/capabilities/video-edit/skill/engines/ffmpeg-direct.md - Education renderer · Renders educational explainer video or page artifacts.
src/capabilities/edu-agent/skill/scripts/_render.py - Blender thin client · Launches or connects to a running Blender session.
src/capabilities/blender/qwen_mm_plugins_blender/_launch.py - Blender code tools · Manipulates and inspects the current Blender scene.
src/capabilities/blender/qwen_mm_plugins_blender/tools/execute_blender_code.py - FreeCAD thin client · Executes asynchronous code against the current FreeCAD document.
src/capabilities/freecad/qwen_mm_plugins_freecad/tools/execute_code_async.py
External dependencies
- DashScope & Serper · Perception, generation, and web retrieval boundary.
- Local tools & desktop apps · FFmpeg, renderers, and running Blender or FreeCAD instances.
Connections 23
- Installer → Marketplace manifest: installs from
- Marketplace manifest → Core plugin manifest: lists capability
- Core plugin manifest → Core skill: packages
- Core plugin manifest → Core MCP server: launches
- Core MCP server → MCP framework: uses
- Core MCP server → Media readers: exposes
- Core MCP server → Vision API adapters: exposes
- Core MCP server → Artifact renderers: exposes
- Media readers → Shared runtime services: uses
- Vision API adapters → Shared runtime services: uses
- Vision API adapters → DashScope & Serper: calls
- Artifact renderers → Local tools & desktop apps: invokes
- Memory build worker → Event graph builder: builds
- Event graph builder → Memory query service: persistent artifacts
- Memory build worker → Shared runtime services: uses APIs and media utilities
- Memory query service → MCP framework: serves via MCP
- Video editing tools → DashScope & Serper: generates media through
- Video editing tools → FFmpeg editing engine: uses execution plan
- FFmpeg editing engine → Local tools & desktop apps: requires FFmpeg
- Education renderer → Local tools & desktop apps: renders with local tools
- Blender thin client → Blender code tools: provides session to
- Blender code tools → Local tools & desktop apps: targets running Blender
- FreeCAD thin client → Local tools & desktop apps: targets running FreeCAD