Connector OAuth succeeds but MCP discovery fails: "discover response was inconsistent" (stable discover JSON, HTTP 200)

Summary

MCP URL: https://www.vmeg.ai/api/mcp
OAuth (dynamic registration + PKCE) succeeds, but Connector action discovery fails:

{
  "error_code": "MCP_ACTION_DISCOVERY_FAILED",
  "message": "Authentication succeeded, action discovery failed",
  "cause": { "detail": "MCP server/discover response was inconsistent from vmeg.ai" }
}

Same error on:

  • OAuth callback: /backend-api/aip/connectors/links/oauth/callback
  • refresh_actions: kind: invalid_response, upstream_status: 200
  • Apps submission mcp/inspect (424)

The MCP endpoint returns HTTP 200 JSON — not auth or connectivity failure.


Server

  • Spring AI MCP STATELESS (2025-11-25 legacy path: initializetools/list)
  • Custom server/discover shim (mcp-core 0.18.x has no native handler)
  • Discover: resultType: "complete", supportedVersions: ["2025-11-25"]
  • Client probe uses _meta.io.modelcontextprotocol/protocolVersion: "2026-07-28"

Verified on production

  • server/discover and initialize: same capabilities, serverInfo (vmeg / 1.0.0), instructions
  • tools/list, resources/list, prompts/list: all 200
  • 10 consecutive identical server/discover responses (same JSON bytes; fixed non-deterministic serverInfo key order)

Questions

  1. What does Connector compare when returning “discover response was inconsistent”?

    • Two discover calls? discover vs initialize? discover vs capability claims?
  2. For a legacy / dual-era server (2025-11-25 + initialize), what server/discover response should we return when the client probes with 2026-07-28?

  3. Is supportedVersions: ["2025-11-25"] only (no 2026-07-28) + still using initialize after discover expected to fail Connector validation?

  4. Any recommended pattern for Spring AI STATELESS servers to pass Connector discovery today?

Happy to share redacted discover / initialize JSON samples. Thanks!

Closing update — resolved

@maxeileen55 what was the issue and how was it resolved?