Skip to content

Add SSE transport support #17

Description

@MathiasPaulenko

Add SSE transport support

Context

WaveXisMCP currently supports two transports:

  • stdio (default) — for local MCP clients like Claude Desktop, Cursor
  • http — for CI/CD, shared instances, Docker

The MCP spec also defines SSE (Server-Sent Events) as a transport. Some MCP clients (notably older versions of some tools) prefer SSE over HTTP streaming. Adding SSE support would improve compatibility with a wider range of MCP clients.

What needs to happen

In wavexis-mcp

  1. Add sse as a valid --transport option in wavexis_mcp/server.py
  2. Implement SSE transport using the mcp library's SSE server (if available) or a custom implementation:
    • GET /sse — opens SSE stream, sends MCP messages as events
    • POST /messages — receives client messages
  3. Add --sse-port flag (default: same as --port)
  4. Update CLI help text
  5. Update docs (docs/http-transport.md or new docs/sse-transport.md)

Implementation notes

  • Check if the mcp Python SDK already provides an SSE transport (it may — check mcp.server.sse)
  • If yes, just wire it up as a third transport option
  • If no, implement using aiohttp or starlette SSE response
  • SSE should work with the same --allow-remote and --port flags as HTTP
  • Rate limiting should apply to SSE connections too

Getting started

  1. Read wavexis_mcp/server.py to see how stdio and http transports are wired
  2. Check the mcp package for SSE support: python -c "from mcp.server import sse; print(dir(sse))"
  3. If SSE is available in the SDK, follow the same pattern as the HTTP transport
  4. If not, implement a minimal SSE endpoint
  5. Add tests
  6. Update docs

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions