Skip to main content
Glama

hermes-dsh-bridge

Hermes ↔ DeepSeek Harness를 전용으로 브리징하는 MCP 플러그인: Harness 내부에서 MCP server를 시작하고, 외부 MCP 클라이언트(예: Hermes)가 Harness의 Agent를 구동해 실제 코딩 작업을 수행하게 합니다.

Hermes는 두뇌이고, Harness는 손입니다.

license node CI

왜 필요한가

Harness에는 강력한 Agent 런타임(도구, LLM, Agent, 세션)이 내장되어 있지만, 이는 Cordis 애플리케이션이라 다른 Agent가 호출할 수 없습니다. 이 플러그인은 Harness를 뒤집습니다. 즉, Harness 내부에서 실제 MCP server(StreamableHTTP)를 시작하고, Harness 핵심 서비스(ctx.agents / ctx.agentPresets / ctx.tools)를 브리징하여 외부의 '두뇌'가 실제 작업을 Harness의 '손'에 맡기게 합니다.

Hermes (MCP client, 大脑)
   │  agent_run / task_inbox / fs_read / session_stats ... (HTTP)
   ▼
harness-mcp-server (MCP server, :8090)
   │  ctx.agents.create → mount 'standard' preset
   ▼
Harness agent — 完整工具集: bash, fs, todo, web…

Related MCP server: dsh-harness-mcp-server

도구(19개)

작업

도구

방향

용도

agent_run

→ Harness

작업을 동기 실행하고 구조화된 결과 + 이번 라운드 stats 통계 반환

task_inbox

→ Harness

구조화된 작업(작업+메모리 컨텍스트+cwd)을 비동기 큐로 푸시

task_result

← Harness

큐 작업의 구조화된 결과 반환

task_list

← Harness

비동기 작업 큐 스냅샷(id/status/createdAt/error)

세션

도구

방향

용도

session_list

세션 나열(live+영구 저장 병합), 각 행에 token/LLM 소요 시간 요약

session_log

세션 이벤트 로그 읽기(reasoning 제거됨), tail N개, 유형별 필터링

session_stats

세션 통계: rounds/steps/llmTime/toolTime/ttft/tokensPerSec/cacheHitRate/inputTokens/outputTokens

rename_session

세션 이름 변경(보관/구분을 위해)

attach_session

세션을 작업 공간으로 그룹화

파일(path jail 제약)

도구

방향

용도

fs_read

텍스트 파일 읽기(줄 번호 페이지 분할, path jail + 민감 이름 블랙리스트)

fs_list

폴더 목록(depth만큼 재귀, 민감 항목 자동 숨김)

fs_stat

파일/폴더 메타데이터

fs_write

파일 쓰기(overwrite/append/create-new) — opt-in(enableFsWrite: true일 때만 등록), root로 제한

상태 및 설정

도구

방향

용도

status_get

버전/uptime/provider/model/preset/live agents/큐 깊이

config_get

런타임 구성 요약(authToken은 ***로 마스킹)

프리셋

도구

방향

용도

preset_list

사용 가능한 agent preset 및 기본값 나열

preset_get

세션에 실제로 적용된 preset(또는 기본값) 조회

preset_set

기본 preset(scope=new-default) 또는 빈 세션 프셋(scope=session) 전환

메타

도구

응답

용도

echo

MCP 연결 확인

harness_list_tools

Harness 내부에 등록된 도구 이름 나열

구조화된 결과와 통계

agent_run은 매번 구조화된 결과를 반환하며 이번 라운드 사용량 통계를 함께 반환합니다:

{
  "sessionId": "...",
  "assistantText": "最终回答",
  "toolCalls": [{ "name": "bash", "args": "..." }],
  "toolResults": ["命令输出"],
  "changes": "改了什么",
  "verification": "怎么验证的",
  "leftovers": "遗留问题",
  "stats": {
    "rounds": 1, "steps": 3,
    "llmTime": 13.9, "toolTime": 0.04,
    "ttft": 3349, "tokensPerSec": 40.7,
    "cacheHitRate": 1, "inputTokens": 8831, "outputTokens": 157
  }
}

루프: 클라이언트가 기억을 context로 매번 주입하고, 결과(changes/verification/leftovers)를 다시 클라이언트 기억에 저장해 다음 라운드에 사용합니다.

설치

방법 A — npm에서 Harness profile에 설치

# 在 Harness profile 的 node_modules 下
cd ~/.dsh/profiles/<你的profile>/node_modules
npm install hermes-dsh-bridge

방법 B — 소스 빌드

git clone https://github.com/Emilia-awa/hermes-dsh-bridge.git
cd hermes-dsh-bridge
npm install && npm run build   # 产出 lib/index.js
# 把构建产物放进 Harness profile:
#   ~/.dsh/profiles/<你的profile>/node_modules/hermes-dsh-bridge

⚠️ dual-package hazard(필독): Harness는 전역 트리에서 @deepseek-ai/*를 해석하는 반면, 플러그인 자체 node_modules에 병렬 복사본이 있을 수 있습니다. 두 모듈 인스턴스 ⇒ Symbol 불일치 ⇒ Agent가 도구 전체를 조용히 잃게 됩니다. (증상: agent_run<tool_calls> 텍스트만 출력하고 toolCalls가 계속 빈 배열) 해결법: 플러그인의 @deepseek-ai/* 의존성을 Harness 전역 트리에 symlink하세요:

PROFILE=~/.dsh/profiles/<你的profile>/node_modules
GLOBAL=$(npm root -g)/@deepseek-ai/dsh/node_modules/@deepseek-ai
for pkg in cordis cosmokit dsh-agent dsh-llm dsh-session dsh-tools dsh-scope \
           dsh-agent-presets dsh-code-runtime dsh-system-prompt dsh-typert-protocol \
           dsh-attachment dsh-brand dsh-invariants dsh-timeout dsh-settings \
           dsh-home-paths dsh-atomic-write dsh-user-approval \
           cordis-plugin-include cordis-plugin-loader; do
  rm -rf "$PROFILE/@deepseek-ai/$pkg" && ln -sfn "$GLOBAL/$pkg" "$PROFILE/@deepseek-ai/$pkg"
done

(cordis-plugin-include/loader는 npm registry에 게시되지 않았고 Harness 전역 트리에만 존재하므로 반드시 symlink해야 합니다.)

버전 설정 방법

Harness 프로파일의 cordis.patch.yml(또는 동일한 patch 파일) 끝에 다음을 추가하세요:

- insert:
    - id: hermes-dsh-bridge
      name: 'hermes-dsh-bridge'
      config:
        http: true
        port: 8090
        host: 127.0.0.1        # 默认仅本机; 暴露前必须加认证
        # authToken: '你的随机长token'     # 可选: Bearer token 认证
        # workspaceRoots: ['/workspace']  # 可选: cwd 白名单
        # enableFsWrite: true             # 可选: 开启 fs_write(默认关)
        # ⚠️ 必须显式声明 provider/model, 否则 agent 组装会因空 {{model}} 崩溃:
        provider: opencode-go
        model: deepseek-v4-flash

재시작 및 검증

systemctl restart dsh.service        # 或你管理 Harness 的方式
# 验证 19 个工具全在线:
python3 examples/hermes_dsh_mcp.py list
python3 examples/hermes_dsh_mcp.py call status_get '{}'

🤖 AI 한 번 설치 가이드(AI Agent용 설치)

다음 절차는 또 다른 AI Agent를 위한 것입니다. 당신이 Harness 환경을 관리하는 AI Agent라면 이 플러그인을 설치할 때 아래 번호 절차를 엄격히 따르고, 각 단계 결과를 확인한 뒤 다음 단계로 진행하세요.

전제 확인(먼저 3단계)

  1. Node ≥ 22.18 확인: node --version(22.18 미만이면 zstd/stripTypeScriptTypes 부재 오류가 나므로 먼저 업그레이드)

  2. 대상 Harness profile 존재 확인: ls ~/.dsh/profiles/(설치할 profile 이름을 찾아 아래 <PROFILE>로 대체)

  3. Harness 전역 트리 존재 확인: npm root -g(아래 $GLOBAL_TREEnpm root -g를 의미)

설치 순서(복사해서 실행)

# ① 安装插件到 profile
cd ~/.dsh/profiles/<PROFILE>/node_modules
npm install hermes-dsh-bridge        # 未发布到 npm 前用方式 B(源码)

# ② 修复 dual-package hazard: 把所有 @deepseek-ai/* 和 cordis-plugin-* symlink 到全局树
GLOBAL_TREE=$(npm root -g)/@deepseek-ai/dsh/node_modules/@deepseek-ai
for pkg in cordis cosmokit dsh-agent dsh-llm dsh-session dsh-tools dsh-scope \
           dsh-agent-presets dsh-code-runtime dsh-system-prompt dsh-typert-protocol \
           dsh-attachment dsh-brand dsh-invariants dsh-timeout dsh-settings \
           dsh-home-paths dsh-atomic-write dsh-user-approval \
           cordis-plugin-include cordis-plugin-loader; do
  rm -rf "@deepseek-ai/$pkg" 2>/dev/null
  ln -sfn "$GLOBAL_TREE/$pkg" "@deepseek-ai/$pkg"
done

# ③ 在 profile 的 cordis patch 文件(cordis.patch.yml)末尾追加配置
cat >> ~/.dsh/profiles/<PROFILE>/cordis.patch.yml <<'EOF'
- insert:
    - id: hermes-dsh-bridge
      name: 'hermes-dsh-bridge'
      config:
        http: true
        port: 8090
        host: 127.0.0.1
        provider: opencode-go      # ← 换成你自己的 provider id
        model: deepseek-v4-flash   # ← 换成你自己的 model id
EOF

# ④ 重启 Harness(注意: 若你正跑在 Harness 里, 用 systemd-run 脱离进程树重启)
systemctl restart dsh.service

# ⑤ 验证: 等 8 秒后检查 MCP server 起来 + 工具列表
sleep 8
curl -s -X POST http://127.0.0.1:8090/mcp \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"ai-setup","version":"1.0"}}}' \
  | tail -1 | head -c 300
python3 examples/hermes_dsh_mcp.py list | grep -cE "agent_run|session_stats|preset_set"   # 期望 ≥ 3

수락 기준

  • dsh_mcp.py list 출력이 19개 이상, 반드시 agent_run, session_log, preset_set, fs_read 포함.

  • status_getversion0.3.0, provider/model이 설정한 값.

  • 스모크 작업 python3 examples/hermes_dsh_mcp.py run '回复:安装成功' 실행 결과에 stats 필드 존재.

흔한 실패와 대책 (발생 시 참조)

증상

원인

대책

agent_run이 텍스트를 반환하지만 toolCalls가 항상 비어 있음

dual-package hazard, symlink가 npm 재설치로 풀림

②단계 symlink 다시 실행, 재시작

시작 시 prompt variable "{{model}}" has no value

patch에 provider/model가 없음

③단계 provider/model 기입

MISSING_CREDENTIAL: <provider>

API key가 Harness 프로세스 env에 주입되지 않음

systemd unit에 Environment=KEY=... 추가 또는 export

Cannot find package '@deepseek-ai/cordis-plugin-include'

②단계에서 cordis-plugin-* 누락

symlink로 두 패키지 추가

버전 번호는 맞지만 이전처럼 동작

시스템에 npm 전역 트리가 두 개 존재, 잘못된 트리에 설치

which dsh + npm prefix -g 확인, 실제 기동 트리로 통일

전체 해석은 docs/TROUBLESHOOTING.md를 참조하세요.

문서

위치

**주력이 아닌 **백업 도구로 적합합니다. 일상 코드 수정은 메인 Agent를 직접 구동하세요. 컨텍스트 격리(대규모 리팩토링 시 클라이언트 컨텍스트 부담이 커질 때) 또는 병렬 실행이 필요한 관련 작업을 분리해야 할 때 사용하세요.

  • Agent 会话按 cwd 复用 (매 호출 시 프로젝트 컨텍스트 재로딩을 피함).

  • Bash 샌드박스(workspace-write): 호스트에 bubblewrap 설치 여부에 따라 쓰기 명령이 거부될 수 있음.

  • reasoning/thinking block은 반환 전에 제거 (플러그인 측 + 텍스트 수준 이중 필터).

라이선스

GPL-3.0-only, upperside MIT 보존 — NOTICE.md 참조.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Emilia-awa/hermes-dsh-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server