MCP Connectors

Refresh the caller's connector caches

Invalidates and refreshes cached connector instances. Use this after configuration changes or deployments.

The scope depends on which credential you present (platform/agent/connector_refresh_api.go:184-216):

CredentialScopemessagetenant_id
Basic auth (tenant)the authenticated tenant's connectors onlyTenant connector caches refreshedpresent
Internal-serviceevery tenant's connectorsAll connector caches refreshedabsent

Performance impact: the next request for each evicted connector incurs factory-creation overhead.

Authentication. This route is wrapped in apiAuthMiddleware (platform/agent/connector_refresh_api.go:123) and the tenancy comes from the authenticated identity — a caller can no longer evict another tenant's pool. Supply either:

  • Authorization: Basic base64(clientId:clientSecret) — the tenant lane (no credentials are required when DEPLOYMENT_MODE=community); or
  • X-Internal-Service-ID + X-Internal-Service-Token — the operator lane, which is the only way to trigger a deployment-wide eviction.

(Historical note: these four routes were registered with no auth middleware at all — #2883. They are authenticated as of #3067; the pre-#3067 "deploy behind network-level controls" advisory no longer applies.)

stats.cached_connectors is structurally 0 on this route: the refresh empties the scope immediately before the count is taken. That is the success signal, not a failure.

post/api/v1/connectors/refresh

Request

Response

Connectors refreshed

successboolean required

Whether the refresh operation succeeded

messagestring required

Human-readable status message. Also the signal for which scope the credential bought: Tenant connector caches refreshed vs All connector caches refreshed.

scope'all' | 'tenant' | 'connector' required

Which route produced this response

tenant_idstring

The authenticated tenant. Omitted on a deployment-wide refresh (internal-service credential on POST /api/v1/connectors/refresh), because no single tenancy describes the work done.

connectorstring

Connector name (when scope is connector)

durationstring required

Duration of the refresh operation

Example response

{
  "duration": "12.345ms"
}

Changes

No recorded changes to this operation across all 1 revision of this API.