docs/python-sdk/fastmcp-cli-deploy-credentials.mdx
fastmcp.cli.deploy.credentialsRestricted Horizon credential storage and resolution.
resolve_credential <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L130" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>resolve_credential(store: CredentialStore) -> ResolvedCredential
Resolve environment, stored, then interactive credentials.
revoke_and_clear_credential <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L161" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>revoke_and_clear_credential(client: HorizonClient, store: CredentialStore) -> None
Attempt remote revocation and always remove the stored credential.
AuthenticationRequiredError <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L33" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>No Horizon credential is available without interactive authorization.
AuthState <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L37" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Methods:
require_nonempty_api_key <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L45" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>require_nonempty_api_key(cls, value: SecretStr) -> SecretStr
ResolvedCredential <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L52" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>CredentialStore <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L57" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Persist the active personal Horizon API key.
Methods:
load <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L67" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>load(self) -> SecretStr | None
save <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L71" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>save(self, api_key: SecretStr | str) -> None
save_for_origin <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L84" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>save_for_origin(self, api_key: SecretStr | str) -> None
Save a key only while its issuing Horizon origin is active.
clear_if_matches <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L100" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>clear_if_matches(self, api_key: SecretStr | str) -> None
Clear a key only while its Horizon origin and value are active.
clear <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/deploy/credentials.py#L126" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>clear(self) -> None