Skip to content

fix(mcp): keep servers healthy when ping is unsupported - #2871

Merged
wgqqqqq merged 1 commit into
GCWing:mainfrom
wgqqqqq:wgq/fix-mcp-unsupported-ping
Sep 7, 2026
Merged

fix(mcp): keep servers healthy when ping is unsupported#2871
wgqqqqq merged 1 commit into
GCWing:mainfrom
wgqqqqq:wgq/fix-mcp-unsupported-ping

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Prevent usable Streamable HTTP MCP servers from entering a reconnect loop when they do not implement ping. For the typed JSON-RPC method-not-found error only, verify tools/list when the server advertises tools support. Other ping errors and failed fallback checks still fail health checks.

Type and Areas

Type: Bug fix

Areas: MCP remote transport, Rust services, Desktop E2E

Motivation / Impact

Huawei Developer Knowledge successfully handles initialization, tool discovery, search, and document retrieval, but returns -32601: Method not found: ping. The immediate heartbeat changed the desktop status to Reconnecting despite the working connection. With this fix, the same endpoint remains Healthy across subsequent health checks.

The official Huawei configuration uses type: "http" and the public developerknowledge endpoint without OAuth credentials. The live reproduction used that configuration.

Verification

  • cargo test -p openbitfun-services-integrations --no-default-features --features mcp --test mcp_streamable_http_contracts — passed in the source checkout; repeated against upstream/main in this PR worktree. Covers normal ping, method-not-found fallback, propagation of other errors, and failed fallback.
  • cargo build -p openbitfun-desktop — passed in the source checkout with existing compiler warnings.
  • OPENBITFUN_E2E_HUAWEI_MCP=1 OPENBITFUN_E2E_STORAGE_ROOT=<fresh temporary directory> pnpm --dir tests/e2e exec wdio run ./config/wdio.conf.ts --spec './specs/l1-mcp-huawei-health.spec.ts' — live desktop reproduction failed before the fix (Reconnecting) and passed after it. Verified settings UI, searchDocuments, getDocumentsById, and continued health after the next 30-second heartbeat. Tool results explicitly report success. Screenshot inspected: green healthy status.
  • git diff --check — passed.

The E2E is opt-in, uses public queries without credentials, and restores its isolated MCP config. A repeated run using an old test profile encountered an unrelated workspace-format startup rejection; the final run used a fresh profile and passed. Desktop/E2E evidence was collected in the source checkout before transplanting this focused patch onto upstream/main.

Reviewer Notes

This change lives in the shared remote transport and adds no hostname-specific policy. The live scenario was local Desktop communicating with remote HTTPS MCP. Remote workspace, remote control, Peer Device Mode, and Detached Dispatch were not exercised on real hosts.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable (focused test commands documented; no new UI copy).

@wgqqqqq
wgqqqqq merged commit 0b7ddf8 into GCWing:main Sep 7, 2026
13 checks passed
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.

1 participant