# Fretie — agent authentication

Fretie's API and MCP server are protected by OAuth 2.1 via **WorkOS AuthKit**.

## For interactive agents (Claude, ChatGPT, etc.)
Connect to the MCP server at `https://mcp.fretie.com/mcp`. It advertises OAuth
Protected Resource Metadata (RFC 9728) at
`https://mcp.fretie.com/.well-known/oauth-protected-resource`, which names the
authorization server agents should use for the OAuth 2.1 flow.

## For machine-to-machine / headless agents
Use the client_credentials grant against `POST https://api.fretie.com/auth/token`
with a client_id/client_secret issued in the WorkOS dashboard for your
organization, or an organization API key (see `https://api.fretie.com/.well-known/api-catalog`
for further links). No public self-registration endpoint exists yet — request
credentials from the organization you're integrating with.

## Resources
- Developer portal: https://fretie.com/developers
- OpenAPI spec: https://fretie.com/openapi.json (also https://api.fretie.com/openapi.json)
- Authorization-server metadata (RFC 8414): https://fretie.com/.well-known/oauth-authorization-server
- API catalog: https://api.fretie.com/.well-known/api-catalog
- Protected resource metadata: https://mcp.fretie.com/.well-known/oauth-protected-resource
- MCP server card: https://fretie.com/.well-known/mcp/server-card.json
