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 미리보기 1장을 추가 생성(
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: falsedsh 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 획득(유효기간 48시간, 무료);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
Available Tools
7 toolsdashscope_statusA
查看当前模型与限制配置(不含 API Key)。
Inputs: no named parameters. Returns: result
generate_imageA
文生图。生成结果下载到本地输出目录并返回路径(配合 dsh-image-preview 可内联预览)。
Inputs: prompt (required), size, tier, confirm.
generate_videoA
文生视频。生成结果下载到本地输出目录并返回路径。
Inputs: prompt (required), tier, wait, confirm, +2 more.
generate_video_from_imageB
图生视频:以图片为首帧生成视频。
Inputs: image (required), prompt (required), tier, wait, +3 more.
recognize_audioA
识别本地音频或音频 URL。
短音频(≤300s 且 ≤10MB)走 qwen3.5-omni 直接理解内容;长音频自动走 fun-asr 异步转写(本地文件先上传到临时 OSS),返回纯文本转录。
Inputs: audio (required), task, language. Returns: result
recognize_imageA
识别本地图片或图片 URL,按 task 调用千问多模态模型。
Inputs: image (required), mode, task. Returns: result
recognize_videoA
识别本地视频或视频 URL。
大文件(>14MB)自动走百炼临时 OSS 直传(上限 1GB、不压缩画质),小文件走 base64;支持任意浏览器不可播放的容器(mkv/avi 等),由模型服务端解码抽帧。
Inputs: video (required), fps, mode, task. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct modality and action: recognize_image/video/audio are clearly separate input types, while generate_image/video/video_from_image are distinct generation tasks. dashscope_status is the only non-media utility, so there is no real ambiguity.
The recognize_* and generate_* groups follow a consistent verb_noun underscore pattern. dashscope_status is the only outlier since it uses a noun-style name rather than verb_noun, but the overall convention is still predictable and readable.
Seven tools is well-scoped for a vision/media DashScope server. Each tool covers a meaningful capability without redundant or excessive surface area.
The tool set covers both major media understanding paths (image, video, audio) and generation paths (image, video, image-to-video). The status tool fills the configuration/inspection need, and there are no obvious dead ends for the stated domain.
Related MCP Connectors
MCP server for Wan AI video generation
MCP server for Qwen Image 3 AI image generation
MCP server for Hailuo (MiniMax) AI video generation
MCP server for ByteDance Seedream AI image generation
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server enabling AI agents to generate AI videos and images, analyze video content, and download videos from Douyin and Xiaohongshu.-
- AlicenseAqualityDmaintenanceMCP 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
- FlicenseNot gradedqualityDmaintenanceAn 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.-