bitloi 58ca0a16ba
🐛 Fix MCP SSE sessions leaking on zombie connections (#9432) (#9464)
SSE sessions were never included in the periodic inactivity timeout
checker, so a stale connection whose TCP close event never fired would
retain its SSEServerTransport and McpServer indefinitely.

Changes:
- Add lastActiveTime: number to the sseTransports entry type
- Initialise lastActiveTime at SSE session creation (GET /sse)
- Refresh lastActiveTime on every incoming message (POST /messages)
- Extend startSessionTimeoutChecker() to sweep and forcibly close SSE
  sessions idle for more than SESSION_TIMEOUT_MINUTES, mirroring the
  existing Streamable HTTP logic
- Update the checker log to count both transport maps

The existing res.on('close') cleanup path is preserved unchanged:
it remains the primary cleanup for normal disconnections; the timer
is a safety net for zombie sessions only.

Closes #9432

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2026-05-11 13:55:11 +02:00
..
2026-04-20 19:37:02 +02:00
2026-04-20 19:37:02 +02:00
2026-04-20 19:37:02 +02:00
2026-02-04 12:22:36 +01:00
2026-02-04 12:22:36 +01:00

Penpot MCP Server

A Model Context Protocol (MCP) server that provides Penpot integration capabilities for AI clients supporting the model context protocol (MCP).

Setup

  1. Install Dependencies

     pnpm install
    
  2. Build the Project

     pnpm run build
    
  3. Run the Server

     pnpm run start
    

Penpot Plugin API REPL

The MCP server includes a REPL interface for testing Penpot Plugin API calls. To use it, connect to the URL reported at startup.