What is Mcp Await?
Mcp Await is a condition-watcher MCP server and CLI for AI CLI assistants (Claude Code, Codex, Cursor, etc.). Instead of polling with loops and retries, it blocks until a condition (e.g., port open, file created, command succeeds) is met and returns the result.
How to use Mcp Await?
Install via cargo install mcp-await or download a prebuilt binary from GitHub Releases. Run as a CLI with subcommands like mcp-await port localhost 8080 --timeout 30 or as a stdio MCP server by invoking the binary without a subcommand (or with mcp-await serve). Configure it in Claude Code by adding the binary path to ~/.claude.json under mcpServers.
Key features of Mcp Await
- Wait for TCP ports to accept connections.
- Watch file events (create, modify, delete) using inotify.
- Wait for HTTP URLs to return an expected status code.
- Wait for processes to exit via PID.
- Wait for Docker containers to exit.
- Supports blocking and non-blocking watch modes.
Use cases of Mcp Await
- Deployments: wait for a service to be ready before proceeding.
- File-based synchronization: wait for a lock file to appear or be modified.
- CI/CD: wait for a Docker container or GitHub Actions run to finish.
- Custom scripts: wait for any shell command to succeed (exit 0).
评论