Claude Code does not follow MCP tools/list pagination (nextCursor)
Summary
Claude Code does not follow nextCursor pagination when calling tools/list on MCP servers. It fetches only the first page of tools and silently discards any nextCursor in the response. This means tools beyond the first page are invisible and uncallable.
MCP Specification
The MCP Specification (2025-06-18) states:
Clients SHOULD support both paginated and non-paginated flows for all list endpoints.
tools/list is one of the four paginated list endpoints.
Reproduction
- Connect Claude Code to an MCP server (or gateway) that exposes more tools than fit on a single page
- The server returns page 1 with
nextCursorin the response - Claude Code displays only the tools from page 1
- Claude Code never sends a follow-up
tools/listrequest with the cursor - All tools on subsequent pages are completely invisible
Concrete example: AWS Bedrock AgentCore Gateway paginates tools/list at 30 tools per page. When connecting through a gateway with multiple MCP server targets totaling 48 tools, Claude Code only sees the first 30. The remaining 18 tools are undiscoverable and uncallable. The AgentCore documentation explicitly shows pagination handling code for tools/list — Claude Code should do the same.
Verified via server-side logs:
{
"result_keys": ["tools", "nextCursor"],
"tool_count": 30,
"has_next_cursor": true
}
Only one tools/list request is ever sent per session — no follow-up with the cursor.
Impact
- Any MCP server or gateway that paginates
tools/listwill have tools silently dropped - The built-in
x_amz_bedrock_agentcore_searchtool can find page-2 tools, but they still cannot be called because Claude Code never registered them - This breaks the intended workflow for gateways aggregating tools from multiple backend servers (a common enterprise pattern)
- Users see a subset of their tools with no indication that more exist
Expected Behavior
Claude Code should follow the MCP pagination protocol:
cursor = None
all_tools = []
while True:
response = session.list_tools(cursor)
all_tools.extend(response.tools)
if not response.nextCursor:
break
cursor = response.nextCursor
This is the same pattern shown in the AWS AgentCore docs and the MCP specification.
Related Issues
- #8237 —
tools/listsupport cursor (closed as duplicate) - #3141 — MCP Resources Pagination Support (closed due to inactivity, not fixed)
Both were closed without resolution. This issue provides concrete reproduction evidence and production impact.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗