Title: feat: add cursor pagination support to all client list methods by jerome3o-anthropic · Pull Request #718 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: feat: add cursor pagination support to all client list methods by jerome3o-anthropic · Pull Request #718 · modelcontextprotocol/python-sdk
X Title: feat: add cursor pagination support to all client list methods by jerome3o-anthropic · Pull Request #718 · modelcontextprotocol/python-sdk
Description: Summary This PR adds cursor-based pagination support to all list methods in the Python MCP client SDK. The client is now ready to handle paginated responses from servers, though server implementations don't yet support pagination. Changes Added optional cursor parameter to all client list methods: list_tools(cursor=None) list_resources(cursor=None) list_prompts(cursor=None) list_resource_templates(cursor=None) Added comprehensive tests verifying cursor parameter acceptance for all list methods Test Plan Tests verify that the cursor parameter is properly accepted in various forms: Omitted (backward compatibility) cursor=None cursor="some_value" cursor="" Note: The tests don't demonstrate actual pagination because no server in the SDK currently implements it. The tests only verify that the client accepts and passes the cursor parameter correctly. Notes This addresses the issue reported in Slack where users couldn't access the cursor parameter in list_tools() and had to drop down to session.send_request() to use pagination. Servers will need to be updated separately to actually implement cursor-based pagination - this PR just ensures the client is ready for it.
Open Graph Description: Summary This PR adds cursor-based pagination support to all list methods in the Python MCP client SDK. The client is now ready to handle paginated responses from servers, though server implementati...
X Description: Summary This PR adds cursor-based pagination support to all list methods in the Python MCP client SDK. The client is now ready to handle paginated responses from servers, though server implementati...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/718
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:81145542-a4c4-5dc0-9179-149d05d12b39 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DCEA:326CF:2ADA6F3:3B476F0:6A60BF21 |
| html-safe-nonce | d148e19309a4369afe1c34ec6f3088bc1bc46107cd13af63ef125e1fb5d04308 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0VBOjMyNkNGOjJBREE2RjM6M0I0NzZGMDo2QTYwQkYyMSIsInZpc2l0b3JfaWQiOiI3NTc4NDg1NjYxMTg1OTE2NzA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4a6db01c0024b2b20f37e45d3d4b8e870c3338445ac1a5931e1c4b347b584a0c |
| hovercard-subject-tag | pull_request:2520703092 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/718/files |
| twitter:image | https://avatars.githubusercontent.com/u/156136903?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/156136903?s=400&v=4 |
| og:image:alt | Summary This PR adds cursor-based pagination support to all list methods in the Python MCP client SDK. The client is now ready to handle paginated responses from servers, though server implementati... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | bca6f23fd7d922d0dc2568325aed306d56389f16f6750e6dbd3b63cf2cdd06e9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 52cc0a08ad6a7ba327bf003424ad1b6c8d69f9c1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width