Lumi
한국어 Open Lumi

Developers

OAuth

How an MCP client signs in to Lumi without a key - metadata, client registration, the PKCE code flow, tokens and revoking them.

Connector apps such as claude.ai find all of this on their own from the address https://ai.avenpa.com/mcp. This page is for people building such a client.

Discovery

A call to /mcp without a key answers 401 with:

WWW-Authenticate: Bearer realm="Lumi", resource_metadata="https://ai.avenpa.com/.well-known/oauth-protected-resource/mcp"
Document Address
Protected resource (RFC 9728) /.well-known/oauth-protected-resource/mcp
Authorization server (RFC 8414) /.well-known/oauth-authorization-server

Both are on https://ai.avenpa.com. The scope is lumi, the only one.

The flow

  1. Register (RFC 7591): POST /oauth/register with redirect_uris (1 to 5). https anywhere, http only to localhost, 127.0.0.1 or [::1], or an app’s own scheme. token_endpoint_auth_method is none (the default), client_secret_post or client_secret_basic; client_name up to 40 characters. The answer is 201 with a client_id, and a client_secret when you asked for one.
  2. Authorize: send the person’s browser to GET /oauth/authorize with client_id, redirect_uri, response_type=code, code_challenge and code_challenge_method=S256 (PKCE is required), and state. They sign in to Lumi if needed, see what the app will be able to do, and press Allow. Lumi checks that the account has the Go plan or higher and has agreed to the current terms. You get code, state and iss back at redirect_uri, or error=access_denied.
  3. Token: POST /oauth/token with grant_type=authorization_code, code, code_verifier, client_id (and the secret if you registered one) and redirect_uri. A code is good for 5 minutes, once.
{ "access_token": "lumi_mcp_…", "token_type": "Bearer", "scope": "lumi" }

The token

  • It is a Lumi key, the same kind people make by hand, so it also works on the REST API.
  • It doesn’t expire, and there is no refresh token. It lasts until the person unlinks the app in Lumi’s Settings › Keys, or you revoke it.
  • Signing the same app in again replaces its older token. An account holds up to 10 signed-in apps; past that, the oldest is dropped.
  • Using a code twice revokes the token it made (RFC 6749, 4.1.2).

Revoke

POST /oauth/revoke with token (RFC 7009) deletes a token that an app got by signing in. It always answers 200. Keys made by hand in Settings aren’t revoked here.

Errors

JSON as { "error", "error_description" }: invalid_redirect_uri, invalid_client_metadata, invalid_client (401), invalid_grant, unsupported_grant_type, slow_down (429, over 300 requests a minute from one address) and temporarily_unavailable (503).

Checked against the service on December 5, 2026