Pagination & Subscriptions — Resources
← Back to Dashboard
1. Resource Fundamentals2. Resource Templates3. Pagination & Subscriptions
Pagination & Subscriptions
Pagination via Cursors
For API endpoints that return massive lists, MCP supports cursor-based pagination. If a resource list response contains too much data, the server returns a nextCursor.
const listResources = async (cursor?: string) => {
const result = await db.query({ limit: 100, cursor });
return {
resources: result.items.map(toResource),
nextCursor: result.nextCursor
};
};
Resource Subscriptions & Cache Hints
MCP supports real-time updates! In 2024-11-05–2025-11-25, clients subscribed to individual URIs via resources/subscribe and received notifications/resources/updated. In the 2026-07-28 stateless specification, individual subscribe RPCs were unified into a single filtered stream via subscriptions/listen, and list responses can include HTTP-friendly cache hints (ttlMs and cacheScope).
⌨ HANDS-ON LABSubscribe to Resource Update Notifications
⭐ +150 XPSubscribe to real-time resource change notifications on a dynamic file URI.
1Send resources/subscribe request over stdio.
OBJECTIVE 1 / 1 — type "hint" if stuck
🧪 Knowledge Check
Press 1-4 to select1 of 3
How does MCP handle massive lists of resources limit-checking?
It streams them over WebSockets.
It zips them into a single file.
It uses standard cursor-based pagination.
It truncates data after 1000 items.