Skip to content

vMCP backend queries do not follow pagination cursors (silent truncation past 1000 tools) #5771

Description

@JAORMX

Context

While writing regression tests for the mcp-go → go-sdk migration (#5742), a pagination regression was discovered.

Finding

pkg/vmcp/client/client.go queryTools (around line 700) does a single ListTools with ListToolsRequest{} — no cursor loop. The go-sdk paginates tools/list at DefaultPageSize=1000, so backends with >1000 tools are silently truncated.

The same issue applies to queryResources and queryPrompts.

Impact: vMCP servers aggregating backends with >1000 tools will silently drop tools beyond the first page. Non-cursor-following clients see an incomplete tool set.

Regression test coverage

  • TestRegression_Over1000Tools_CompleteSetReceived in test/integration/vmcp/pagination_regression_test.go — skipped test with t.Skip("vMCP does not follow pagination cursors; see gap-analysis V1 / follow-up issue"). Serves as a regression anchor for when cursor-following is implemented.

MCP spec reference

MCP 2025-11-25 §"Pagination": tools/list supports cursor; servers MAY paginate. Clients must follow nextCursor.

Acceptance criteria

  • queryTools, queryResources, and queryPrompts should follow pagination cursors until exhausted
  • The skipped test should be un-skipped and pass
  • A backend exposing >1000 tools should return the complete set through vMCP

Activity

  1. added
    needs-triage
    on Jul 9, 2026
  2. removed
    needs-triage
    on Jul 13, 2026
  3. jstar0 commented on Jul 14, 2026

    @jstar0
    Contributor

    I'd like to work on this. I plan to unskip the existing >1000-tools regression, add focused paginating-backend coverage for resources and prompts, and make all three query paths follow nextCursor with the bounded page limit requested in #5746. Could a team member assign this issue to me before I start?

  4. jhrozek commented on Nov 24, 2026

    @jhrozek
    Contributor

    Closing this. The legacy vMCP list calls (tools, resources, resource templates, prompts) now follow pagination cursors through pagination.ListAll, and a backend with more than 1000 tools returns the full set. A repeated cursor or the page cap returns an error instead of partial results. The fix is in #5851, with the regression test in #6021.

    The remaining gap is test coverage for multi-page resources, resource templates, and prompts. That is tracked in #5844, which is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions