Docs · Start Overview Choose the right entry point and understand the pre-alpha boundary. Docs · Start Getting started Install the pinned toolchain and validate the repository locally. Docs · Start Core contract examples Compile the first Agent, typed Tool, Model stream, and explicit protocol mapping without runtime dependencies. Docs · Start Typed Agent Generate and pin typed schemas, then bind the first-party OpenAI and Anthropic adapters. Docs · Start In-process Agent Run a typed Agent without HTTP while preserving PostgreSQL durability, authorization, recovery, and owned roles. Docs · Start Durable admission Atomically commit authenticated intent, database time, the first event, and the initial checkpoint. Docs · Start Durable runs and results Submit with a durable ingress key, recover the original run, and read a verified public result. Docs · Understand Compile a graph Build a schema-pinned graph, validate its topology, and freeze its canonical digest. Docs · Understand Subgraphs and loops Compose shared-state subgraphs, finite loops, and explicit recovery-safe return paths. Docs · Understand Skill composition Choose capability bundles, shared-state subgraphs, durable child runs, and guarded MCP Skills without creating a second runtime. Docs · Understand Durability model Learn how journal, checkpoint, lease, fence, and recovery evidence fit together. Docs · Understand Durable Graph runtime Register exact executable code, replay noninitial state, and drive deterministic bounded sibling batches under one fence. Docs · Understand Durable Agent Loop Commit lifecycle handoffs and execute one tenant-scoped durable scheduling quantum. Docs · Understand Durable invocations Execute exact model and tool attempts with durable starts, staged ordered Tool coordination, streaming validation, and no-dispatch terminal recovery. Docs · Understand Provider-native Agent Compile and operate the durable multi-turn graph with bounded output repair, ordered parallel read-only Tools, write barriers, policy, accounting, and cancellation evidence. Docs · Integrate Local Rust Tools Generate digest-pinned schemas, register typed local code, and preserve the durable invocation boundary. Docs · Integrate AgentService v1 Authorize and expose exact durable Agent revisions through the versioned embedding boundary. Docs · Integrate Agent HTTP v1 Submit, recover, read and cancel through authenticated bounded JSON HTTP. Docs · Integrate General MCP Tool client Discover and call bounded stateless MCP 2026-07-28 Tools with JSON/SSE, OAuth, custom headers, and mediated MRTR. Docs · Integrate MCP OAuth client Bind one MCP resource to challenge-driven discovery, PKCE, issuer validation, durable credentials, and bounded replay. Docs · Integrate MCP Remote Tool Bind one strict stateless MCP 2026-07-28 Tool with pinned identity, schemas, durable dispatch, and reconciliation. Docs · Integrate MCP Server profile Expose bounded Tools, Resources, Prompts, Completion, and MRTR behind the strict stateless production boundary. Docs · Integrate MCP Skills Publish and activate Final SEP-2640 static Skills with immutable manifests, origin-scoped approval, and verified lazy reads. Docs · Integrate MCP conformance status See the frozen official runner inventory, implemented evidence, and exact boundary of current MCP claims. Docs · Integrate A2A 1.0 Client Discover and pin one agent, call all eleven operations, and reconcile durable unknown sends only through attested remote guarantees. Docs · Integrate Durable artifact storage Materialize terminal A2A parts into immutable PostgreSQL metadata and private integrity-checked object bytes. Docs · Integrate A2A 1.0 Server Expose bounded HTTP+JSON and JSON-RPC/SSE through identity-first policy and a durable service contract. Docs · Integrate A2A conformance status Inspect the frozen official TCK, audited harness patch, exact result, and server-only claim boundary. Docs · Operate Fair scheduling Configure replica-safe weighted tenant selection, exact starvation bounds, rollout, and retention. Docs · Operate PostgreSQL provider Configure, migrate, verify, and test the implemented durability provider. Docs · Operate Host qualification Record bounded capacity, recovery and fault evidence without turning CI into a production SLO claim. Docs · Project Versioning and releases Pin the public alpha exactly and understand compatibility, MSRV, durable-data, and release gates. Docs · Project Implementation status See what is implemented, in progress, and deliberately not claimed. Home Architecture map What exists, what is active, and what remains planned. Home Current cut Implemented slices and explicit gaps. Home Roadmap The path from contracts to a qualified v1. Repository Source code StateKnot/StateKnot on GitHub. Repository RFCs Draft architecture and durable execution contracts. Repository Security policy Private vulnerability reporting and support policy.
↑↓ navigate ↵ open 39 results

Pre-alpha documentation

Authorize one MCP resource without widening trust.

Configure StateKnot's challenge-driven MCP OAuth client, durable credential stores, exact callback boundary, bounded replay, and frozen official evidence.

Bind OAuth to one exact resource

Production MCP resources require HTTPS. The host supplies a trusted user agent plus encrypted, tenant-scoped credential and expiring PKCE-state stores. The in-memory constructor is for processes that deliberately do not promise restart recovery.

Rust · durable OAuth binding
use std::sync::Arc;

use stateknot_integrations::{
    McpClient, McpClientIdentity, McpClientOptions,
    McpOAuthAuthorization, McpOAuthOptions, McpOAuthRegistration,
    McpOAuthResource, ProviderEndpoint,
};

let endpoint = ProviderEndpoint::https("https://mcp.example.com/mcp/")?;
let resource = McpOAuthResource::from_endpoint(&endpoint)?;
let registration = McpOAuthRegistration::client_metadata_document(
    "https://agent.example.com/oauth/client-metadata.json",
)?;
let policy = McpOAuthOptions::native(
    "http://127.0.0.1:49152/callback",
    "Inventory Agent",
    registration,
)?;
let authorization = Arc::new(
    McpOAuthAuthorization::new_with_stores(
        resource,
        policy,
        user_agent,
        encrypted_credential_store,
        expiring_pkce_state_store,
    )
    .await?,
);

let client = McpClient::connect(
    endpoint,
    McpClientIdentity::new("inventory-agent", "1.0.0")?,
    authorization,
    McpClientOptions::default().with_maximum_authorization_retries(1)?,
)
.await?;

Use pre-registration when credentials were provisioned out of band. Use CIMD for a published HTTPS client metadata document. Enable DCR fallback only when it is an accepted deployment policy.

Keep challenge recovery finite

  1. The client sends anonymously when no usable credential exists.
  2. A bounded 401/403 Bearer challenge drives protected-resource and authorization-server discovery.
  3. StateKnot restores issuer-bound credentials or starts a PKCE flow using pre-registration, CIMD, then DCR according to policy.
  4. The host opens the validated authorization URL and returns the complete callback URL from the exact registered origin and path.
  5. After token exchange, the MCP method is replayed once with a fresh JSON-RPC ID. Timeout and ambiguous dispatch are never replayed.

A 403 triggers step-up only for an explicit insufficient_scope challenge carrying a scope. Scope upgrade and transport replay have separate hard ceilings. An issuer change forces a new issuer-bound registration flow.

Own the user-agent boundary

A native host reserves its loopback listener before opening the browser, accepts only the configured address, port, and path, returns one complete callback URL, and closes the listener. StateKnot enforces a five-minute default handoff timeout, exact callback binding, PKCE, state, RFC 8707 resource indicators, and RFC 9207 issuer checks. URLs, codes, verifier material, client identity, and tokens must never enter logs.

Treat stores as security infrastructure

  • Encrypt access tokens, refresh tokens, client secrets, and PKCE state at rest with a rotation procedure.
  • Isolate records by tenant, principal, MCP resource, and authorization server issuer.
  • Make state one-time and expiring; make credential replacement atomic.
  • Emit only redacted audit facts for discovery, registration, refresh, migration, scope upgrade, cancellation, and failure.

Reproduce the exact claim

Shell · local contract and frozen official gate
cargo test -p stateknot-integrations --test mcp_client_contract --locked
bash conformance/mcp-client/run-2026-07-28.sh

The frozen gate passes all 32 scored client scenarios, including all 25 OAuth scenarios: 371 scored assertions succeed and zero fail. Seven explicitly not-scored extensions are reported separately and remain outside the claim. Read the complete evidence boundary and the full operating contract.