# auth.md

**Sortyra – authentication for automated agents.**

## Summary

| | |
|---|---|
| **MCP** | OAuth 2.1 authorization code flow with PKCE (MCP Authorization spec) |
| **Protected resource metadata** | `https://app.sortyra.com/.well-known/oauth-protected-resource` (RFC 9728) |
| **Authorization server metadata** | `https://app.sortyra.com/.well-known/oauth-authorization-server` (RFC 8414) |
| **Dynamic client registration** | Supported – `https://app.sortyra.com/oauth/register` (RFC 7591) |
| **Scopes** | `read` (read only), `write` (changes) |
| **Tokens** | Bound to the MCP resource `https://app.sortyra.com/mcp` (RFC 8707) |
| **REST API / MCP with a key** | `Authorization: Bearer fc_…` – organisation API key created by the user in the app |

## Notes

- A person always signs in and approves access – there is no self-service account creation for agents.
- Keys and tokens carry the permissions of the user or key that issued them (read-only keys cannot change data).
- Never put keys into URLs; send them only in the `Authorization` header over HTTPS.
