Skip to content

HTTP Streamable must return JsonResponse for single requests #39

@Wolfgang-check24

Description

@Wolfgang-check24

What happened?

According https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#sending-messages-to-the-server and https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#sequence-diagram the server returns on a "single" request a simple http request type json/application and on multiple / batched ones as text/event-stream

How to reproduce the bug

curl --location 'http://localhost:8000/mcp' \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 5,
  "params": {
    "name": "hello-world",
    "arguments": {
      "name": "HTTP SSE Developer"
    }
  }
}'

Package Version

1.3.1

PHP Version

8.2.0

Symfony Version

6.4, 7.2

Which operating systems does this happen with?

macOS

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions