dsh-inbox-mcp
# dsh-inbox-mcp
DSH inbox MCP(stdio):外部 agent 向运行中的 `dsh web` 投递 queue/steer/task ——
**dsh-boss 的 delegate_task 依赖的配套 transport**。
## 装
```bash
npm install -g dsh-inbox-mcp # 或 npx dsh-inbox-mcp
```
mcp.json(客户端配置):
```json
{
"mcpServers": {
"dsh-inbox": {
"command": "dsh-inbox-mcp",
"env": {
"DSH_INBOX_URL": "http://127.0.0.1:3080",
"DSH_INBOX_HOUSE": "dsh-local",
"DSH_INBOX_TRUST": "与 dsh web 端一致的 trust_id(可选,设了才校验)"
}
}
}
}
```
## 工具
- `dsh_inbox_deliver` — 向指定/最近 session 投递消息(kind: auto | steer | task)
- `dsh_inbox_status` — 查询 session 运行状态 / title / house / trust_required
## 安全
- **门牌 + trust**:`DSH_INBOX_HOUSE`/`DSH_INBOX_TRUST`(env)——本地共享信任串,
不是完整鉴权;未设 trust 时 gate 关闭(dev open)
- **危险命令拦截**:`rm -rf` / `curl|sh` / `powershell -enc` / 私钥头 / api-key 模式
等默认 deny 列表,投递前拒绝(`DSH_INBOX_DENY` 可追加)
- **回环默认**:`127.0.0.1:3080`,仅供本机/内网 MCP
## 开发
```bash
npm install
npm run build # tsc → dist + node shebang
npm test # 信任/deny 逻辑 7 用例
```
## 许可
MIT
TDQS
Scored across 2 tools
dsh_inbox_status reads/polls session state while dsh_inbox_deliver writes/sends a prompt; there is no overlap in their actions. An agent can easily choose the right tool based on whether it needs to observe or act.
Both tools share the clear dsh_inbox_ prefix and use snake_case, so they are instantly recognizable as part of one server. The minor deviation is that one name uses a noun (status) and the other uses a verb (deliver), rather than a uniform verb_noun pattern.
Two tools is at the low end of the acceptable range and feels thin for a general MCP surface. For the narrow status-and-deliver purpose the count is reasonable, but it is borderline rather than solidly well-scoped.
The core poll-and-deliver loop is covered: status tells whether the session is ready or busy, and deliver handles the different queueing modes. Mino gaps exist around inspecting queued messages or listing multiple sessions, but agents can generally work around these.