# `AshAi.Mcp.OAuth.ClientMetadataPlug`
[🔗](https://github.com/ash-project/ash_ai/blob/v1.5.6/lib/ash_ai/mcp/oauth/client_metadata_plug.ex#L6)

Serves the Client ID Metadata Document from
`AshAi.Mcp.OAuth.client_metadata_document/1`.

Mount it at the URL you pass as `:client_metadata_url`. It takes the same
options as `AshAi.Mcp.OAuth`, given directly, as `{module, function, args}`,
or as a zero-arity function, so they can be read at runtime:

    forward "/oauth/client-metadata.json", AshAi.Mcp.OAuth.ClientMetadataPlug,
      {MyApp.Mcp, :oauth_options, []}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
