Condition watcher for AI assistants β wait for ports, files, URLs, processes, and more
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.

| Tool | Key Params | How it watches |
|---|---|---|
wait_for_port | host, port | TCP dial loop, 500ms interval |
wait_for_file | path, event (create/modify/delete) | inotify via notify crate, no polling |
wait_for_url | url, expected_status (default 200) | curl loop, 2s interval (requires curl) |
wait_for_pid | pid | /proc/{pid} check, 500ms interval |
wait_for_docker | container | docker wait (requires docker) |
wait_for_gh_run | run_id, repo (optional) | gh run watch (requires gh) |
wait_for_command | command, interval_seconds (default 5) | Re-run via sh -c until exit 0 |
cancel_watch | watch_id | Cancels a non-blocking watch |
All tools accept timeout_seconds (default: 300) and blocking (default: true).
The binary doubles as a standalone CLI tool:
| Code | Meaning |
|---|---|
| 0 | Condition met (success) |
| 1 | Timeout |
| 2 | Error |
All commands output JSON:
Add to ~/.claude.json:
The binary runs as a stdio MCP server when invoked without a subcommand (or with mcp-await serve).
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.
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:
wait_for_port with blocking: falsenotifications/resources/updated when the condition is metwatch://port-1 for the full resultCancel any non-blocking watch with cancel_watch:
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 resultAgents 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:
| Agent | Instructions file |
|---|---|
| Claude Code | CLAUDE.md |
| Codex | AGENTS.md |
| Gemini CLI | GEMINI.md |
| Cursor | .cursor/rules/ |
| Windsurf | .windsurfrules |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-await)<a href="https://allmcps.com/mcp/mcp-await"><img src="https://allmcps.com/api/badge/mcp-await?style=directory" alt="MCP Await on AllMCPs" /></a>