Skip to content

feat(connector-mcp): declarative provider — non-fatal / lazy boot for unreachable MCP servers (ADR-0096 follow-up) #3017

Description

@os-zhuang

Follow-up to #2977 / ADR-0096. Deferred enhancement identified while implementing the declarative provider factories (#2994) and the boot/reload reconcile (#3001).

Context

ADR-0096 boot materialization is intentionally fail-loud for configuration faults: unknown provider, invalid providerConfig, unresolvable credentialRef, and name conflict all abort startup. That policy is correct for authoring mistakes.

An mcp provider-bound instance, however, must connect to a remote MCP server to materialize its action handlers. Today that connection happens synchronously during boot materialization, so a transient / operational fault — the MCP server being momentarily unreachable — is indistinguishable from a config fault and aborts the whole server boot. This is why the showcase demo ships a provider: 'rest' instance (synchronous, no network at boot) rather than provider: 'mcp'.

Ask

Distinguish config-invalid (stays fatal) from remote-temporarily-unreachable (should degrade, not crash boot):

  • Lazy connect: materialize the connector's def / handler surface from declared metadata without requiring a live connection at boot; establish (and cache) the MCP connection on first dispatch, with reconnect / backoff.
  • or boot-time connect with a non-fatal degrade: an instance whose connection fails at boot registers in a degraded state (dispatch returns a clear error; GET /connectors surfaces the state) and re-attempts on the next reconcile / metadata:reloaded, rather than aborting startup.
  • Preserve fatal behavior for genuine config faults (malformed providerConfig, unresolvable credentialRef, name conflict).
  • Once resilient, upgrade the showcase to a live provider: 'mcp' instance — completing ADR-0096 D6's original intent.
  • Tests: unreachable-at-boot degrades (boot survives), recovery on reconnect / reload, config-fault still fatal.

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions