# Agent authentication — Mystery Market

Buy Roblox items safely

## Public read APIs (no registration)

These endpoints are intended for agents and integrations without OAuth today:

| Endpoint | Method | Purpose |
|----------|--------|---------|
| `/api/v1/games` | GET | Active games |
| `/api/v1/items` | GET | Catalog items and reference values |
| `/api/market/listings` | GET | Live listings (supports `game`, `q`, pagination) |
| `/api/catalog/autocomplete` | GET | Catalog name search |
| `/api/agents/availability` | GET | Delivery agent pool status |
| `/api/health` | GET | Service health |

Discovery:

- API catalog (RFC 9727): `https://mystery.markets/.well-known/api-catalog`
- OpenAPI: `https://mystery.markets/api/openapi.json`
- LLM site brief: `https://mystery.markets/llms.txt`

Respect `robots.txt` and `Content-Signal` directives. Do not scrape admin, checkout, or account routes.

## User sign-in (buyers)

Purchases and account features use **Discord OAuth** through [NextAuth](https://next-auth.js.org/):

- Authorization: `https://mystery.markets/api/auth/signin/discord`
- Session: `https://mystery.markets/api/auth/session`
- Metadata: `https://mystery.markets/.well-known/oauth-authorization-server`
- Protected resource: `https://mystery.markets/.well-known/oauth-protected-resource`

There is no separate agent API key issuer yet. Machine clients should use the public read APIs above.

## Agent registration (future)

To register an automated agent for elevated access (when offered):

1. Read `https://mystery.markets/.well-known/oauth-protected-resource` for scopes and resource identifier.
2. Contact support via `https://mystery.markets/legal/contact` with your use case, expected request rate, and callback URL.
3. Watch `https://mystery.markets/.well-known/agent-skills/index.json` for skill updates.

## MCP and A2A

- MCP server card: `https://mystery.markets/.well-known/mcp/server-card.json`
- A2A agent card: `https://mystery.markets/.well-known/agent-card.json`
- Agent skills index: `https://mystery.markets/.well-known/agent-skills/index.json`

Homepage registers **WebMCP** tools (`search_listings`, `catalog_autocomplete`, `list_games`) when `navigator.modelContext` is available.

## Web Bot Auth

Outbound request signing directory (public keys only):

`https://mystery.markets/.well-known/http-message-signatures-directory`

Signing from this site is not enabled in production yet; keys are published for verification readiness.
