npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chushixixin/dsh-harness-mcp-server

v0.1.10

Published

Expose DeepSeek Harness agent capabilities as an MCP server, so an external MCP client (e.g. Hermes) can drive Harness to execute coding tasks. Hermes = brain, Harness = arms.

Readme

dsh-harness-mcp-server

把 DeepSeek Harness 的 agent 能力暴露成一个 MCP server,让任意 MCP 客户端(如 Hermes)都能驱动 Harness 执行真实的编码任务。

Hermes 是大脑(pro),Harness 是胳膊(flash)—— 1+1>2。

npm version license

📖 English · 中文(当前页)

为什么需要它

Harness 自带强大的 agent 运行时(工具、LLM、agent、会话),但它本身是一个 Cordis 应用,别的 agent 无法直接调用。这个插件把 Harness「由内向外」翻转:在 Harness 内部启动一个真正的 MCP server(StreamableHTTP),通过 ctx 桥接 Harness 的核心服务 —— ctx.agents、ctx.agentPresets、ctx.tools —— 让外部的「大脑」能把真实工作交给 Harness 的「胳膊」。

Hermes (MCP 客户端, 大脑)
   │  agent_run / task_inbox (HTTP)
   ▼
dsh-harness-mcp-server (MCP server, :8090)
   │  ctx.agents.create → 挂载 'standard' preset
   ▼
Harness agent (flash) — 完整工具集: bash、fs、todo、web…

工具

| 工具 | 方向 | 用途 | |------|-----------|---------| | echo | — | 验证 MCP 连通性 | | harness_list_tools | — | 列出 Harness 已注册的工具名 | | agent_run | Hermes → Harness | 同步执行任务,返回结构化结果 | | task_inbox | Hermes → Harness | 把结构化任务(任务 + 记忆上下文 + cwd)推入异步队列 | | task_result | Hermes ← Harness | 取回队列任务的结构化结果 |

每个任务结果都是结构化的:

{
  "sessionId": "...",
  "assistantText": "最终回答",
  "toolCalls": [{ "name": "bash", "args": "..." }],
  "toolResults": ["命令输出"],
  "changes": "改了什么",
  "verification": "怎么验证的",
  "leftovers": "遗留问题"
}

这打通了「客户端持久记忆 ↔ Harness 编码」的回路:记忆作为 context 喂给每个任务,结果(changes / verification / leftovers)可以写回客户端记忆,供下次续用。

安装

方式 A —— 从 npm(推荐)

npm install @chushixixin/dsh-harness-mcp-server

然后在你的 Harness workspace 里引用该插件(见下方 cordis patch)。

方式 B —— 从源码

把本仓库 clone 到 Harness workspace 的 packages/mcp/harness-mcp-server/ 下(pnpm workspace 匹配 packages/*/*,两级深):

cd /path/to/deepseek-harness
mkdir -p packages/mcp/harness-mcp-server
# 复制本仓库文件进去,然后:
corepack pnpm install

在 tsconfig.host.json 的 references 和 tsconfig.base.json 的 paths 里注册(见 Harness 插件文档),然后构建:

corepack pnpm exec tsc -b packages/mcp/harness-mcp-server
corepack pnpm run build:lib:host

运行

export DEEPSEEK_API_KEY=...
corepack pnpm dsh web --patch ./packages/mcp/harness-mcp-server/cordis.yml

MCP server 监听 127.0.0.1:8090(StreamableHTTP)。任意 MCP 客户端指向 http://127.0.0.1:8090/mcp 即可。

⚠️ 安全警告:默认只监听 127.0.0.1(本机)。它暴露的是未鉴权的远程代码执行能力——在没有加认证、TLS 和反向代理之前,不要绑定 0.0.0.0 或暴露到公网/局域网。

Hermes 客户端配置

printf 'n\nY\n' | hermes mcp add harness_plugin --url http://127.0.0.1:8090/mcp

cordis.yml(patch 格式)

- insert:
    - id: harness-mcp-server
      name: '@chushixixin/dsh-harness-mcp-server'
      config:
        http: true
        port: 8090
        host: 127.0.0.1        # 默认仅本机; 暴露前必须加认证
        # authToken: 'your-secret-token'     # 可选: Bearer token 认证
        # workspaceRoots: ['/workspace']      # 可选: cwd 白名单

定位

它最适合当备用工具,而不是日常主力:日常改代码直接驱动你的主 agent 即可。当需要上下文隔离(大型重构会把客户端上下文撑爆)或并行执行互不相干的任务时,再启用它。

  • agent 会话按 cwd 复用(避免每次调用都重新加载项目上下文——比一次性 dsh headless 省约 15–20 倍)。
  • bash 走沙箱(workspace-write):请在宿主机安装 bubblewrap,否则沙箱会拒绝写命令。
  • 每个新的 MCP 会话拥有独立的 McpServer + transport(一个 MCP McpServer 只能连接一个 transport)。

License

MIT