Skip to content

Pagination#21

Merged
jspahrsummers merged 5 commits into
mainfrom
justin/pagination
Oct 7, 2024
Merged

Pagination#21
jspahrsummers merged 5 commits into
mainfrom
justin/pagination

Conversation

@jspahrsummers

@jspahrsummers jspahrsummers commented Oct 7, 2024

Copy link
Copy Markdown
Member

Adds optional cursor-based pagination to all list-type requests.

I've also split out the listing of resources and resource templates, which makes the interfaces simpler. Although this is a breaking change, I don't think anything actually exists that depends on this right now.

In keeping with our MCP design philosophy, pagination logic is entirely up to the server (including whether it exists at all): the server returns however many results it wants to, and an optional cursor if the client can request more.

Resolves #6.

@jspahrsummers jspahrsummers requested review from a team, ashwin-ant, dsp-ant and k6l3 October 7, 2024 14:51
@udaygajavalli

Copy link
Copy Markdown

Say I made an API call which is paginated at my server end upon receiving the tool/call. Does it support pagination?

localden added a commit that referenced this pull request Apr 9, 2026
CodeQL flagged execSync with interpolated file paths as CWE-78/CWE-88
shell injection. The paths are derived from __dirname and SEP filenames,
so direct exploitability requires commit access — but paths with spaces
or shell metacharacters would still break the command.

Replaced execSync template-string interpolation with execFileSync and
an args array. Paths are passed as separate process arguments, never
touching a shell. The win32 npx.cmd resolution keeps it cross-platform.

Fixed both occurrences (lines 395 and 435 had the identical pattern;
the alert only flagged 435).

Fixes https://github.com/modelcontextprotocol/modelcontextprotocol/security/code-scanning/21

🏠 Remote-Dev: homespace
mcp-commander Bot pushed a commit that referenced this pull request Apr 9, 2026
…) (#2546)

CodeQL flagged execSync with interpolated file paths as CWE-78/CWE-88
shell injection. The paths are derived from __dirname and SEP filenames,
so direct exploitability requires commit access — but paths with spaces
or shell metacharacters would still break the command.

Replaced execSync template-string interpolation with execFileSync and
an args array. Paths are passed as separate process arguments, never
touching a shell. The win32 npx.cmd resolution keeps it cross-platform.

Fixed both occurrences (lines 395 and 435 had the identical pattern;
the alert only flagged 435).

Fixes https://github.com/modelcontextprotocol/modelcontextprotocol/security/code-scanning/21

🏠 Remote-Dev: homespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Pagination

3 participants