Skip to content

feat: add stored MCP preflight probe - #6

Open
KirschBluteX wants to merge 2 commits into
OpenHands:mainfrom
KirschBluteX:feat/16565-mcp-preflight-probe
Open

feat: add stored MCP preflight probe#6
KirschBluteX wants to merge 2 commits into
OpenHands:mainfrom
KirschBluteX:feat/16565-mcp-preflight-probe

Conversation

@KirschBluteX

@KirschBluteX KirschBluteX commented Aug 15, 2026

Copy link
Copy Markdown

Why

Cloud automation preflight must test the user's already-stored MCP connection without sending its configuration or credentials through the automation service response.

Related to OpenHands/OpenHands#16565.

Summary

  • add POST /api/v1/settings/mcp/{settings_key}/test under the existing authenticated settings router
  • resolve the stored server internally and reuse the agent-server MCP probe
  • make repository and branch searches follow provider pagination without dropping page-boundary results
  • reject empty, non-positive, page-one, and malformed page tokens; distinguish a disconnected provider (403) from a sanitized provider failure (503)
  • return only { "ok": boolean } from the MCP probe, with bounded input, a sanitized 404 for missing servers, and a sanitized 503 for internal failures

How to test

  • python -m pytest tests/unit/app_server/test_git_router.py tests/unit/app_server/test_settings_api.py -q — 54 passed
  • scoped pre-commit hooks — trailing whitespace, EOF, debug statements, Ruff, Ruff format, and mypy passed
  • the AppMode guard's equivalent rg check found no AppMode.OSS usage; the commit hook also passed the guard

Companion changes

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