# TAG Lending Group agent authentication

TAG Lending Group LLC (NMLS #2329372) exposes a small public, read-only API at https://api.taglendinggroup.com. It returns public facts only: company info, licensed states, office contact, and links to loan program pages. It never exposes borrower data, rates, or pricing. Credentials are free, self-serve and anonymous. Spec: https://github.com/workos/auth.md

## Discover

Fetch https://api.taglendinggroup.com/.well-known/oauth-protected-resource (RFC 9728) and https://api.taglendinggroup.com/.well-known/oauth-authorization-server (RFC 8414). The authorization server metadata carries an `agent_auth` block with `identity_endpoint`, `identity_types_supported` and a `skill` pointer to this file. An unauthenticated call returns 401 with a `WWW-Authenticate: Bearer resource_metadata="..."` header.

## Pick a method

Only `anonymous` is supported in `identity_types_supported`. `identity_assertion` (including the id-jag token type) and `service_auth` are not offered because no data here is tied to a person or account.

## Register

POST https://api.taglendinggroup.com/agent/identity (alias: POST https://api.taglendinggroup.com/oauth/register). No body is required. The response contains `client_id` and `client_secret`.

## Claim

Not needed. Anonymous identities have no owner to claim them. The `claim_endpoint` at https://api.taglendinggroup.com/agent/claim answers with a JSON explanation.

## Exchange

POST https://api.taglendinggroup.com/oauth/token with `grant_type=client_credentials`, `client_id`, `client_secret` and an optional space-separated `scope`. Scopes: company:read, licensing:read, contact:read, programs:read.

## Use the access_token

Send `Authorization: Bearer <access_token>` to https://api.taglendinggroup.com/api/v1/company, /licensing, /contact, /programs and to MCP `tools/call` at https://api.taglendinggroup.com/mcp. Tokens last one hour. `tools/list` and `initialize` need no token.

## Errors

Errors are JSON: `{"error":{"code","message","hint","docs"}}`. Missing or invalid tokens return 401 with `WWW-Authenticate`. A token without the needed scope returns 403 with `insufficient_scope`.

## Revocation

Tokens expire after one hour and are not stored. To stop using an identity, discard its credentials. Contact 305-503-8655 to report abuse.

## Limits

Nothing here is a commitment to lend. Do not send borrower personal or financial data to any TAG agent endpoint. Rate or pricing questions go to a licensed MLO at 305-503-8655.
