This is the documentation for v2 — looking for the v1 documentation?
Skip to content

MCP TypeScript SDK (V2) / @modelcontextprotocol/server / server/sseKeepAlive

server/sseKeepAlive

Variables

DEFAULT_SSE_KEEP_ALIVE_MS

const DEFAULT_SSE_KEEP_ALIVE_MS: 15000 = 15_000

Defined in: packages/server/src/server/sseKeepAlive.ts:2

Default interval between SSE keep-alive comment frames.

Functions

armSseKeepAlive()

armSseKeepAlive(intervalMs, onTick): Timeout | undefined

Defined in: packages/server/src/server/sseKeepAlive.ts:7

Arms an unref'd timer, or disables keep-alive for invalid delays.

Parameters

intervalMs

number

onTick

() => void

Returns

Timeout | undefined