Turning DSH plugins into MCP tools for any agent #2270
bobleer
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Turning DSH plugins into MCP tools for any agent
DeepSeek Harness makes the internals of an agent replaceable through plugins. That raises a second question: should those plugins only be usable from a DSH process, or can an existing MCP-capable agent discover and use them without adopting DSH as its whole runtime?
We built
deepseek-harness-plugin-mcpto test the latter design.Disclosure: I contribute to BitFun and this bridge is an early BitFun-side experiment. It is not an official DeepSeek component. The source and CI are public, but the npm package is not published yet; treat it as source preview rather than a one-command install.
The bridge is three different control planes
“Expose plugins through MCP” sounds like one adapter. In practice it has three responsibilities with different risk levels.
1. Catalog: discover without executing
The default plane reads repositories carrying the
dsh-pluginGitHub topic, caches a small catalog, and exposes MCP tools/resources for search and inspection.An MCP agent can ask:
This plane is intentionally useful on its own. Discovery should not imply installation, and a repository description is not proof of runtime compatibility.
Source trail:
src/github/catalog.tssrc/plugin/inspect.tssrc/plugin/classify.tssrc/mcp/resources.ts2. Profile: mutate only after an explicit opt-in
Installation and removal are disabled by default.
dsh_plugin_installanddsh_plugin_uninstallonly become active when the operator passes--allow-installor the matching environment flag.The bridge delegates mutation to the official
dsh plugin --profile ...command instead of editing profile files by hand. It then reads the installed profile back and returns the observed bundle/dependency state.That does not make installation “safe by definition.” It makes the mutation boundary visible and gives the caller a place to attach policy. A proper next step is an auditable install receipt: resolved source commit, profile diff, installed/skipped tools, requested capabilities, first health check, and an exact rollback action. We opened that work publicly in issue #1.
Source trail:
src/config.ts—allowInstall: falseby defaultsrc/profile/dsh-cli.tssrc/mcp/control-tools.ts3. Runtime: mirror a live DSH tool registry into MCP
Runtime bridging is a separate opt-in (
--allow-runtime). The host creates a dedicated DSH profile, starts a DSH process, asks the live runtime for its tool schemas, and mirrors compatible tools under deterministicdsh__*MCP names.The important direction is not “translate JSON Schema once.” The live DSH registry remains the execution owner:
Calls therefore stay inside the DSH tool runtime rather than importing arbitrary plugin executors into the MCP server process.
Not every plugin becomes a tool. UI, TUI, theme, or configuration-only plugins may be catalogued and installed, but they have no model-callable runtime surface to mirror. The server says this explicitly instead of pretending that “plugin” and “tool” are synonyms.
Source trail:
src/runtime/host.tssrc/runtime/bridge.tssrc/mcp/server.tssrc/dsh-plugin.tsWhy this matters for BitFun
BitFun already supports MCP as one of its extension layers. DSH explores a deeper, highly composable plugin graph. An MCP bridge lets us test a useful middle path:
The same boundary is available to other MCP-capable agents. The experiment is deliberately not BitFun-exclusive.
This is also why we should not market it as “BitFun now supports every DSH plugin.” The accurate claim today is narrower: the source implements catalog, profile, and opt-in runtime planes; compatible live DSH tools can be mirrored as MCP tools; packaging, install receipts, compatibility evidence, and broader testing still need work.
What we need to prove before calling it production-ready
dsh__*projections deterministic across reloads and collisions.Until those are covered, this is an architecture experiment with real code—not a mature package.
Repository: https://github.com/bobleer/deepseek-harness-plugin-mcp
BitFun: https://github.com/GCWing/BitFun
If this interoperability direction is useful, star the repository you want us to harden and leave a concrete plugin/agent combination to test. Specific compatibility reports are more valuable than generic feature requests.
All reactions