hermes-dsh-bridge
hermes-dsh-bridge
Hermes ↔ DeepSeek Harness를 전용으로 브리징하는 MCP 플러그인: Harness 내부에서 MCP server를 시작하고, 외부 MCP 클라이언트(예: Hermes)가 Harness의 Agent를 구동해 실제 코딩 작업을 수행하게 합니다.
Hermes는 두뇌이고, Harness는 손입니다.
왜 필요한가
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개)
작업
도구 | 방향 | 용도 |
| → Harness | 작업을 동기 실행하고 구조화된 결과 + 이번 라운드 |
| → Harness | 구조화된 작업(작업+메모리 컨텍스트+cwd)을 비동기 큐로 푸시 |
| ← Harness | 큐 작업의 구조화된 결과 반환 |
| ← Harness | 비동기 작업 큐 스냅샷(id/status/createdAt/error) |
세션
도구 | 방향 | 용도 |
| ← | 세션 나열(live+영구 저장 병합), 각 행에 token/LLM 소요 시간 요약 |
| ← | 세션 이벤트 로그 읽기(reasoning 제거됨), tail N개, 유형별 필터링 |
| ← | 세션 통계: rounds/steps/llmTime/toolTime/ttft/tokensPerSec/cacheHitRate/inputTokens/outputTokens |
| ← | 세션 이름 변경(보관/구분을 위해) |
| ← | 세션을 작업 공간으로 그룹화 |
파일(path jail 제약)
도구 | 방향 | 용도 |
| ← | 텍스트 파일 읽기(줄 번호 페이지 분할, path jail + 민감 이름 블랙리스트) |
| ← | 폴더 목록(depth만큼 재귀, 민감 항목 자동 숨김) |
| ← | 파일/폴더 메타데이터 |
| → | 파일 쓰기(overwrite/append/create-new) — opt-in( |
상태 및 설정
도구 | 방향 | 용도 |
| ← | 버전/uptime/provider/model/preset/live agents/큐 깊이 |
| ← | 런타임 구성 요약(authToken은 |
프리셋
도구 | 방향 | 용도 |
| ← | 사용 가능한 agent preset 및 기본값 나열 |
| ← | 세션에 실제로 적용된 preset(또는 기본값) 조회 |
| → | 기본 preset( |
메타
도구 | 응답 | 용도 |
| — | MCP 연결 확인 |
| — | 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단계)
Node ≥ 22.18 확인:
node --version(22.18 미만이면 zstd/stripTypeScriptTypes부재 오류가 나므로 먼저 업그레이드)대상 Harness profile 존재 확인:
ls ~/.dsh/profiles/(설치할 profile 이름을 찾아 아래<PROFILE>로 대체)Harness 전역 트리 존재 확인:
npm root -g(아래$GLOBAL_TREE는npm 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_get의version이0.3.0,provider/model이 설정한 값.스모크 작업
python3 examples/hermes_dsh_mcp.py run '回复:安装成功'실행 결과에stats필드 존재.
흔한 실패와 대책 (발생 시 참조)
증상 | 원인 | 대책 |
| dual-package hazard, symlink가 npm 재설치로 풀림 | ②단계 symlink 다시 실행, 재시작 |
시작 시 | patch에 provider/model가 없음 | ③단계 provider/model 기입 |
| API key가 Harness 프로세스 env에 주입되지 않음 | systemd unit에 |
| ②단계에서 cordis-plugin-* 누락 | symlink로 두 패키지 추가 |
버전 번호는 맞지만 이전처럼 동작 | 시스템에 npm 전역 트리가 두 개 존재, 잘못된 트리에 설치 |
|
전체 해석은 docs/TROUBLESHOOTING.md를 참조하세요.
문서
docs/TOOLS.md — 19개 도구 전체 참조(인자/출력/제한/오류 코드)
docs/CONFIG.md — 설정 항목, 안전 기본값
docs/TROUBLESHOOTING.md — 알려진 함정(SSE 파싱, 8KB 컷, dual-package hazard…)
docs/SECURITY.md — 위협 모델
examples/hermes_dsh_mcp.py — 0-dependency Python MCP client(표준 라이브러리만)
위치
**주력이 아닌 **백업 도구로 적합합니다. 일상 코드 수정은 메인 Agent를 직접 구동하세요. 컨텍스트 격리(대규모 리팩토링 시 클라이언트 컨텍스트 부담이 커질 때) 또는 병렬 실행이 필요한 관련 작업을 분리해야 할 때 사용하세요.
Agent 会话按 cwd 复用 (매 호출 시 프로젝트 컨텍스트 재로딩을 피함).
Bash 샌드박스(
workspace-write): 호스트에bubblewrap설치 여부에 따라 쓰기 명령이 거부될 수 있음.reasoning/thinking block은 반환 전에 제거 (플러그인 측 + 텍스트 수준 이중 필터).
라이선스
GPL-3.0-only, upperside MIT 보존 — NOTICE.md 참조.
This server cannot be installed
Maintenance
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
- FlicenseNot gradedqualityAmaintenanceAn experimental MCP gateway for controlling durable DeepSeek Harness agent sessions from MCP clients, enabling session creation, observation, steering, and resumption across chat sessions.4
- AlicenseNot gradedqualityAmaintenanceExposes DeepSeek Harness agent capabilities as an MCP server, letting any MCP client drive Harness to execute real coding tasks with structured results, context isolation, and parallel execution.8MIT
- AlicenseNot gradedqualityCmaintenanceExposes DeepSeek Harness's coding agent as a model backend via MCP, with user-confirmed task execution and self-inspection/config-patch tools.MIT
- FlicenseNot gradedqualityCmaintenanceExposes DeepSeek Harness skill and agent preset management as an MCP server, letting remote agents read, create, update, and delete skills/presets over HTTP with audit logging. It enables a production-to-review-to-modification workflow without SSH.
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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