Skip to content

The method io.modelcontextprotocol.client.McpAsyncClient#listTools() never returns if the result.nextCursor() is an empty string instead of a null #575

Description

@jthann

I've found in some MCP server implementations the nextCursor in response is empty string instead of null, leading to dead loop in the method of following reference.

.expand(result -> (result.nextCursor() != null) ? this.listTools(result.nextCursor()) : Mono.empty())

Activity

  1. changed the title [-]The method ```io.modelcontextprotocol.client.McpAsyncClient#listTools()``` never returns if the ```result.nextCursor()``` is empty string instead of null[/-] [+]The method ```io.modelcontextprotocol.client.McpAsyncClient#listTools()``` never returns if the ```result.nextCursor()``` is an empty string instead of a null[/+] on Sep 25, 2025
  2. added
    bugSomething isn't working
    P3Nice to haves, rare edge cases
    on Feb 20, 2026
  3. added theissue type on Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Nice to haves, rare edge casesbugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions