dsh-vision-dashscope
dsh-vision-dashscope
通过 DashScope / 千问(Qwen) 识别并生成图片、视频、音频的 DSH 插件(MCP server)。专治 Deepseek-omnimodal 等插件「视频大了就不行」的问题:
长视频/大视频直接识别:走百炼临时 OSS 直传(
oss://临时 URL,单文件上限 1GB,按模型的max_file_size_mb校验),不压缩、不损画质;小视频(≤14MB)走 base64 省一次上传。mkv / avi 等浏览器不可播格式也能识别(模型服务端解码抽帧)。
音频:短音频 qwen3.5-omni 直接理解,长音频自动 fun-asr 转写。
工具
工具 | 说明 |
| 本地图片 / 图片 URL → 描述或按任务分析(qwen3.7-flash) |
| 本地视频 / 视频 URL → 描述或按任务分析(qwen3.7-flash;大文件 OSS 直传) |
| 短音频 qwen3.5-omni 理解;长音频 fun-asr 转写 |
| 文生图(qwen-image-3.0 等;约 0.18 元/张起) |
| 文生视频(wan2.7-t2v / happyhorse-1.1-t2v;约 0.6 元/秒起) |
| 图生视频(wan2.7-i2v 等,首帧图片自动上传临时 OSS) |
| 查看当前模型与限制配置 |
识别工具会调用 DashScope 付费 API(按 token 计费,量小价低)。
生成工具必须
confirm=true才会实际调用付费接口;false时只返回预计费用(如"预计 3.00 元(5 秒 × 0.6 元/秒)")。生成结果自动下载到本地输出目录(默认
~/Downloads/dsh-vision-dashscope,可用DASH_VISION_OUTPUT_DIR修改),返回本地路径——配合 dsh-image-preview 可直接在对话里内联预览。文生图默认额外转一张 JPEG 预览(
preview字段,最长边 1600px / 质量 85,可配),原始 PNG 保留在files中——DSH 图片内联上限 5MB,大 PNG(1792×2400 可达 7MB)直接内联会 404,用 JPEG 预览即可正常显示。
Related MCP server: jimeng_visual_generation
安装
需要 Python 3.12+、uv。复制 .env.example 为 .env 并填写 API Key:
git clone https://github.com/ywleeo/dsh-vision-dashscope.git
cd dsh-vision-dashscope
cp .env.example .env # 填入 DASH_VISION_API_KEY
uv syncAPI Key 也可用环境变量:DASH_VISION_API_KEY(缺省回退 OMNIMODAL_API_KEY / DASHSCOPE_API_KEY)。
DSH 接入
在 ~/.dsh/profiles/web/cordis.patch.yml(用户 patch 层)追加:
- insert:
- id: mcp-vision-dashscope
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: vision-dashscope
transport: stdio
command: /Users/leeo/.local/bin/uv
args:
- run
- --directory
- /path/to/dsh-vision-dashscope
- dsh-vision-dashscope
failOnStartupError: false重启 dsh web。连接后工具以 mcp__vision-dashscope__recognize_video 等名字出现。
大文件上传原理(长视频关键)
GET /api/v1/uploads?action=getPolicy&model=<model>获取上传凭证(含upload_host、签名、max_file_size_mb);multipart 上传文件到 OSS 临时存储,得到
oss://<key>临时 URL(有效期 48h,免费);chat 请求
video_url: {"url": "oss://..."}并在 header 加X-DashScope-OssResourceResolve: enable,模型服务端拉取解码抽帧。
参考:上传文件获取临时 URL(阿里云百炼文档)、视觉理解(视频)。
配置(环境变量 / .env)
变量 | 默认 | 说明 |
| — | API Key(回退 OMNIMODAL_API_KEY / DASHSCOPE_API_KEY) |
|
| 图片识别模型 |
|
| 视频识别模型 |
|
| 短音频理解模型 |
|
| 长音频转写模型 |
|
| 视频 base64 阈值,超出走 OSS 直传 |
|
| 长音频转写阈值(秒) |
|
| 文生图模型(PRO/MAX 档同理) |
|
| 文生视频模型(MAX 档 happyhorse-1.1-t2v;I2V 同理) |
|
| 生成结果保存目录 |
|
| 视频生成时长上限(秒) |
|
| 输出上限 |
测试
uv run pytest -qLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceMCP server enabling AI agents to generate AI videos and images, analyze video content, and download videos from Douyin and Xiaohongshu.
- AlicenseAqualityCmaintenanceMCP server for generating images and videos using Volcengine's Jimeng APIs, supporting text-to-image, image-to-image, multi-image fusion, text-to-video, and image-to-video.31MIT
- AlicenseAqualityDmaintenanceMCP server for AI-powered media generation: images, videos, audio, and upscaling using 99 AI models.6MIT
- Flicense-qualityDmaintenanceAn MCP server for generating images and videos via external multimodal models, providing unified tools like imageGenerate, videoGenerate, and materialWrite with support for normal and smart generation modes.
Related MCP Connectors
MCP server for Wan AI video generation
MCP server for Hailuo (MiniMax) AI video generation
MCP server for ByteDance Seedream AI image generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ywleeo/dsh-vision-dashscope'
If you have feedback or need assistance with the MCP directory API, please join our Discord server