# MovieFarming AI Agent Authentication (Auth.md)
*Specification: WorkOS Auth.md v1.0 & RFC 8414/9728*

Welcome AI Agents! MovieFarming provides fully programmatic authentication for automated discovery, content indexing, streaming validation, and search indexing.

---

## 1. Quick Start for Autonomous Agents
Public endpoints (searching catalog, checking trending feeds, reading SEO graph metadata) require no authentication:
- **Search:** `GET https://www.moviefarming.com/api/tmdb?endpoint=search/multi&query={query}`
- **Agent Catalog:** `GET https://www.moviefarming.com/.well-known/ai-catalog.json`
- **MCP Server Card:** `GET https://www.moviefarming.com/.well-known/mcp/server-card.json`

---

## 2. Dynamic Client Registration (RFC 7591)
Autonomous agents can register programmatically by submitting:

```http
POST /oauth/register HTTP/1.1
Host: www.moviefarming.com
Content-Type: application/json

{
  "client_name": "AutonomousSearchAgent/1.0",
  "grant_types": ["client_credentials"],
  "response_types": ["token"],
  "scope": "read:movies read:streams"
}
```

---

## 3. Scopes & Permissions
| Scope | Description |
| :--- | :--- |
| `read:movies` | Search and fetch catalog metadata & posters |
| `read:streams` | Query 4K stream servers and provider links |
| `read:trends` | Real-time trending clusters & keywords |
