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
- Register (RFC 7591):
POST /oauth/registerwithredirect_uris(1 to 5).httpsanywhere,httponly tolocalhost,127.0.0.1or[::1], or an app’s own scheme.token_endpoint_auth_methodisnone(the default),client_secret_postorclient_secret_basic;client_nameup to 40 characters. The answer is201with aclient_id, and aclient_secretwhen you asked for one. - Authorize: send the person’s browser to
GET /oauth/authorizewithclient_id,redirect_uri,response_type=code,code_challengeandcode_challenge_method=S256(PKCE is required), andstate. 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 getcode,stateandissback atredirect_uri, orerror=access_denied. - Token:
POST /oauth/tokenwithgrant_type=authorization_code,code,code_verifier,client_id(and the secret if you registered one) andredirect_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).