Skip to main content

Crate af_mcp_client

Crate af_mcp_client 

Source
Expand description

Fail-closed MCP client over Streamable HTTP: administrator-allowlisted HTTPS endpoints, credential references resolved by the host, product authorization before any I/O, tenant-scoped audit that makes calls idempotent, per-call timeouts and a circuit breaker. Exposed to the loop as McpClientPlugin.

Modules§

testing
In-memory MCP transport, guard and audit doubles.

Structs§

McpCallContext
Identity and Session position of one remote tool call, used for guards and audit.
McpCallControl
Caller-owned cancellation and deadline for one MCP operation.
McpClient
Guarded, audited, circuit-broken client for one endpoint.
McpClientPlugin
Trusted plugin exposing the endpoint’s allowlisted tools to the loop.
McpCredential
Resolved credential injected as one HTTP header.
McpEndpoint
Administrator-allowlisted remote MCP endpoint and its guard rails.
McpTool
A tool advertised by the remote server.
McpToolResult
Result of one remote tool call.
StreamableHttpTransport
Streamable HTTP transport with DNS pinning and no redirects.

Enums§

McpCallClaim
Audit decision for an idempotent call.
McpError
Failure from the MCP client.

Traits§

McpAudit
Tenant-scoped audit log that also makes calls idempotent.
McpCredentialProvider
Host-owned resolution of credential references to secrets.
McpGuard
Product authorization for remote calls, evaluated before any network I/O.
McpTransport
Wire transport for MCP over Streamable HTTP.