-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Feature
Pagination does not seem to be implemented or handled correctly in @mcpjam/inspector.
In my MCP implementation, when a list contains more than 50 items (page size), the server correctly returns the first page along with a nextCursor. However, the inspector only displays the first page and does not request or load subsequent pages, even though pagination information is present in the response.
This makes it impossible to fully browse large tool lists via the inspector.
Solution
Add proper pagination support in the inspector when a nextCursor (or equivalent) is returned by the MCP server.
Look at the official docs for how MCP pagination works:
https://modelcontextprotocol.io/specification/2025-03-26/server/utilities/pagination
MCP response handling
- Detect pagination metadata such as:
nextCursor
- Preserve the cursor returned by the server.
Subsequent requests
- When
nextCursoris present, the inspector should:- Allow fetching the next page by passing the cursor back to the MCP server.
- Merge or append results to the existing list.
UI
- Provide a clear way to load more results:
- A "Load more" button, or
- Infinite scrolling.
- Optionally expose pagination info (current cursor, page size) in a debug or advanced panel.
Alternatives
- Allow users to manually pass pagination parameters (
cursor,limit) via a raw request panel. - Add an option to automatically fetch all pages (with a reasonable max limit to avoid abuse).
- Provide a CLI or export option to retrieve the full dataset outside the inspector UI.
Additional Context
MCP server behavior:
- Page size: 50 items
- When more results are available, the response looks like this:
{
"jsonrpc": "2.0",
"id": 6,
"result": {
"tools": [],
"nextCursor": "b2Zmc2V0PTUw"
}
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers