Skip to content

Add SSE Support for Real-time Updates #20

Open
@ma3u

Description

@ma3u

Description

Implement Server-Sent Events (SSE) support in the Dust MCP Server to enable real-time updates for MCP clients like Windsurf. This will allow clients to receive streaming responses and updates without constant polling.

Requirements

  • Implement SSE endpoint at /api/sse
  • Support multiple client connections with unique session IDs
  • Implement keep-alive mechanism for SSE connections
  • Add rate limiting for SSE connections
  • Document SSE API in README
  • Add tests for SSE functionality
  • Update TypeScript types for SSE events
  • Add error handling for disconnected clients
  • Implement reconnection strategy for clients

Technical Details

  • Use Node.js events module for event handling
  • Implement proper cleanup of disconnected clients
  • Support CORS for web clients
  • Add configuration options for:
    • Max connections per IP
    • Keep-alive interval
    • Max retry time

Related Components

  • Session management system
  • Authentication middleware
  • Rate limiting
  • Logging system

Acceptance Criteria

  • Clients can connect to SSE endpoint
  • Clients receive real-time updates
  • Connection limits are enforced
  • Proper error handling and reconnection
  • Documentation is updated
  • Tests are passing

Dependencies

  • None identified

Additional Context

This is part of the Smithery and Pipedream integration for MCP clients supporting SSE.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions