dsh-media-mcp
This MCP server turns natural-language prompts into saved image, video, and speech files on your machine, and lets you inspect or change its settings entirely through chat.
Generate images (
generate_image): create a picture from a text prompt, saved as a JPEG, returning absolute paths. Supports optional per-callmodel,size,outputDir, andtimeoutMs.Generate videos (
generate_video): turn a text prompt into a short clip (text-to-video only; no reference images/videos), returning the file path, task id, and wait time. Optionalmodel,ratio,duration,outputDir,timeoutMs. Slow and paid.Generate speech (
generate_speech): synthesize text into an MP3/PCM/ogg_opus file, returning the path. Paid; uses a separate speech key.Read configuration (
get_config): report the provider, base URL, current models and defaults, output directory, whether an API key is set (value never shown), and the known model catalogue with constraints.Change settings (
set_config): persist changes like model, default size, output directory, provider, API key, base URL, and timeouts; applies on the next call with no restart.Cost-aware safety: warns about unsupported sizes before spending money.
Files, not data: tools return paths so large media never floods the conversation.
Works with any MCP client (built for DeepSeek Harness).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dsh-media-mcp Draw a corgi surfing at sunset."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dsh-media-mcp
中文 | English
Turn a sentence into an image, a short video or spoken audio on your machine.
dsh-media-mcp is a small MCP server. Your AI client calls it,
it calls your media provider, and the result lands on disk as a normal file you can open. It also
exposes its own settings as tools, so changing the model, the size or the output folder is something
you say in chat — no settings screen to hunt for.
Works with any MCP client. Built for and tested with
DeepSeek Harness (dsh).
What you can do
Just ask:
"Draw a corgi surfing at sunset." — you get back an absolute path to a saved JPEG.
"Make a five second clip of a paper boat drifting down a rainy street." — a video, in a few minutes (three to four, measured).
"Read this paragraph aloud." — an MP3 of synthesized speech.
"What models are you using?" —
get_configanswers."Switch to Seedream 4.0, 2048x2048." —
set_configsaves it; the next image uses it.
Tool | What it does |
| Generate from a prompt, save it, return the paths. Optional per-call |
| Generate a short clip. Text to video only. Optional per-call |
| Synthesize speech from text, save it, return the path. Optional per-call |
| Show the settings in effect, whether a key is configured, and which models are known. |
| Change a setting and save it. Applies to the next call. |
It knows a size each image model will refuse, and says so before spending your money:
model doubao-seedream-4-5-251128 requires at least 3686400 pixels, but 1024x1024 is only
1048576. Retry with a larger size such as 1920x1920.Related MCP server: ComfyUI MCP Server
Requirements
Node.js ^22.19.0 || >=24.0.0. No dependencies, no build step: clone it and run it.
Setup
1. Get your API keys
The built-in preset is Volcengine Ark (Doubao / Seedream / Seedance). The server speaks the OpenAI
images API for pictures and Ark's task API for video, so a different vendor works too — it needs one
entry in src/providers.mjs.
Speech is a separate service with its own key. The Ark key is rejected there (you get
Invalid X-Api-Key), so if you want TTS, create a key in the Doubao speech console:
https://console.volcengine.com/speech/new/setting/apikeys. Image and video keep working with the
Ark key alone; you only need the second key when you call generate_speech.
2. Write the config file
This is where your keys live. ~/.config/media-gen/config.yml on macOS and Linux, or
%APPDATA%\media-gen\config.yml on Windows:
provider: ark
apiKey: your-ark-api-key # images and video
imageModel: doubao-seedream-5-0-flash-260915
imageSize: 1024x1024
videoModel: doubao-seedance-2-5-260628
# speechApiKey: your-speech-key # optional; omit to reuse apiKey
speechModel: seed-tts-2.0
speechVoice: zh_female_vv_uranus_bigtts
speechFormat: mp3
# outputDir: "~/Pictures/generated"Then chmod 600 it. config.example.yml is the same thing to copy from, and
MEDIA_GEN_CONFIG points somewhere else if you prefer.
Quote a value that starts with ~, otherwise YAML reads it as nothing.
3. Point your client at the server
Any MCP client:
{
"mcpServers": {
"media": {
"command": "node",
"args": ["/absolute/path/to/dsh-media-mcp/src/server.mjs"],
"cwd": "/absolute/path/to/your/workspace"
}
}
}DeepSeek Harness — append this row to $DSH_HOME/profiles/<profile>/cordis.patch.yml.
@deepseek-ai/dsh-mcp-client already ships with dsh, so nothing needs installing:
- insert:
- id: mcp-media
name: '@deepseek-ai/dsh-mcp-client'
config:
transport: stdio
serverName: media
command: node
args:
- /absolute/path/to/dsh-media-mcp/src/server.mjs
cwd: /absolute/path/to/your/workspace
toolCallTimeoutMs: 900000 # a video waits minutes; the 60s default is far too short
failOnStartupError: trueThe tools appear as mcp__media__generate_image, mcp__media__generate_video,
mcp__media__generate_speech, mcp__media__get_config and mcp__media__set_config.
No app restart needed: a patched profile picks the row up in the same session, and generated
files follow cwd, so point cwd at the workspace you want them in. (Editing the server's own
src/*.mjs is different: that code loads once per process, so restart the server or the app.)
Where your files go
What | Default | Override |
Images |
|
|
Videos |
|
|
Speech |
|
|
<workspace> is the cwd you gave the server. Setting outputDir sends all three kinds to that
one folder; leave it unset to keep them apart. media-gen outdir prints every directory, and ~ is
expanded in a configured path.
Tools return paths, not file data, so a large image or clip never floods the conversation. Open
the file with any viewer; in DeepSeek Harness you can also hand an image path to the read_image
tool.
Settings
Change any of these with set_config, or by editing the file — it is read on every call, so nothing
needs restarting either way.
Setting | In the config file | Environment variable | Notes |
Provider |
|
| Which preset to use. Default |
API key |
|
| Required for images and video. Never printed by any tool. |
API URL |
|
| Overrides the preset's URL. |
Image model |
|
| Default model for pictures. |
Image size |
|
| Default size, |
Video model |
|
| Default model for clips. |
Speech key |
|
| Speech service only. Leave unset to reuse |
Speech model |
|
| Speech resource id, default |
Speech voice |
|
| Speaker id, default |
Speech format |
|
|
|
Image timeout |
|
| Milliseconds one image call may take. Default |
Video timeout |
|
| Milliseconds the whole video flow may take. Default |
Speech timeout |
|
| Milliseconds one speech call may take. Default |
Output folder |
|
| Overrides all the defaults above. |
An environment variable beats the config file. For the model lists, their size floors and their
notes, run media-gen models or ask get_config.
Aspect ratio and clip length are per call (ratio, duration; default 16:9 and 5 seconds),
because they change what a clip costs. The same is true of voice and format for speech.
Timeouts
A five second clip measured about four minutes, so the waits are yours to set rather than constants baked into the code:
imageTimeoutMs: 300000 # a slow image provider
videoTimeoutMs: 1200000 # longer clips
speechTimeoutMs: 180000 # a long textset_config writes the same keys, media-gen config set videoTimeoutMs=1200000 does it from a
shell, and any of them can be overridden for one call: the generate tools take timeoutMs, the CLI
takes --timeout-ms 1200000. get_config reports what is in effect.
The ceiling is 3600000 (one hour). A larger value is refused rather than shortened, because a call
that hangs for an hour is a mistake worth seeing.
Keep your client's tool timeout above ours. The server can only stop its own wait; if your MCP
client gives up first you get its error instead of a message naming the video task id. The DSH row
above uses toolCallTimeoutMs: 900000 for that reason.
A config file from an older release, written as MEDIA_GEN_API_KEY=... lines, still works. Renaming
it to config.yml is all it takes to move on.
Command line
The same server comes with a small CLI. Symlink bin/media-gen.mjs onto your PATH:
media-gen env # what is in effect right now
media-gen models # image models (size floors) and speech models
media-gen outdir # where images, videos and speech will be written
media-gen img "a corgi surfing at sunset"
media-gen img "cyberpunk alley" -s 2048x2048 -o alley.jpg
media-gen video "a paper boat drifting down a rainy street" --duration 5
media-gen speech "你好,这是一段语音合成测试。"
media-gen speech "Read me aloud" -v zh_female_vv_uranus_bigtts -f mp3 -o hello.mp3
media-gen config set imageModel=doubao-seedream-4-0-250828
media-gen config set videoModel=doubao-seedance-1-0-pro-250528
media-gen config set speechApiKey=your-speech-key # write-only, like the tools
media-gen key # redacted; the raw key is never printed
media-gen serve # run the MCP server on stdioTroubleshooting
What you see | What it means |
|
|
| That image model has a size floor — use the size the message suggests. |
| The model is not available to your account or region. |
| Ark's "Safe Experience Mode" usage cap for that model. Raise or close it on the Ark console's model-activation page. |
| The speech service rejected the key. An Ark key does not work there: set |
| The voice does not belong to the configured speech resource. Check the voice and resource id against the speech console — either can be the mismatched one. |
| The service answered without audio — usually the same credential or resource problem in a different shape. The message quotes the raw body. |
| The clip was still rendering. The message carries the task id, so you can query it instead of paying for a second render — or raise |
| A state the server will not guess at. Update the server rather than retrying blindly. |
A video tool call is cut off by your client | Raise its tool timeout. The clip legitimately takes minutes; the row above uses |
| A config key that is not a setting — usually a typo, so it changed nothing. |
| The file is in the old |
What video can and cannot do
Text to video, one clip per call. Reference images and videos (image-to-video, extend, edit) are not supported: each of those changes the request contract, and what is not implemented should not look like it is.
What speech can and cannot do
Text to speech, one file per call, using the streaming endpoint the provider documents — the whole answer is collected and written once, so a partial file is never left behind. Voice, format and sampling rate are settings; speed, pitch, loudness and emotion controls, voice cloning and speech-to-text are not implemented, so nothing pretends to accept them.
Development
Tests are offline — no network, no API key, no spend:
node --test tests/*.test.mjsLicense
MIT — see LICENSE.
Available Tools
4 toolsgenerate_imageA
Generate an image from a text prompt and save it to disk. Call this when the user asks to draw, create, render, illustrate or generate a picture, photo or artwork. Returns the absolute paths of the saved files; pass one to read_image to view it. Each call costs real money, so call it once per explicit user request.
Inputs: prompt (required), size, model, outputDir, +1 more.
generate_videoA
Generate a short video from a text prompt and save it to disk. Asynchronous: the provider renders in the background and this call waits, typically one to three minutes. Call it only when the user explicitly asks for a video — reference images and videos are not supported. Returns the absolute path of the saved file, the task id and how long it waited.
Inputs: prompt (required), model, ratio, duration, +2 more.
get_configA
Report the current configuration: provider, base URL, the image and video models in use, their defaults, the output directory, whether an API key is present (never its value), and the catalogue of known models with their constraints. Call this before changing settings, or when the user asks which model is in use.
Inputs: no named parameters.
set_configA
Change settings and persist them to the config file. Call this when the user asks to switch a model, change a default size, output directory or timeout, or change provider. Only the fields passed are changed and everything else is preserved. Changes take effect on the next call with no restart.
Inputs: apiKey, baseUrl, provider, imageSize, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct operation: image generation, video generation, config retrieval, and config modification. No overlap exists, making selection unambiguous.
All tools follow the verb_noun pattern: generate_image, generate_video, get_config, set_config. The naming is consistent and predictable.
With 4 tools, the server is well-scoped for its purpose—media generation plus configuration management. Each tool is essential and there are no redundant or missing core operations.
The core generation and configuration workflows are covered, but the reference to a read_image tool in generate_image's description suggests a potential gap for viewing outputs. No explicit file listing or deletion tools are present, though these may be outside the server's intended scope.
Maintenance
Related MCP Connectors
Transform video, audio and images, and generate media from prompts. FFmpeg, captions, models.
Generate images, videos, voiceovers, and captions from a chat prompt.
Create images and videos from prompts, with options for image mixing, reference images, and start/…
Transcode, host and caption video from a prompt. Fifteen tools, nine read-only, nothing deletes.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server for programmatic video generation. Send a prompt, get an MP4.-
- AlicenseNot gradedqualityDmaintenanceGenerate and refine AI images/audio/video through natural conversation.412Apache 2.0
- FlicenseNot gradedqualityCmaintenanceGenerates images and videos from text prompts using Cloudflare Workers AI and Google Gemini models.-

distribea-mcpofficial
AlicenseNot gradedqualityCmaintenanceGenerates images, video, music, and voice from plain-language prompts, shipping them production-ready as optimised WebP with SEO alt text, directly in your terminal or AI agent.166 npm1MIT