Skip to content

[Client] Connecting fails on an empty serverInfo.version #70

Description

@chr-hertel

The Python SDK sends "version": "" when the server has none configured. connect() throws InvalidArgumentException instead of ConnectionException and leaves a spawned stdio server running. Same on v0.8.1.

php clients/php/repro/py-empty-version.php

https://github.com/modelcontextprotocol/php-sdk/blob/9591ad292788f717e8785b282edc2292850a98d4/src/Schema/Implementation.php#L54-L56 rejects the empty string, and https://github.com/modelcontextprotocol/php-sdk/blob/9591ad292788f717e8785b282edc2292850a98d4/src/Client.php#L106 only catches ConnectionException, so the transport isn't closed. Not sure tho whether we should accept "" or only clean up - the spec only types it as string.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions