Skip to content

Where does notification go? #42

@sei-li-miidas

Description

@sei-li-miidas

https://github.com/mark3labs/mcp-go/blob/main/server/sse.go#L113-L125

All sessions are waiting for notifications, Golang doesn't guarantee that the session which sends the notification will receive it.
And because of

// Only forward notifications meant for this session
if serverNotification.Context.SessionID == sessionID {

the notification may just got lost?
Is it on purpose?

BTW.
Thought the official SDK
https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/shared/protocol.ts#L535-L548
also only sends notification to one client, the current client.
I think it's better there is way to send notification to all clients.
When tools change, server wants to notify every client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions