- Home
- Plugins
- Tools & Capabilities
- dsh-m3e-mcp
dsh-m3e-mcp
l1daye/dsh-m3e-mcp
Bridges the official @m3e/mcp catalog server into DeepSeek Harness: six catalog tools behind a two-position switch that unregisters them and stops the child process when off. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
dsh plugin --profile web add github:l1daye/dsh-m3e-mcpREADME
dsh-m3e-mcp — a DSH bridge for the official @m3e/mcp
English · 简体中文
Bridges the six tools of the official catalog server @m3e/mcp into DeepSeek Harness, behind a two-position switch:
| Position | Behaviour |
|---|---|
| on | spawns <@m3e/mcp>/dist/cli.js with the host's own process.execPath — no PATH lookup, no npx — and registers its tools as mcp__m3e__* |
| off | unregisters all of them and stops the child process — 0 tools, 0 processes, 0 context |
Six catalog tools: list_components / get_component / search_components / get_usage_example / get_react_wrapper / list_css_properties.
Two of its own: m3e_status (read-only health check) and m3e_surface (the switch, also callable as a tool).

Six of the eight Studio pages, taken from the copy inside the package. Pick on the left, the brief JSON updates on the right; every preview is a real @m3e/web element and every colour is derived live by m3e-theme, not a mockup.
Install
@m3e/mcp is a dependency of this plugin, so installing the plugin installs it too — no npm i -g needed. The package also carries a trimmed copy of M3E Studio, so there is nothing else to clone.
npm i dsh-m3e-mcp
To hack on the plugin, link the working directory instead:
# add two lines to the profile:
# dependencies: "dsh-m3e-mcp": "link:<this directory>"
# dsh.profile.bundles: ["dsh-m3e-mcp"]
# restart DSH
With a link: install, the profile's package manager does not install the linked package's dependencies — run npm install once inside the plugin directory first.
Installing from a tarball or the registry handles this for you.
Slow registry:
npm installpulls 109 packages (about 59 MB) from npm. If that is slow or blocked, switch the registry first:npm config set registry https://registry.npmmirror.com(or per-command:npm i --registry=https://registry.npmmirror.com). Network access is needed at install time, and at run time only when you ask for it:/m3e updateor the chip's "check for updates" queries npmmirror, then npmjs. Every other path stays offline — the plugin spawns a local CLI and touches no GitHub, no CDN.
The CLI is looked up along four paths, in priority order:
config.cli— pinned explicitly, always first (a bad path reports an error instead of being silently overridden)- the bundled
@m3e/mcp—require.resolvewalks up from the package directory, covering both npm nesting and pnpm hoisting - the npm global directory
%APPDATA%\npm\node_modules— still valid fornpm i -gveterans npm_config_prefix— for anyone who changed--prefix
The bundled copy always outranks the global one: which version runs is decided by the plugin's own package-lock.json, not by whatever the user happens to have installed globally.
The global copy is not removed, just demoted to a fallback; when both exist, m3e_status adds an also on disk(未使用) line, and if that idle copy is actually newer it is tagged (比在用的新). Those two strings are literal output and are not translated.
Two hard gates: the host Node must be >= 22, and the resolved @m3e/mcp must be >= 2.13.8. When either fails, startClient refuses and says why, and m3e_status surfaces nodeSupported / cliOutdated — no guessing at a process that will not start.
When none of the four paths hit, it lists which ones it checked.
The cost: the plugin directory grows by about 67 MB — 59 MB of dependencies (@m3e/mcp drags in @m3e/web, @modelcontextprotocol/sdk, lit and the rest of the 109 packages) plus the 8.4 MB Studio.
Three entry points
The same switch is reachable from three places, with identical behaviour:
| Entry point | Best for |
|---|---|
| the chip left of the composer | mouse users; its menu also carries "self-check" and "check for updates" |
the m3e_surface tool | letting the model flip it; m3e_status reports the result |
/m3e on|off|status|selfcheck|update|studio | keyboard users, headless, profiles without a web UI |

Besides the two positions, the menu carries "self-check", "check for updates" and "open Studio". The 6/6 on the chip is the number of tools currently visible.
/m3e selfcheck really calls list_components once and reports the phase and elapsed time — far more useful than "the tool seems dead".
/m3e update is the only action that goes online: explicitly triggered, queries npmmirror then npmjs, 6-second timeout, reports only and installs nothing.
/m3e studio and the chip's "open Studio" are the same path: probe 127.0.0.1:4317, and if it answers, open a new tab.
Studio ships inside the package: the plugin carries a static site cut from m3e-studio (studio/, 377 files / 8.4 MB), so installing the plugin is enough — no second clone. It starts with the plugin (studioAutostart, on by default): on load the plugin probes, spawns what is missing, and stops it when DSH shuts down — no manual npm run studio after a reboot. A server that already answers is adopted rather than duplicated.
Details:
- Directory priority: the
studioDirsetting → the bundledstudio/→ am3e-studiocheckout beside the plugin (development). The bundled copy is served byhost/studio-serve.mjs; the other two use their owndev/serve.mjs - To point at your own Studio source: set
studioDir: <directory>incordis.patch.yml; the directory must containdev/serve.mjs - To let the bridge open the page without starting anything:
studioAutostart: false - If the port is taken by something else: the probe sees it and the bridge does not fight for it
- When it cannot start, the chip turns red and names the reason (directory missing / no entry script / timeout), and
/m3e studiosays the same sentence - The bundled copy has no "bake silhouettes" button: that writes to disk and the package directory may be read-only. Re-baking is a development-time job; the result ships with the package
- The bridge never proxies Studio and never reads its source
When the child process dies unexpectedly, autoReconnect (on by default) retries after 1s / 4s / 9s, at most three times within 60 seconds; the fourth time it gives up and records why. Switching off manually clears that counter and will not bring the process back.
With a brief and without one
Same prompt, same single round: A gets nothing extra, B first picks a design language in this Studio and feeds the brief along with the prompt. Three screens each — library, now playing, queue:

The difference is not only colour. B's now-playing screen adds format chips, a pull quote and a bottom action bar, with a chosen pentagon silhouette for the cover; its queue panel carries a 1/8 progress ring and three sort buttons. A's equivalents are a cover, a progress bar and one row of controls, with a flat list for the queue. Across the three screens, B's shapes, type and hierarchy come from one set of values; A's covers each take their own gradient.
Switch state
Stored in <DSH_HOME>/plugins-data/m3e/bridge.json and restored on restart.
Development
npm install # first time, or after pulling: @m3e/mcp is a dependency
node tests/probe.mjs # verify without restarting: fake ctx, one real tools/call, off, on again
It is 36 checks in nine groups: 3 version comparisons, 4 on the start surface, 2 version gates, 4 on the switch, 5 on /m3e commands, 7 fault injections, 2 on auto-reconnect, 4 on Studio autostart and 5 win32 liveness checks. All 36 and exit code 0 is the pass bar; on a non-Windows host the last two groups print [skip], so a shorter run there is expected, not a regression.
Two of those groups are worth knowing before you trust a green run. One asserts the CLI in use is the bundled copy (source=package) — falling back to the global one fails the run, because that means the "installing the plugin brings its own" promise is broken. Another injects four faults through tests/fixtures/fake-mcp.mjs: handshake timeout, tools/list timeout, tools/call timeout and crash-on-start, confirming each failure is reported honestly, the tool surface rolls back and no process is leaked.
Constraints and the traps behind them live in AGENTS.md.
License
MIT, as declared in package.json. The repository has no LICENSE file.
Related plugins
archify (deepseek-harness)
tt-a1i/archify
WeKnora (dsh-weknora)
tencent/weknora
next-ai-draw-io (dsh-plugin)
dayuanjiang/next-ai-draw-io
AiToEarn (dsh-plugin-aitoearn)
yikart/aitoearn