FastestMCP.Auth.StaticToken (fastest_mcp v0.2.0)

Copy Markdown View Source

Hermetic bearer-token authenticator for server-side and local testing.

Tokens are configured declaratively as a map keyed by raw token value:

%{
  "token-value" => %{
    client_id: "service-a",
    audiences: ["https://mcp.example.com/mcp"],
    scopes: ["tools:call"],
    principal: %{"sub" => "service-a"}
  }
}

Summary

Functions

Authenticates the incoming input and returns an updated context or an error.

Functions

authenticate(input, context, opts)

Authenticates the incoming input and returns an updated context or an error.