Managoat.McpAuth (managoat_mcp_auth v0.1.0)

Copy Markdown View Source

MCP authorization discovery and its server-side URL guard.

discover/1 follows the authorization chain an MCP server advertises: RFC 9728 protected-resource metadata from the server's challenge or well-known URL, RFC 8414 authorization-server metadata with the OpenID discovery fallback, and RFC 7591 dynamic client registration through register/3 when the server offers it.

Every URL in that chain passes through Managoat.McpAuth.UrlGuard. The guard requires HTTPS and a public hostname, including for URLs supplied by metadata documents. That last part matters: without it, a malicious resource document could point the next discovery request at a cluster's metadata service or another private address.

Summary

Types

metadata()

@type metadata() :: Managoat.McpAuth.Discovery.metadata()

Functions

discover(mcp_url)

See Managoat.McpAuth.Discovery.discover/1.

register(metadata, redirect_uri, opts)

See Managoat.McpAuth.Discovery.register/3.