Authorization header covers the HTTP API and the local MCP adapter.
The hosted MCP endpoint (/mcp) authenticates with OAuth 2.1, which MCP
clients negotiate automatically.
Public vs. protected endpoints
No token required:GET /healthz,GET /readyz— health probes.GET /v1/meta/fields— the field catalog.GET /v1/docs,GET /v1/openapi.json— Swagger UI and OpenAPI spec.
POST /v1/ask,POST /v1/fetch— all data requests./mcp— the hosted MCP endpoint (OAuth 2.1 bearer).- Account and token-management routes under
/v1/users/me/*.
Getting a token
There are three paths, depending on what you’re building:1. API token from the dashboard (services, scripts, CI)
Sign in at www.mireye.com (Google or email/password with a verified address) and create an API token in account settings. Tokens are JWTs with a 90-day default lifetime; the plaintext is shown at creation and can be re-revealed later from the dashboard as long as the token is still active andrecoverable (a signing-secret rotation can leave active tokens unrecoverable).
Use it directly:
403 auth_method_not_allowed):
2. Device-flow login (local MCP stdio adapter)
Themireye-mcp stdio adapter authenticates
once with a browser hand-off and stores the resulting API token locally:
POST /v1/mcp/device/start → browser approval at
www.mireye.com → POST /v1/mcp/device/poll, and saves the token to
~/.config/mireye-mcp/credentials.json, bound to the
MIREYE_BASE_URL it was minted for. Alternatively, set
MIREYE_BEARER_TOKEN in the adapter’s environment with a dashboard
token.
3. OAuth 2.1 + PKCE (hosted MCP endpoint)
MCP clients that connect tohttps://api.mireye.com/mcp (e.g.
claude mcp add --transport http …) discover and complete OAuth on
their own. The API publishes authorization-server metadata at
/.well-known/oauth-authorization-server, with dynamic client
registration at /register, authorization at /authorize, token
exchange at /token, and revocation at /revoke.
Access tokens minted for /mcp are scoped to MCP tool calls — they are
not accepted as general /v1/* API tokens. Use a dashboard API
token for direct HTTP calls.
Auth error codes
Auth failures use the same structured shape as every other error:{"detail": {"error", "message"}}.
Unauthenticated requests to the hosted
/mcp endpoint return 401 with
a WWW-Authenticate header pointing at the OAuth metadata, which is how
MCP clients know to start the OAuth flow.