Expand description
MCP credential provider (v2.1).
Abstracts how an MCP transport obtains the credentials it needs to
authenticate against a server (API key, OAuth bearer token, …).
Implementations live outside oxicode-agent so that the storage backend
(e.g. oxicode-cli’s auth store) can be swapped without changing the
transport code.
The trait is deliberately narrow — two methods, both infallible from
the transport’s point of view (they return Option<Credential> and
the transport simply omits the Authorization header when no
credential is available). It is not promoted to a full SDK port
(see docs/designs/2026-06-19-mcp-v2-conformance-transports.md §D11
/ §5.2): MCP is an agent feature, not infrastructure, and most
products are happy with the noop default plus a per-product
implementation injected via crate::mcp::McpManager::set_credential_provider.
Structs§
- Credential
- A single credential materialising an MCP server’s authentication.
- Noop
Credential Provider - Default no-op provider. Returns
Nonefor every lookup, which tells transports to connect without authentication. Used bycrate::mcp::McpManagerwhen no real provider has been injected.
Traits§
- McpCredential
Provider - Source of authentication material for an MCP transport.