Skip to content

[Server][Conformance] Tool with sampling gets stuck #211

Closed

Description

@chr-hertel

Scenario tools-call-sampling gets stuck for unknown reason.

Reproduce:

make conformance-server
npx @modelcontextprotocol/conformance server --url http://localhost:8000 --scenario tools-call-sampling

Activity

  1. added
    bug
    Server
    on Dec 28, 2025
  2. added this to the 1.0 milestone on Dec 28, 2025
  3. CodeWithKyrian commented on Jan 1, 2026

    @CodeWithKyrian
    Contributor

    The reason is known actually. The StreamableHttpTransport uses SSE for server-client communication. So for sampling to work, the server sends a sampling request via the open SSE stream, the client processes the request and sends the response via a separate HTTP POST and the server needs to receive this POST while still streaming SSE.

    PHP's built-in server (which was used in the conformance tests) is single-threaded and a single process so it can only handle one request at a time. While the SSE connection is open, it cannot accept the second request thus a deadlock.

    Currently working on a fix and will put up a PR soon.

  4. chr-hertel commented on Jan 2, 2026

    @chr-hertel
    MemberAuthor

    Oh man, you're right - we discussed that before - maybe 3am was too late for tackling that :D

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

    Serverbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions