Skip to content

Can't handle large messages through SSE stream #61

@hgodalan

Description

@hgodalan

The current implementation of the SSE client uses bufio.Scanner to read from the SSE stream.

func (c *SSEMCPClient) readSSE(reader io.ReadCloser) {

This approach has a limitation due to the default buffer size of 64KB, which results in errors when handling large messages. The error message encountered is:

SSE stream error: bufio.Scanner: token too long

Maybe replace bufio.Scanner with bufio.Reader in the readSSE function to handle line-based reading without buffer size limitations.

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