Reads are cheap: a single JSON.parse per call. Writes are atomic via
write-then-rename so a crash mid-save cannot produce a half-written file.
Does NOT touch fields outside the OAuth envelope (auth_token, custom
fields) when saving — the MCP provider only mutates oauth_tokens,
oauth_client, oauth_resource, oauth_code_verifier, and oauth_discovery_state.
An own property explicitly set to undefined clears tokens, client, verifier
or discovery state. Omitted properties preserve stored values for partial
callers. Other fields keep their existing merge semantics.
Create a file-backed
OAuthConfigStorage.Reads are cheap: a single JSON.parse per call. Writes are atomic via
write-then-renameso a crash mid-save cannot produce a half-written file.Does NOT touch fields outside the OAuth envelope (
auth_token, custom fields) when saving — the MCP provider only mutatesoauth_tokens,oauth_client,oauth_resource,oauth_code_verifier, andoauth_discovery_state. An own property explicitly set to undefined clears tokens, client, verifier or discovery state. Omitted properties preserve stored values for partial callers. Other fields keep their existing merge semantics.