# Auth.md

Performa.AI supports authenticated agent access for authorized customers through OAuth 2.1 and MCP. Public discovery documents explain what exists; private store data and operational actions require explicit customer authorization.

## Public Discovery

- Agent discovery page: https://performa.ai/agents
- API catalog: https://performa.ai/.well-known/api-catalog
- OAuth authorization server metadata: https://performa.ai/.well-known/oauth-authorization-server
- OAuth protected resource metadata: https://performa.ai/.well-known/oauth-protected-resource
- MCP server card: https://performa.ai/.well-known/mcp/server-card.json
- Agent skills index: https://performa.ai/.well-known/agent-skills/index.json
- ARD catalog: https://performa.ai/.well-known/ai-catalog.json

## Authentication Model

Performa.AI customer MCP access is user-authorized. An agent or connector must register through the OAuth authorization server, redirect the human customer for consent, use PKCE, and exchange the authorization code for scoped credentials.

Authorization server:

https://zsprqantasnhxoqpnjws.supabase.co/functions/v1/mcp-oauth

Protected MCP resource:

https://zsprqantasnhxoqpnjws.supabase.co/functions/v1/mcp-client

Supported scope:

- `client`: read-only access to the authorized customer's own store data.

## Registration

Dynamic client registration is available at:

https://zsprqantasnhxoqpnjws.supabase.co/functions/v1/mcp-oauth/register

Agents must provide valid redirect URIs. HTTPS redirect URIs are supported, and loopback redirect URIs may be used by local tools when allowed by the OAuth flow.

## Consent

Customers approve access from the Performa.AI authenticated environment. Access is scoped to the customer account and store permissions associated with the approving user.

## Revocation

Customers can revoke agent/MCP access from the authenticated Performa.AI dashboard:

https://performa.ai/dashboard/conectar-ia

## Security Requirements

- Do not request or store credentials outside the OAuth flow.
- Do not ask users to paste private tokens into public pages.
- Do not infer access from public documentation.
- Do not attempt write operations through the customer MCP server; the public customer MCP surface is read-only by product design.
- Treat all store analytics, billing, catalog, lead, and customer data as private.
