dsh-mcp-bridge

DSH PLUGIN浏览器与联网

仓库 Chhlafiu4312/dsh-mcp-bridge · npm dsh-mcp-connect

浏览器与联网 L5 · 运行验证通过 安全审查:低风险 可信度:金 可安装插件
安装这个插件

dsh-mcp-bridge 是一个零依赖的 MCP 客户端桥接插件,让 DeepSeek Harness 代理连接 stdio/HTTP MCP 服务器,并自动注册其工具为原生工具。

验证等级 L5 L5 · 运行验证通过
GitHub 星标 3 复刻 0 · 未关闭 issue 0
最近更新 2026-08-16 创建于 2026-08-16
README 11.0 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:Chhlafiu4312/dsh-mcp-bridge
兼容 DSH 版本0.2.0-rc.2 等 11 个版本版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖@deepseek-ai/dsh@*需要同时安装的同级依赖
npm 包名dsh-mcp-connect可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-mcp-bridge:DeepSeek Harness 的零依赖 MCP 客户端桥接插件

  • 零依赖,纯 JS 实现
  • 支持 stdio 与 HTTP/SSE
  • 自动注册 MCP 工具
  • 工具过滤与超时控制
  • 干净的生命周期管理

上游标签

agent-toolscordisdeepseek-harnessdshdsh-pluginmcpmodel-context-protocol

验证等级与安全审查

L5 · 运行验证通过
自动化流程结论,不是人工审核
验证等级L5 · 运行验证通过在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度稳定按仓库活跃度与最近更新时间给出
可信度金综合仓库活跃度与验证结果

上面的结论来自上游最近一次自动化验证(2026-10-08): 同一套检查会在插件发新版后重跑,页面显示的是最新一次的逐项结果。

逐项检查结果

L1 · 已找到 ✓ 通过
  • L1.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L2 · 结构化 ✓ 通过
  • L2.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L3 · 安装规范 ✓ 通过
  • L3.1_INSTALL_COMMAND_PARSED 安装命令已解析 方式:安装规范解析
  • L3.2_DSH_VERSION_DECLARED DSH 版本已声明 方式:DSH 版本声明
L4 · 安装已测 ✓ 通过
  • L4.1_INSTALL_EXECUTED_CONFINED 受限沙盒内执行安装 方式:沙盒安装执行
  • L4.2_INSTALL_SUCCESS 沙盒安装成功 方式:沙盒安装执行
  • L4.3_ARTIFACT_CONFIRMED 安装产物已确认 方式:沙盒安装执行
L5 · 运行已测 ✓ 通过
  • L5.1_INSTALL_PASSED_SANDBOXED 沙盒安装通过 方式:沙盒安装执行
  • L5.2_WEB_BOOT_READY Web 启动就绪 方式:Web 启动
  • L5.3_HTTP_SERVED HTTP 服务响应 方式:HTTP 请求
  • L5.4_PLUGIN_INVENTORY_ACTIVE 插件清单中已激活 方式:插件清单查询
— · 其它检查项
  • L4_0_SANDBOX 沙盒安装判定 方式:沙盒安装执行

风险详情

  • 审查结论 通过
  • 结论说明 vet 静态分析未发现可疑行为,判定为干净(clean)。
  • 风险计数 严重 0 / 高 0 / 中 0
  • 风险详情 未发现严重或警告级问题。

仓库档案

浏览器与联网
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方Chhlafiu4312仓库 dsh-mcp-bridge · 默认分支 main
分类浏览器与联网network
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue3 / 0 / 0收录时的数值,非实时
创建 / 更新2026-08-16 · 2026-08-16最后推送 2026-08-16
本站收录2026-08-20首次进入本站目录的时间

README 全文

11.0 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-mcp-bridge

Connect the entire MCP ecosystem to DeepSeek Harness with one file. Zero dependencies. No SDK.

Your DSH agent gets every tool from any MCP server — filesystem, GitHub, databases, search, memory, and thousands of community servers — as native tools it can call directly:

You: Create a GitHub PR for the changes in ./app
Agent: [calls mcp_github_create_pull_request] ✓ PR #42 created

✨ Why people use it

🔌 One line to 1000+ tools The MCP ecosystem is the largest tool catalog for agents. This bridge plugs all of it into DSH.
🪶 Zero dependencies Raw JSON-RPC 2.0 over stdio, ~400 lines of plain JavaScript. No SDK, no native modules.
🌐 stdio + HTTP/SSE Local servers via command, remote servers via url (bridged through mcp-remote).
🔁 Auto-registration Every tool becomes mcp__ the moment the server connects.
🧹 Clean lifecycle Child processes are terminated when the plugin stops or updates.
🛡️ Honest boundaries Unsupported JSON-Schema keywords degrade to open inputs — the MCP server stays the authority.

🚀 Quick start

A. dsh plugin add (recommended — the repo is a dsh.bundle)

dsh plugin --profile web add "github:Chhlafiu4312/dsh-mcp-bridge#main"

Then restart dsh web and configure servers via DSH_MCP_SERVERS (see below).

B. Dynamic plugin (one session, no files)

Open a DSH session, ask your agent to run the bridge via cordis_define (paste the code from plugin.js), or define it yourself — then talk to it:

// code.host body — minimal form
return {
inject: ['subprocess', 'tools', 'timer'],
apply(ctx) {
// ... paste the body of plugin.js here ...
},
}

C. Permanent (agent preset)

# 1. create your preset directory
mkdir -p ~/.dsh/.agent-presets/mcp-agent

# 2. copy the repo files in
cp plugin.js ~/.dsh/.agent-presets/mcp-agent/
cp agent.cordis.yml.example ~/.dsh/.agent-presets/mcp-agent/agent.cordis.yml
cp preset.yml.example ~/.dsh/.agent-presets/mcp-agent/preset.yml

# 3. (optional) configure your servers
export DSH_MCP_SERVERS='[
{"id":"filesystem","command":"npx","args":["-y","@modelcontextprotocol/server-filesystem","~/projects"]},
{"id":"github","command":"npx","args":["-y","@modelcontextprotocol/server-github"],"env":{"GITHUB_PERSONAL_ACCESS_TOKEN":"your_github_token"}}
]'

# 4. start a session on the `mcp-agent` preset — done

The agent instantly sees tools like mcp_filesystem_list_directory, mcp_github_create_issue, … plus mcp_status to inspect every connection.

🔧 Configuration

Servers are a JSON array. Each entry is either stdio or url:

{
"id": "my-server",                // tool prefix: mcp__
"command": "npx",                 // executable (stdio only)
"args": ["-y", "server-pkg"],     // argv after the executable
"cwd": "/abs/path",               // optional working directory
"env": { "KEY": "value" },        // optional environment
"url": "https://x.example/mcp",   // or: remote HTTP/SSE via mcp-remote
"disabled": false,                // keep configured but inactive
"allowTools": ["search_*"],       // optional: register only these tools
"denyTools": ["delete_*"],        // optional: hide these tools
"timeoutMs": 120000               // optional per-server call timeout
}
Field Type Meaning
id string, required tool prefix — tools become mcp__
command + args string + string[] stdio server executable and its argv
url string remote server (HTTP/SSE, bridged through mcp-remote)
cwd string working directory (default: the process cwd)
env object extra environment variables
disabled boolean listed in mcp_status but never connected or validated
allowTools / denyTools string[] exact-name filters, combinable — hide destructive tools
timeoutMs number per-server call timeout in ms (default 120000)

Set the array through DSH_MCP_SERVERS (JSON), or edit the defaults in resolveServers() inside plugin.js. Ready-made examples: examples/servers.json — filesystem, GitHub, fetch, memory, Postgres, remote.

🧠 How it works

Detailed walkthrough in docs/ARCHITECTURE.md:

DSH tools registry                    MCP server (child process)
─────────────────                    ───────────────────────────
mcp__  ── tools/call ──▶  npx         (stdio)
◀── text/JSON ────  └─ or mcp-remote  (HTTP)
  1. Spawn — each configured server starts as a managed child process.
  2. Handshake — initialize + notifications/initialized over newline-delimited JSON-RPC 2.0.
  3. Discover — tools/list returns every tool with its JSON Schema.
  4. Register — each tool is registered on the DSH tools registry; schemas are sanitized into the DSH parameter DSL.
  5. Call — the model calls the tool; the bridge forwards tools/call and renders the text content back (120 s cooperative timeout, concurrency-safe).
  6. Teardown — stopping the plugin unregisters the tools and terminates every process.

🛣️ Roadmap

  • [ ] Auto-reconnect with backoff
  • [ ] Native streamable-HTTP client (drop the mcp-remote dependency for url servers)
  • [ ] Per-server permission prompts for destructive tools

🔒 Security notes

  • MCP servers run with your permissions — only connect servers you trust.
  • The filesystem server is scoped: give it only the directories the agent may touch.
  • API tokens travel through the env field; prefer a secret manager or environment variables in production.
  • Full trust model and hardening advice: SECURITY.md.

❓ FAQ

Can I use my own MCP server? Yes — anything that speaks MCP over stdio or streamable HTTP works. Point command/args at it (or url for remote servers) and its tools appear as mcp__.

What happens when a server crashes? The bridge retries up to 3 times with 2s/5s/10s backoff and re-registers the tools on the new connection. Check mcp_status for the current state.

Do I need to restart DSH after changing config? For the dsh plugin/preset install, yes — the config is read at plugin start. disabled: true keeps an entry configured without connecting it.

Why not the official MCP SDK? The SDK would drag a dependency tree into a plugin that only needs newline-delimited JSON-RPC. Zero dependencies keeps installs instant and reviewable (~400 lines).

Does it support resources and prompts? Yes — servers that declare those capabilities get mcp__list_resources, mcp__read_resource, mcp__list_prompts, and mcp__get_prompt tools automatically.

Upgrading from a pre-0.7.0 install? The npm package was renamed to dsh-mcp-connect — remove the old dependency once so the two layers never both activate: dsh plugin --profile web remove dsh-mcp-bridge.

npx-based servers fail with EPERM / "root-owned files"? Your npm cache was polluted by an old sudo npm run. Either fix it once:

sudo chown -R "$(id -u):$(id -g)" ~/.npm

or sidestep it per server by giving npx a writable cache:

{ "id": "filesystem", "command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/allowed/path"],
"env": { "npm_config_cache": "/path/to/writable/npm-cache" } }

🤝 Contributing

Issues and PRs welcome. node scripts/demo.mjs prints a one-shot demo transcript against the local fixture — the raw material for a README GIF. Test fixture included: test/mcp-http-test-server.cjs is a minimal streamable-HTTP MCP server you can run locally to verify the HTTP path end-to-end.

📄 License

MIT — see LICENSE.


dsh-mcp-bridge(中文)

一个文件,把整个 MCP 生态接进 DeepSeek Harness。零依赖,不用 SDK。

你的 DSH agent 可以直接调用任何 MCP server 的全部工具——文件系统、GitHub、数据库、搜索、记忆,以及社区里成千上万的 server:

你:把 ./app 的改动提一个 GitHub PR
Agent:[调用 mcp_github_create_pull_request] ✓ 已创建 PR #42

✨ 亮点

  • 🔌 一行配置接入 1000+ 现成工具(MCP 生态是 agent 最大的工具目录)
  • 🪶 零依赖:原生 JSON-RPC 2.0 over stdio,约 400 行纯 JavaScript
  • 🌐 同时支持 stdio(本地 command)与 HTTP/SSE(远程 url,经 mcp-remote 桥接)
  • 🔁 工具自动注册为 mcp__
  • 🧹 插件停止/更新时自动清理子进程
  • 🛡️ 不支持的 JSON-Schema 关键字安全降级,MCP server 始终是最终校验方

🚀 快速开始

A. 动态插件(单会话,不改文件):在 DSH 会话中用 cordis_define 粘贴 plugin.js 的代码并运行。

B. 永久挂载(agent preset):

mkdir -p ~/.dsh/.agent-presets/mcp-agent
cp plugin.js ~/.dsh/.agent-presets/mcp-agent/
cp agent.cordis.yml.example ~/.dsh/.agent-presets/mcp-agent/agent.cordis.yml
cp preset.yml.example ~/.dsh/.agent-presets/mcp-agent/preset.yml
export DSH_MCP_SERVERS='[{"id":"filesystem","command":"npx","args":["-y","@modelcontextprotocol/server-filesystem","~/projects"]}]'

然后用 mcp-agent 预设开新会话即可。工具命名规则:mcp__,另有 mcp_status 查看每个 server 的连接状态。

🔧 配置

server 配置是一个 JSON 数组,每项支持 id / command / args / cwd / env(stdio)或 url(HTTP,经 mcp-remote 桥接)。通过 DSH_MCP_SERVERS 环境变量或编辑 plugin.js 里的 DEFAULT_SERVERS 传入。示例见 examples/servers.json。

🧠 工作原理

spawn 子进程 → initialize 握手 → tools/list 发现工具 → 消毒 JSON Schema 并注册为 DSH 工具 → 模型调用时转发 tools/call → 渲染文本结果(120 秒协作超时、并发安全)→ 插件停止时注销工具并终止进程。

🛣️ 路线图 / 🔒 安全提示

路线图:resources/prompts 支持、断线自动重连、原生 streamable-HTTP 客户端、危险工具的逐服务器授权确认。安全:MCP server 以你的权限运行,只连接可信 server;filesystem server 只授予必要的目录;API token 走 env 字段,生产环境请用密钥管理器。

📄 License

MIT — 见 LICENSE。

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
dsh-mcp-bridge 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:Chhlafiu4312/dsh-mcp-bridge` 即可。对应的 npm 包名是 `dsh-mcp-connect`。

dsh-mcp-bridge 的验证等级是什么意思?

L5 · 运行验证通过。在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来

dsh-mcp-bridge 安全吗?

低风险。vet 静态分析未发现可疑行为,判定为干净(clean)。

dsh-mcp-bridge 支持哪些 DSH 版本?

上游记录的兼容版本包括 0.2.0-rc.2、0.2.0-rc.1、0.1.7-rc.2、0.1.7-alpha.2、0.1.6-alpha.2、0.1.6-alpha.1、0.1.5-rc.2、0.1.3-alpha.2。版本较多,只列出前 8 个。

dsh-mcp-bridge 需要什么运行环境?

需要同时安装 @deepseek-ai/dsh@*。环境不满足时安装会失败,建议先确认本机版本。

dsh-mcp-bridge 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-mcp-bridge 有哪些功能?

零依赖,纯 JS 实现、支持 stdio 与 HTTP/SSE、自动注册 MCP 工具、工具过滤与超时控制、干净的生命周期管理。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

同名或近似条目

2 条
不同作者的仓库分开列,请确认你要装的是哪一个
浏览器与联网
按星标排序,可作替代方案

dsh-our-free-model

dsh-our-free-model

在 DeepSeek Harness 中装上这个 DSH plugin,无需登录、注册或填 API Key,即可直接调用 DeepSeek

L3 · 安装规范通过 8,796 星

dsh-web

dsh-web

侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。

L3 · 安装规范通过 8,549 星

BrowserSkill

BrowserSkill

BrowserSkill 的 DeepSeek Harness 浏览器自动化桥接插件,通过原生浏览器工具控制可见的 Chrome 和 Edg

L4 · 沙盒安装通过 8,456 星

dsh-pocket

dsh-pocket

DSH Pocket 让 DeepSeek Harness 装进口袋:电脑跑 dsh web,手机扫码即实时同步访问(局域网+公网),人在外

L5 · 运行验证通过 1,656 星

Browser4

Browser4

L4 · 沙盒安装通过 1,152 星

agentrq

agentrq

L4 · 沙盒安装通过 1,140 星

Chhlafiu4312 的其它插件

2 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 2026-10-08。