You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Follow pagination cursors when vMCP queries backends #5746
Part of #5743 (Workstream B: 2025-11-25 compliance).
Gap
vMCP queries backends with single tools/list / resources/list / prompts/list calls and never follows nextCursor (pkg/vmcp/client/client.go, queryTools/queryResources/queryPrompts). Backends that paginate get silently truncated after page 1 — missing tools with no error.
This got more urgent with the go-sdk migration: go-sdk-based servers paginate tools/list at 1000 by default, so truncation now happens against our own servers too.
Proposed work
Loop on nextCursor in all three query paths until exhausted (with a sane upper bound to protect against misbehaving backends).
Closing as completed — this was implemented but the issue was never auto-closed (the PR used Refs, not Closes).
Implemented by #5851 ("Follow list pagination cursors in vMCP capability discovery", commit cab6e171), later extended by #5875.
The fix does exactly what this issue asked:
A generic pagination.ListAll helper (pkg/vmcp/internal/pagination/pagination.go) follows nextCursor to exhaustion, with the requested safety bound (repeated-cursor abort + a maxIterations cap).
All three query paths now loop cursors — queryTools / queryResources / queryPrompts (plus queryResourceTemplates) in pkg/vmcp/client/client.go, and the per-session connector in pkg/vmcp/session/internal/backend/mcp_session.go.
A paginating fake-backend test was added (test/integration/vmcp/pagination_regression_test.go, un-skipped and strengthened to assert the full 1100-tool set with distinct names + last-tool routing), plus unit tests for pagination.ListAll and the per-session path.
Activity
JAORMX commentedon Jul 23, 2026
Closing as completed — this was implemented but the issue was never auto-closed (the PR used
Refs, notCloses).Implemented by #5851 ("Follow list pagination cursors in vMCP capability discovery", commit
cab6e171), later extended by #5875.The fix does exactly what this issue asked:
pagination.ListAllhelper (pkg/vmcp/internal/pagination/pagination.go) followsnextCursorto exhaustion, with the requested safety bound (repeated-cursor abort + amaxIterationscap).queryTools/queryResources/queryPrompts(plusqueryResourceTemplates) inpkg/vmcp/client/client.go, and the per-session connector inpkg/vmcp/session/internal/backend/mcp_session.go.test/integration/vmcp/pagination_regression_test.go, un-skipped and strengthened to assert the full 1100-tool set with distinct names + last-tool routing), plus unit tests forpagination.ListAlland the per-session path.Verified present on
main.