Skip to main content
Every data request to Mireye Earth is authenticated with a bearer token:
There are no API-key query parameters and no custom headers — one 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.
Token required:
  • 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 and recoverable (a signing-secret rotation can leave active tokens unrecoverable). Use it directly:
Manage tokens over the API itself (these routes require a Firebase web session, i.e. browser sign-in — API-token callers get 403 auth_method_not_allowed):

2. Device-flow login (local MCP stdio adapter)

The mireye-mcp stdio adapter authenticates once with a browser hand-off and stores the resulting API token locally:
This drives POST /v1/mcp/device/start → browser approval at www.mireye.comPOST /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 to https://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.

Rate limits and quotas

V1 has no metered request quotas — auth is account-based and the deploy is sized for the early-adopter wave. Specific abuse-prevention limits exist on unauthenticated device-flow starts and on token reveals. If you have a high-volume use case, email ansh@mireye.earth.