Skip to content

fix(mcp): auto-paginate tool and prompt listings - #4094

Merged
seratch merged 2 commits into
mainfrom
fix/mcp-list-pagination
Aug 2, 2026
Merged

fix(mcp): auto-paginate tool and prompt listings#4094
seratch merged 2 commits into
mainfrom
fix/mcp-list-pagination

Conversation

@seratch

@seratch seratch commented Aug 1, 2026

Copy link
Copy Markdown
Member

This pull request fixes MCP list pagination by following nextCursor until exhaustion for tools and prompts while leaving resource and resource-template pagination page-scoped. It preserves first-page prompt metadata, cache/filter and shared retry behavior, rejects cursor cycles without exposing opaque cursors, and adds official MCP stdio integration coverage including second-page Agent tool calls.

This pull request resolves #4085 and incorporates the relevant review feedback from #4086.

@seratch seratch added this to the 0.19.x milestone Aug 1, 2026
Co-authored-by: Akshay Sharma <68906315+akshay183@users.noreply.github.com>
@seratch
seratch force-pushed the fix/mcp-list-pagination branch from 78845e4 to 14c9b54 Compare August 1, 2026 23:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78845e4436

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/mcp/server.py
@seratch
seratch enabled auto-merge (squash) August 2, 2026 00:03
@seratch
seratch merged commit a134f3a into main Aug 2, 2026
9 checks passed
@seratch
seratch deleted the fix/mcp-list-pagination branch August 2, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: MCP listing APIs do not auto-paginate across tools, prompts, and resources

1 participant