
Mcp Await
io.github.ricardo-hdrn由 GitHub 账号 ricardo-hdrn 发布v0.1.3更新于 Oct 24, 2026
Condition watcher for AI assistants — wait for ports, files, URLs, processes, and more
概览
本地 MCP 服务器兼命令行工具,让助手等待某个条件满足:端口、文件事件、URL 状态、进程、Docker 容器、GitHub Actions 运行或 shell 命令。
- 可以做什么
- 等待网络与服务就绪:TCP 端口和带预期 HTTP 状态的 URL,可选非阻塞模式,返回 watch ID 与资源 URI 供稍后读取或取消。
- 适用场景
- 当助手需要先等待服务、部署、文件、进程、容器或 CI 运行完成再继续时使用,避免编写浪费往返的 sleep 或重试循环。
- 运行要求
- 作为本地进程在用户机器上运行,可通过预编译二进制、crates.io 或源码安装。部分工具依赖 PATH 中的外部程序:URL 等待需要 curl,容器等待需要 docker,GitHub Actions 等待需要 gh。未声明账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Await,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-await
Condition watcher MCP server + CLI for AI CLI assistants (Claude Code, Codex, Cursor, etc.).
Instead of polling with sleep loops and curl --retry that waste API round-trips, call a wait tool once — it blocks until the condition is met and returns the result.
Installation
Quick Start
Tools
All tools accept timeout_seconds (default: 300) and blocking (default: true).
CLI Usage
The binary doubles as a standalone CLI tool:
Exit Codes
Output Format
All commands output JSON:
MCP Server Setup
Claude Code
Add to ~/.claude.json:
The binary runs as a stdio MCP server when invoked without a subcommand (or with mcp-await serve).
MCP Inspector
Blocking vs Non-Blocking Mode
Blocking (default)
The tool call holds until the condition is met, times out, or is cancelled. This is the simplest mode — the AI assistant waits for the result.
Non-Blocking
Set blocking: false to get an immediate response with a watch_id and resource URI. The server monitors in the background and pushes a notification when done.
Flow:
- Call
wait_for_portwithblocking: false - Get back immediately:
- Do other work while waiting
- Receive
notifications/resources/updatedwhen the condition is met - Read
watch://port-1for the full result
Cancellation
Cancel any non-blocking watch with cancel_watch:
Resources
Non-blocking watches are exposed as MCP resources at watch://{watch_id}.
list_resources— returns all active and completed watchesread_resource("watch://port-1")— returns JSON with the watch status and result
Reinforcing Agent Usage
Agents sometimes fall back to shell workarounds instead of using mcp-await. Add a snippet to your project's agent instructions file to reinforce the behavior:
Roadmap
- Agent-level instructions to enforce mcp-await usage across all agents (system prompts, tool metadata hints)
- Broader agent compatibility testing (Codex, Gemini CLI, Cursor, Windsurf)
Development
License
来源:README.md,提交 8dbd6d0
工具
0版本历史
1- v0.1.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分