Commit Graph

5 Commits

Author SHA1 Message Date
Nick Pape
76dcff0617 Fix a lifecycle bug with server everything in stdio mode (#2848) 2025-11-25 21:50:31 +00:00
Cliff Hall
c3093739ca Let Everything's STDIO server use SDK's automatic log level handling (#2706)
- bump TS SDK to 1.18.0
* In src/everything/stdio.ts
  - remove logging related imports
  - remove custom log-level handling, now handled automatically by the SDK
* In src/everything/everything.ts
  - remove console.log of sessionId
2025-09-11 17:31:49 -07:00
cliffhall
97c6408f04 * in .gitignore
- add .idea/ for Jetbrains IDEs
* in everything.ts
  - remove import of SetLevelRequestSchema
  - remove logLevel var
  - add sessionId var
  - in startNotificationIntervals function
    - add optional sid argument
    - set sessionId to sid
    - define messages to be sent, adding sessionId if present
  - remove setRequestHandler call for SetLevelRequestSchema
  - replace server.notification calls that sent "notifications/message" objects with calls to server.sendLoggingMessage, passing just the parameters and sessionId.
* In package.json & package-lock.json
  - bump TS SDK version to 1.17.5
* In sse.ts, pass transport.sessionId to startNotificationIntervals call
* In stdio.ts
  - destructure startNotificationIntervals from createServer call
  - implement custom logging request handler and server.sendLoggingMessage implementation, as a
  workaround for the fact that the SDK's automatic log level handling currently only tracks requested log level by session id. This will be fixed in a followup PR for the SDK
  - call the startNotificationIntervals function after connecting the transport to the server
* In streamableHttp.ts
  - destructure startNotificationIntervals from createServer call
  - call startNotificationIntervals passing the transport.sessionId after connecting the transport to the server
2025-09-02 17:18:11 -04:00
cliffhall
69549cc844 Update server-everything to use the latest version of the SDK
* In stdio.ts
  - change console.log to console.error
2025-05-06 10:26:47 -04:00
cliffhall
f93911607b Update server-everything to allow choosing the transport on the command line.
# Run the default (stdio) server
```npx @modelcontextprotocol/server-everything```

# Or specify stdio explicitly
```npx @modelcontextprotocol/server-everything stdio```

# Run the SSE server
```npx @modelcontextprotocol/server-everything sse```

# Run the streamable HTTP server
```npx @modelcontextprotocol/server-everything streamableHttp```

* In src/everything/index.ts
  - refactor/extracted contents to stdio.ts
  - replaced with code that
    - Gets the single argument from the commandline as scriptName
    - switches on scriptName
    - imports the appropriate server script or outputs usage options
  - scripts run on import

* In src/everything/stdio.ts
  - added console log "Starting default (STDIO) server..."

* In src/everything/sse.ts
  - added console log "Starting SSE server..."

* In src/everything/streamableHttp.ts
  - added console log "Starting Streamable HTTP server..."

* This fixes #1594
2025-05-05 13:09:38 -04:00