Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Activate MCP Real-time Streaming #3

@avrabe

Description

@avrabe

Epic: MCP Integration

Priority: Critical
Story Points: 8
Phase: 1

Problem

The MCP client has a complete HTTP streaming implementation ready (startStreaming(), addStreamListener(), processStreamChunk()) but it's not activated. Real-time updates for diagram synchronization are needed.

Solution

Activate the existing streaming infrastructure by connecting it to UI components that need real-time updates.

Implementation Details

Ready-to-use code in src/mcp/client.ts:

  • startStreaming() - Complete Server-Sent Events implementation
  • addStreamListener() - Stream listener management
  • processStreamChunk() - Event parsing and handling
  • handleStreamEvent() - Event dispatching to listeners

Tasks

  • Call mcpClient.addStreamListener() from services needing real-time updates
  • Connect streaming to diagram state management
  • Enable automatic streaming when listeners are added
  • Test with live diagram updates

Acceptance Criteria

  • Real-time diagram updates work via MCP streaming
  • Multiple listeners can subscribe to different stream types
  • Stream automatically starts when first listener is added
  • Stream stops when last listener is removed
  • Error handling maintains connection stability

Technical Notes

  • Uses Server-Sent Events over /sse endpoint
  • Session ID passed in Mcp-Session-Id header
  • Implements reconnection logic for reliability
  • Compatible with PulseEngine MCP Framework 0.3.0

File: src/mcp/client.ts:541-606

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions