Skip to content

sampling/createMessage hangs #285

@besmiralia

Description

@besmiralia

Describe the bug
I have an streamablehttp MCP server which exposes a tool. When that tool is called, it sends a sampling request to the client to get some data before proceeding further. This call does not complete and the message only makes it to the client when the sampling context times out.(Verified with inspector).

It could me a lock/mutex or something else.

To Reproduce

Create a simple mcp server with a tool(hello example). Before returning the response, add a sampling request and return it's response.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions