You leave. The watch does not. Persist a cursor, come back later, get only what you missed — a page, an RSS feed, a crypto price, or SEC filings. No API key, no account, no subscription: your agent pays per call in USDC.
MCP serverREST APIx402 · USDC on Base
AI agents are ephemeral. They wake up, run for a few seconds, and disappear — so they cannot keep watching anything. Any task shaped like "tell me when this changes" normally requires a server, a scheduler, and a state database that the agent doesn't have. longwatch is that infrastructure, rented by the call.
Your agent stores a single integer — the cursor. It can crash, restart tomorrow on different hardware, and resume exactly where it left off by asking "what's new since #7?"
| Watch type | What it does |
|---|---|
url | Monitor a website for changes — alerts when the page's text changes, including which lines were added and removed. Good for pricing pages, docs, status pages, policy updates. |
rss | RSS / Atom feed monitoring — an alert for each new item, with title, link, and publish date. |
price | Crypto price alerts — fires when a coin crosses a threshold or moves more than N% in 24h. Edge-detected, so a price sitting on the line alerts once, not fifty times. |
edgar | SEC filing alerts — every new EDGAR filing by a ticker, filterable by form. 8-K item codes are decoded (2.02 earnings, 5.02 officer departure). Form 4 insider trades are parsed from the filing: who traded, open-market buy or sell versus a grant, shares, price, total value, and whether it ran under a scheduled 10b5-1 plan. |
Look something up (GET /check) | $0.001 USDC |
| Create a watch | $0.005 USDC |
| Poll for alerts | $0.001 USDC |
GET /demo · 24h trial watch · delete · MCP connect | free |
An agent polling once an hour costs about 72¢ a month. Payment is x402: your agent's wallet pays per request, so there is nothing to sign up for and no key to rotate.
You should not have to fund a crypto wallet to find out whether something is useful.
A free NVDA 8-K + Form 4 sample, no query string:
curl https://longwatch.dev/demo
Or one free standing watch per caller — it runs for 24 hours and polling it is free.
curl -X POST https://longwatch.dev/try \
-H 'content-type: application/json' \
-d '{"type":"edgar","ticker":"NVDA","forms":["8-K","4"]}'
# then, whenever you like:
curl "https://longwatch.dev/try/<watch_id>?since=0&key=<key>"
Come back in an hour and poll the trial watch to see real alerts land. When you want something permanent, the paid API below is the same shape.
A one-shot is for this session. A standing watch is for a daemon, cron job, or scheduled agent that can persist two values — watch_id and key — and poll later. Chat sessions that die in thirty seconds should use /check or /demo.
curl -X POST https://longwatch.dev/watches \
-H 'content-type: application/json' \
-d '{"type":"edgar","ticker":"NVDA","forms":["8-K","4"]}'
# response includes the baseline. later:
curl "https://longwatch.dev/watches/<watch_id>/alerts?since=<cursor>&key=<key>"
Create waits for the first check so you are not polling an empty list. A watch you never poll expires after 7 days.
There is no account to create and no API key to obtain. Instead your agent pays per request from a wallet, so the one prerequisite is a wallet holding USDC on Base and a client that speaks x402. If you already use an agent wallet — AgentCash, a Circle agent wallet, or Coinbase CDP — you have both already and can call us right now. Payments are per request: no minimum, no subscription, nothing to cancel.
If your MCP client handles x402 (AgentCash does), point it at the endpoint below and call the tools. Payment happens automatically per call and there is nothing else to set up.
# AgentCash CLI — handles the 402 challenge, payment and retry agentcash fetch https://longwatch.dev/check?type=edgar&ticker=NVDA&forms=8-K,4
// JavaScript — x402-fetch wraps fetch with payment
import { wrapFetchWithPayment } from "x402-fetch";
const pay = wrapFetchWithPayment(fetch, account); // your funded wallet
const watch = await pay("https://longwatch.dev/watches", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ type: "edgar", ticker: "NVDA", forms: ["8-K", "4"] }),
}).then((r) => r.json());
// then poll whenever you like, passing the cursor you last saw
const news = await pay(watch.poll_url).then((r) => r.json());
Every response is normal JSON — the payment happens in a header, so you are not writing crypto code, just paying for a request.
For paid writes such as POST /watches, send a unique
Idempotency-Key header. Retrying the same signed x402 request with that key returns the
original result without charging or creating the watch twice. A retry with a new payment
authorization still cannot create the watch twice.
Point any MCP client at https://longwatch.dev/mcp (Streamable HTTP). Connecting and listing tools is
free — you only pay when a paid tool runs.
{
"mcpServers": {
"longwatch": { "url": "https://longwatch.dev/mcp" }
}
}
Tools: check_now ($0.001), create_watch ($0.005), poll_alerts ($0.001), try_watch / poll_trial (free), delete_watch (free).
Paid routes return 402 unless the request settles via x402 — $0.001 to look up or poll, $0.005 to create a watch. GET /demo and POST /try are free.
GET https://longwatch.dev/check?type=edgar&ticker=NVDA&forms=8-K,4
→ {"result":{"filings":[{"form":"4","summary":"…","insider":{…}}]}, "watch":{"create":"POST /watches"}}
POST https://longwatch.dev/watches
{"type": "edgar", "ticker": "NVDA", "forms": ["8-K", "4"]}
→ {"watch_id": "…", "key": "…", "cursor": 1, "alerts": [{"kind":"baseline",…}], "poll_url": "…"}
Poll the poll_url on whatever schedule you like. Each response carries a
cursor; pass it back as since to receive only what is new.
GET https://longwatch.dev/watches/{id}/alerts?since=7&key=…
→ {"cursor": 9, "alerts": [{"seq": 8, "kind": "filing", "form": "8-K", "url": "https://www.sec.gov/…"}]}
Those require a human to create an account and enter a credit card. An autonomous agent cannot do that. Here the agent decides at runtime that it needs a filing or a standing watch and calls us from its own wallet — no signup, no API key, no human in the loop.
Most agents have no public address to receive a webhook at, and no process running to receive it. Polling with a cursor means the agent pulls on its own schedule and never misses events that occurred while it wasn't running.
Transient failures are retried silently. After repeated failures the watch reports a
watch_error alert with the reason, and a watch_recovered alert when it
starts working again — so your agent learns about broken sources instead of silently seeing nothing.
Watches expire after 7 days without a poll; polling one revives it. Alert history keeps the most recent 500 events per watch.
GET https://longwatch.dev/ with Accept: application/json — service manifest ·
/docs ·
/developers ·
/openapi.json ·
/manifest.json ·
/.well-known/x402.json ·
/llms.txt ·
/agents.md ·
/pricing.md ·
MCP server card ·
AI catalog ·
listed in the x402 Bazaar ·
contact: contact@coinop.dev