# Authentication for AI agents (Eterna AI)

This page explains how automated agents authenticate with Eterna MCP when trading
via the Eterna AI surface.

## Authorization server

- Issuer: `https://ai-auth.eterna.exchange`
- Discovery: `https://ai-auth.eterna.exchange/.well-known/oauth-authorization-server`
- Protected resource metadata: `https://ai.eterna.exchange/.well-known/oauth-protected-resource`

## MCP resource

- MCP HTTP endpoint: `https://mcp.eterna.exchange/mcp`
- Resource audience: `https://mcp.eterna.exchange`
- Scope: `mcp:full`

## Typical agent flow

Humans paste `https://mcp.eterna.exchange/mcp` into an MCP client and approve the browser sign-in. The gateway creates the sub-account. Do not call `register_agent`.

Automated clients:

1. Read `/.well-known/api-catalog` and `/.well-known/mcp/server-card.json` on this site.
2. Register an OAuth client on the authorization server.
3. Complete the device authorization flow for the user.
4. Call the MCP endpoint with a Bearer access token scoped for `mcp:full`.
5. Use only these MCP tools: `search_sdk`, `search_examples`, `execute_code`.

## Human-readable docs

- MCP overview: https://docs.eterna.exchange/mcp
- MCP authentication: https://docs.eterna.exchange/mcp/auth
- Quickstart: https://github.com/EternaHybridExchange/eterna-mcp/blob/main/QUICKSTART.md
- Agent skills: `https://ai.eterna.exchange/.well-known/agent-skills/index.json`

## Related discovery files

- `https://ai.eterna.exchange/llms.txt`
- `https://eterna.exchange/llms.txt`
