Skip to content

fix(mcp): resolve streamable http transport readiness offline status - #3037

Merged
diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.8from
Chewji9875:fix/mcp-loopback-host
Jun 1, 2026
Merged

diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.8from
Chewji9875:fix/mcp-loopback-host

Conversation

@Chewji9875

Copy link
Copy Markdown
Contributor

This PR fixes the issue where the O‍mniRoute 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.

@Chewji9875
Chewji9875 requested a review from diegosouzapw as a code owner June 1, 2026 12:03

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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:

  1. Exposing scopesEnforced at the top level of the /api/mcp/status API response:
    scopesEnforced: mcpTransport === "stdio" ? !!heartbeat?.scopesEnforced : process.env.OMNIROUTE_MCP_ENFORCE_SCOPES === "true"
  2. Updating the dashboard type and component to use this top-level field with a fallback:
    status?.scopesEnforced ?? status?.heartbeat?.scopesEnforced

@diegosouzapw
diegosouzapw merged commit 6b7ae9a into cheaper-inference:release/v3.8.8 Jun 1, 2026
2 of 3 checks passed
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Merged into release/v3.8.8 🎉 Thanks @Chewji9875! Clean MCP transport-readiness fix + tests (24 green). Ships next release.

diegosouzapw added a commit that referenced this pull request Jun 1, 2026
…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)
@diegosouzapw diegosouzapw mentioned this pull request Jun 2, 2026
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…heaper-inference#3037)

Integrated into release/v3.8.8. Fixes MCP streamable-HTTP transport readiness reporting when offline + session sweep. Thanks @Chewji9875!
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…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)
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
…heaper-inference#3037)

Integrated into release/v3.8.8. Fixes MCP streamable-HTTP transport readiness reporting when offline + session sweep. Thanks @Chewji9875!
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
…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)
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…heaper-inference#3037)

Integrated into release/v3.8.8. Fixes MCP streamable-HTTP transport readiness reporting when offline + session sweep. Thanks @Chewji9875!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants