简介
本地 MCP stdio 文件桥接服务,提供 inbox/tmp/outbox 三目录工作流,安全隔离的文件中转与处理能力
原始描述
Stdin/stdout file inbox/outbox bridge for passing files to/from Clawdbot using an MCP stdio server. Use when you want a simple filesystem-backed dropbox: accept files into an inbox, move to tmp for processing, and emit deliverables to an outbox (or a specified path).
中文使用说明 来自收录源
核心用法
stdio-skill 是一个基于 MCP(Model Context Protocol)stdio 服务器的本地文件流转工具。它通过三个预设目录构建简单的工作流:用户将待处理文件放入 stdio/inbox/,Agent 读取后移至 stdio/tmp/ 进行处理,最终将成果输出到 stdio/outbox/。工具集包含 stdio_list(查看待处理文件)、stdio_read(base64 读取内容)、stdio_move(认领并移动文件)和 stdio_write(base64 写入输出)。整个交互通过 mcporter 管理,无需手动启停服务。
显著优点
极致轻量与隔离:零外部依赖,仅使用 Node.js 原生 fs 与 path 模块,供应链攻击面几乎为零。目录沙箱机制确保文件操作严格限定在三个预设路径内,配合路径遍历防护(过滤 ..、/、\ 等字符),安全性有基础保障。
无网络风险:无任何出站网络请求,数据完全本地流转,天然符合隐私合规要求(GDPR/CCPA 均通过),适合敏感文件处理场景。
工作流清晰:inbox-tmp-outbox 的三段式设计与 Unix 哲学契合,状态转换明确,便于调试和审计。
潜在缺点与局限性
功能极简:不解析任何文件格式,纯字节流搬运,用户需自行处理文件内容的解析与转换。无并发控制或锁机制,多进程同时操作同一文件可能引发竞态条件。
可扩展性受限:目录结构硬编码为 workspace 相对路径,无法灵活配置到其他位置。缺乏元数据管理(如处理状态标记、版本追踪),复杂工作流需额外封装。
大文件处理体验一般:虽然建议通过 move 操作避免 base64 嵌入,但读取/写入接口仍以 base64 为主,超大文件(GB 级)可能面临内存与性能瓶颈。
适合的目标群体
- 需要为 AI Agent 搭建本地文件投递管道的开发者
- 追求零依赖、可审计文件流转方案的安全敏感团队
- 构建离线/内网环境下自动化工作流的技术人员
- 希望快速原型验证 MCP 协议与文件交互的实验者
使用风险
性能风险:大量小文件或超大文件的 base64 编解码可能占用较高 CPU 与内存;建议遵循官方指引,优先使用 move 而非 read/write 处理大文件。
并发风险:无内置文件锁,多 Agent 或多进程同时操作同一 inbox 文件可能导致覆盖或重复处理,需在外层实现协调机制。
维护风险:当前版本未指定开源许可证(LICENSE),且缺少 CHANGELOG 与单元测试,长期维护的透明度与可持续性存疑。
路径配置风险:虽实现了路径遍历防护,但若 workspace 根目录本身被恶意替换,仍可能间接影响操作范围(此为使用环境层面的通用风险,非技能本身缺陷)。
技能正文
name: stdio-skill description: "Stdin/stdout file inbox/outbox bridge for passing files to/from Clawdbot using an MCP stdio server. Use when you want a simple filesystem-backed dropbox: accept files into an inbox, move to tmp for processing, and emit deliverables to an outbox (or a specified path)."
stdio-skill
Implement and use a local MCP stdio server that provides a simple inbox/outbox workflow backed by directories on disk.
Paths (workspace-relative):
stdio/inbox/— user drops inputs herestdio/tmp/— scratch area (move/copy inputs here for processing)stdio/outbox/— put deliverables here for pickup
Start the MCP server (via mcporter)
This repo config should include an MCP server named stdio-skill.
- List tools:
mcporter list stdio-skill --schema --timeout 120000 --json
Tooling model
Prefer:
stdio-skill.stdio_listto see what’s waiting.stdio-skill.stdio_read(base64) to pull file contents.stdio-skill.stdio_moveto move an item totmponce you’ve claimed it.- Write outputs with
stdio-skill.stdio_write(base64) intooutboxunless the user provided an explicit destination path.
No deprecated aliases: use the stdio_* tools only.
Notes
- This skill is intentionally dumb/simple: it does not interpret file formats.
- It is safe-by-default: operations are restricted to the three directories above.
- For large files: prefer passing by path + moving files, not embedding giant base64 blobs in chat.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。
其他来源收录
同一技能在不同目录的原始页面: