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.

Enable MCP Notification System #4

@avrabe

Description

@avrabe

Epic: MCP Integration

Priority: Critical
Story Points: 5
Phase: 1

Problem

The MCP client has notification infrastructure (sendNotification(), handleNotification(), listener management) but it's not connected to the UI for bidirectional server communication.

Solution

Enable the notification system by connecting it to UI state management and server events.

Implementation Details

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

  • sendNotification() - Send notifications to server (lines 195-232)
  • handleNotification() - Process incoming notifications (lines 489-501)
  • addNotificationListener() - Register notification handlers (lines 468-473)
  • removeNotificationListener() - Cleanup listeners (lines 475-483)

Tasks

  • Connect handleNotification() to UI state management
  • Use sendNotification() for user actions that need server awareness
  • Add notification listeners for diagram events
  • Implement bidirectional diagram synchronization

Acceptance Criteria

  • UI can send notifications to server for user actions
  • Server notifications update UI state automatically
  • Multiple notification types are supported
  • Notification listeners can be added/removed dynamically
  • Error handling prevents notification failures from breaking UI

Technical Notes

  • Uses JSON-RPC 2.0 notification format (no response expected)
  • Session ID included in headers for authentication
  • Supports both one-way and bidirectional communication
  • Error recovery maintains notification reliability

Files:

  • src/mcp/client.ts:195-232 (sendNotification)
  • src/mcp/client.ts:468-501 (notification handling)

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