Skip to content

mcp: add an sse event size cap - #1205

Open
yarolegovich wants to merge 3 commits into
mainfrom
yarolegovich/add-request-size-checks
Open

mcp: add an sse event size cap#1205
yarolegovich wants to merge 3 commits into
mainfrom
yarolegovich/add-request-size-checks

Conversation

@yarolegovich

Copy link
Copy Markdown
Member

update sse I/O code to limit the amount of memory a single non-terminated event can take

@yarolegovich
yarolegovich force-pushed the yarolegovich/add-request-size-checks branch from 6112a13 to a433a9f Compare August 28, 2026 07:01
Comment thread mcp/event.go
Comment on lines +68 to +70
// defaultMaxEventSize bounds the number of bytes buffered for a single SSE
// event before the input gets rejected.
const defaultMaxEventSize = 16 << 20 // 16 MiB

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not we allow the possibility to override this value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants