DeepSeek Harness 插件

imaused/dsh-mcp-bridge

Star 数 ★ 0 下载量(近 30 天) 321 分类 工具与能力 收录于 2026-10-22 npm dsh-mcp-host

把 stdio MCP 服务器变成 DeepSeek Harness 原生工具。默认接微软官方 Playwright MCP,agent 直接操作你已打开、已登录的 Edge 或 Chrome;也可换成任意 stdio MCP 命令。宿主侧插件,不带客户端包,无 npm 依赖。要接管你自己的浏览器,需以远程调试模式启动 Edge/Chrome,并允许 npx 拉取 @playwright/mcp。

安装

# npm 包(预构建)

dsh plugin --profile web add dsh-mcp-host

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:imaused/dsh-mcp-bridge

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

该插件的 README 只有英文版本。

Expose any stdio MCP server as native DeepSeek Harness tools. Host-only plugin, no browser UI, no npm dependencies.

Built for one job: let a DSH agent drive a browser through the official Microsoft Playwright MCP server, attached to the Edge/Chrome you are already using.

What it does

  1. On load, spawns the MCP server once (default npx --yes @playwright/mcp@latest --cdp-endpoint=msedge).
  2. Calls initialize + tools/list, converts each tool's JSON Schema into a DSH parameter schema, and registers it with ctx.tools.register.
  3. Every tool call is forwarded as tools/call; the result is returned as JSON. Images (screenshots) are written to a temp file and returned as a path, not as base64.

Tools are renamed: browser_navigate becomes edge_navigate (prefix configurable).

Default tool set (12 of Playwright's 25)

edge_navigate, edge_navigate_back, edge_snapshot, edge_click, edge_type, edge_fill_form, edge_press_key, edge_tabs, edge_take_screenshot, edge_evaluate, edge_wait_for, edge_close.

The full set costs prompt space in every session, which is why it is not the default. Set MCP_BRIDGE_ALL=1 to expose everything.

Install

cd E:\dsh
.\rollback.cmd guard add "file:C:\path\to\dsh-mcp-host"
.\rollback.cmd health

Restart DSH (or rely on hot-load) and open a new session.

Configuration

Env var Default Meaning
MCP_BRIDGE_COMMAND npx --yes @playwright/mcp@latest --cdp-endpoint=msedge The MCP server command line (any stdio MCP server)
MCP_BRIDGE_PREFIX edge Tool name prefix
MCP_BRIDGE_ALL unset 1 = register every tool the server offers
MCP_BRIDGE_TOOLS unset Comma-separated allow-list of MCP tool names
MCP_BRIDGE_TIMEOUT 120000 Per-call timeout (ms)
MCP_BRIDGE_INIT_TIMEOUT 30000 Startup timeout (ms)

Prerequisite for the Edge/Chrome you are already using

Open edge://inspect/#remote-debugging (or chrome://inspect/#remote-debugging) and enable Allow remote debugging for this browser instance. Then --cdp-endpoint=msedge (or =chrome) attaches to that running browser with your logins and extensions. Without the toggle, Playwright launches a fresh browser instead.

Failure behaviour

If the MCP server cannot start or does not answer, the plugin registers nothing and logs the reason 鈥?it never throws, so it cannot take the host boot down. Check MCP_BRIDGE_INIT_TIMEOUT and the stderr tail printed in the DSH console.

Privacy

The bridge itself makes no network calls. It spawns exactly one child process (the MCP server you configured) and forwards bytes between it and the tool call. With --cdp-endpoint, the MCP server attaches to your existing browser, which means it can see and act on the tabs you have open 鈥?treat that as giving the agent your browser session.

License

MIT.

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。