# auth.md

Indices-API authenticates AI agents and API clients with an **API key**.

## Audience

Agents connecting to:

- REST API: `https://indices-api.com/api/*`
- MCP: `https://indices-api.mcp.indices-api.com/mcp`

## Registration

1. Create an account: [https://indices-api.com/register](https://indices-api.com/register)
2. Copy your access key from the dashboard
3. REST: pass `?access_key=YOUR_ACCESS_KEY`. MCP: send `Authorization: Bearer YOUR_API_KEY`. Do not put the key in the MCP URL (`?api_key=` or `?apikey=`) — Claude Desktop and claude.ai reject tokens in the query string. There is no OAuth client.

## Methods

| Method | How |
|--------|-----|
| REST query | `https://indices-api.com/api/latest?access_key=<key>` |
| MCP header | `Authorization: Bearer <key>` on `https://indices-api.mcp.indices-api.com/mcp` (no key in the URL; do not use `npx` or `mcp-remote`) |

## Discovery

- OAuth Protected Resource: `/.well-known/oauth-protected-resource`
- Authorization Server metadata: `/.well-known/oauth-authorization-server`
- MCP Server Card: `/.well-known/mcp/server-card.json`
- Docs: [https://indices-api.com/mcp](https://indices-api.com/mcp)
