0Pricing
MCP Academy · Lesson

Notify Clients of Updates

Signal when a resource's contents have changed.

Notify Clients of Updates is a free MCP Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MCP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Data Doesn't Sit Still

Resources change: a file is edited, a record updates. MCP lets a server notify clients so they don't keep reading stale content. 🔔

Notifications Are One-Way

An update signal is a notification: a JSON-RPC message with no id and no reply. The server tells the client something happened and moves on.

Subscribe First

A client opts in by calling resources/subscribe for a specific URI. Only then does the server bother sending updates about that resource.

{"method": "resources/subscribe",
 "params": {"uri": "file://notes.txt"}}

The Updated Signal

When a watched resource changes, the server sends resources/updated carrying the URI. It says what changed, but not the new content itself.

{"method": "notifications/resources/updated",
 "params": {"uri": "file://notes.txt"}}

Notify, Then Re-Read

The pattern is two steps: the server notifies, then the client decides to re-read. This keeps payloads tiny and lets the client control timing.

The List Can Change Too

Sometimes the whole catalog shifts as resources appear or vanish. The server sends a list_changed notification so the client refreshes its listing.

{"method":
 "notifications/resources/list_changed"}

Capabilities Gate It

These features are negotiated up front. A server advertises subscribe and listChanged support during initialize, so both sides know what's possible.

Unsubscribe to Stop

When a client no longer cares, it calls resources/unsubscribe for that URI. The server then stops sending updates, saving needless traffic.

{"method": "resources/unsubscribe",
 "params": {"uri": "file://notes.txt"}}

Fire on Real Change

Send an update only when content actually changes. Noisy, needless notifications waste the client's effort and can trigger pointless re-reads.

Watch the Source

To know when to notify, your server watches the source, such as a file watcher or a database trigger, then emits an updated signal in response.

Why This Matters

Update notifications turn a resource into something live. The model stays in sync with reality without polling, keeping its context honest. 🎯

Quick Check

What does a resources/updated notification include?

Recap

You learned how clients subscribe, receive updated and list_changed notifications, and re-read on demand, keeping dynamic resources fresh and live. Course complete! 🚀

Frequently asked questions

Is the “Notify Clients of Updates” lesson free?

Yes — the full text of “Notify Clients of Updates” is free to read here on the web, and the MCP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MCP Academy course, upgrade to CoddyKit PRO.

What will I learn in “Notify Clients of Updates”?

Signal when a resource's contents have changed. You practise MCP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start MCP Academy?

No prior experience is required. MCP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Notify Clients of Updates” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this MCP Academy lesson?

Yes. Every MCP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Parameterized Resource URIs
  2. Build Content at Read Time
  3. List vs Templated Resources
  4. Notify Clients of Updates
← Back to MCP Academy