EU Parliament Monitor — API Documentation - v0.9.24
    Preparing search index...

    Interface GatewayContext

    Adapter passed by MCPConnection to gateway helpers. Lets the helpers read & mutate the few connection-level fields they care about without pulling in the whole connection class.

    interface GatewayContext {
        gatewayUrl: string | null;
        gatewayApiKey: string | null;
        serverLabel: string;
        getMcpSessionId: () => string | null;
        nextRequestId: () => number;
        setMcpSessionId: (id: string | null) => void;
        setConnected: (v: boolean) => void;
    }
    Index

    Properties

    gatewayUrl: string | null
    gatewayApiKey: string | null
    serverLabel: string
    getMcpSessionId: () => string | null

    Current MCP session ID (may be updated by helpers via setMcpSessionId)

    nextRequestId: () => number

    Increment the JSON-RPC request counter and return the next ID

    setMcpSessionId: (id: string | null) => void

    Persist a new session ID (or clear it on 401)

    setConnected: (v: boolean) => void

    Mark the underlying connection as (dis)connected