Repository navigation
fix(mcp): resolve streamable http transport readiness offline status - #3037
diegosouzapw merged 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for HTTP transports (SSE and streamable HTTP) alongside the existing stdio transport in the MCP server status and dashboard. It adds the isMcpHttpTransportReady utility to determine if an HTTP transport is enabled and ready, updates the status API route to handle HTTP transport readiness dynamically, and adapts the dashboard UI to display correct uptime, transport, and heartbeat information depending on the active transport type. A review comment correctly identifies that the dashboard's scopes enforcement status relies on status?.heartbeat?.scopesEnforced, which will be null for HTTP transports because they run in-process and do not write to the external heartbeat file. The reviewer suggests exposing scopesEnforced at the top level of the status API response to resolve this issue.
| <p> | ||
| {t("transport")}:{" "} | ||
| <span className="font-mono">{status?.heartbeat?.transport || "—"}</span> | ||
| {t("transport")}: <span className="font-mono">{runtimeTransport}</span> |
There was a problem hiding this comment.
Issue
The dashboard displays the scopes enforcement status using status?.heartbeat?.scopesEnforced. However, for HTTP transports (sse and streamable-http), status?.heartbeat is null because they run in-process and do not write to the external stdio heartbeat file. Consequently, the dashboard will always display No for scopes enforcement when using HTTP transports, even if scopes are actually being enforced at the server level (via OMNIROUTE_MCP_ENFORCE_SCOPES).
Recommendation
To resolve this, consider:
- Exposing
scopesEnforcedat the top level of the/api/mcp/statusAPI response:scopesEnforced: mcpTransport === "stdio" ? !!heartbeat?.scopesEnforced : process.env.OMNIROUTE_MCP_ENFORCE_SCOPES === "true"
- Updating the dashboard type and component to use this top-level field with a fallback:
status?.scopesEnforced ?? status?.heartbeat?.scopesEnforced
6b7ae9a
into
cheaper-inference:release/v3.8.8
|
Merged into |
…env-doc fixes - bump package.json / open-sse / electron / openapi / llm.txt to 3.8.8 - restructure CHANGELOG: Unreleased -> [3.8.8], dedup broken Notion/MCP block (was 12x) - add every PR since v3.8.7 that was missing: Quota Share Engine (#2859/#3022/#3032), page redesigns (#2827/#2839/#2847/#2849/#2869/#2873), and fixes #2960/#2973/#2984/ #3021/#3029/#3031/#3035/#3036/#3037/#3039/#3043/#3028; folded #2978/#2988/#3041 - insert [3.8.8] section into all 41 i18n CHANGELOGs + sync llm.txt mirrors - document OMNIROUTE_PLUGINS_ALLOW_EXEC in .env.example + ENVIRONMENT.md (env-doc-sync gap)
…heaper-inference#3037) Integrated into release/v3.8.8. Fixes MCP streamable-HTTP transport readiness reporting when offline + session sweep. Thanks @Chewji9875!
…env-doc fixes - bump package.json / open-sse / electron / openapi / llm.txt to 3.8.8 - restructure CHANGELOG: Unreleased -> [3.8.8], dedup broken Notion/MCP block (was 12x) - add every PR since v3.8.7 that was missing: Quota Share Engine (cheaper-inference#2859/cheaper-inference#3022/cheaper-inference#3032), page redesigns (cheaper-inference#2827/cheaper-inference#2839/cheaper-inference#2847/cheaper-inference#2849/cheaper-inference#2869/cheaper-inference#2873), and fixes cheaper-inference#2960/cheaper-inference#2973/cheaper-inference#2984/ cheaper-inference#3021/cheaper-inference#3029/cheaper-inference#3031/cheaper-inference#3035/cheaper-inference#3036/cheaper-inference#3037/cheaper-inference#3039/cheaper-inference#3043/cheaper-inference#3028; folded cheaper-inference#2978/cheaper-inference#2988/cheaper-inference#3041 - insert [3.8.8] section into all 41 i18n CHANGELOGs + sync llm.txt mirrors - document OMNIROUTE_PLUGINS_ALLOW_EXEC in .env.example + ENVIRONMENT.md (env-doc-sync gap)
…heaper-inference#3037) Integrated into release/v3.8.8. Fixes MCP streamable-HTTP transport readiness reporting when offline + session sweep. Thanks @Chewji9875!
…env-doc fixes - bump package.json / open-sse / electron / openapi / llm.txt to 3.8.8 - restructure CHANGELOG: Unreleased -> [3.8.8], dedup broken Notion/MCP block (was 12x) - add every PR since v3.8.7 that was missing: Quota Share Engine (cheaper-inference#2859/cheaper-inference#3022/cheaper-inference#3032), page redesigns (cheaper-inference#2827/cheaper-inference#2839/cheaper-inference#2847/cheaper-inference#2849/cheaper-inference#2869/cheaper-inference#2873), and fixes cheaper-inference#2960/cheaper-inference#2973/cheaper-inference#2984/ cheaper-inference#3021/cheaper-inference#3029/cheaper-inference#3031/cheaper-inference#3035/cheaper-inference#3036/cheaper-inference#3037/cheaper-inference#3039/cheaper-inference#3043/cheaper-inference#3028; folded cheaper-inference#2978/cheaper-inference#2988/cheaper-inference#3041 - insert [3.8.8] section into all 41 i18n CHANGELOGs + sync llm.txt mirrors - document OMNIROUTE_PLUGINS_ALLOW_EXEC in .env.example + ENVIRONMENT.md (env-doc-sync gap)
…heaper-inference#3037) Integrated into release/v3.8.8. Fixes MCP streamable-HTTP transport readiness reporting when offline + session sweep. Thanks @Chewji9875!
…env-doc fixes - bump package.json / open-sse / electron / openapi / llm.txt to 3.8.8 - restructure CHANGELOG: Unreleased -> [3.8.8], dedup broken Notion/MCP block (was 12x) - add every PR since v3.8.7 that was missing: Quota Share Engine (cheaper-inference#2859/cheaper-inference#3022/cheaper-inference#3032), page redesigns (cheaper-inference#2827/cheaper-inference#2839/cheaper-inference#2847/cheaper-inference#2849/cheaper-inference#2869/cheaper-inference#2873), and fixes cheaper-inference#2960/cheaper-inference#2973/cheaper-inference#2984/ cheaper-inference#3021/cheaper-inference#3029/cheaper-inference#3031/cheaper-inference#3035/cheaper-inference#3036/cheaper-inference#3037/cheaper-inference#3039/cheaper-inference#3043/cheaper-inference#3028; folded cheaper-inference#2978/cheaper-inference#2988/cheaper-inference#3041 - insert [3.8.8] section into all 41 i18n CHANGELOGs + sync llm.txt mirrors - document OMNIROUTE_PLUGINS_ALLOW_EXEC in .env.example + ENVIRONMENT.md (env-doc-sync gap)
This PR fixes the issue where the OmniRoute MCP HTTP/SSE transports show as offline in the dashboard before an active session is established. Since HTTP transports are lazy-started on first request, this PR introduces a readiness check to ensure they display as online if enabled.