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

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