claude.ai 같은 커넥터 앱은 주소 https://ai.avenpa.com/mcp만으로 이 모든 것을 스스로 찾아요. 이 페이지는 그런 클라이언트를 만드는 분을 위한 거예요.
찾기
열쇠 없이 /mcp를 부르면 401과 함께 이게 와요.
WWW-Authenticate: Bearer realm="Lumi", resource_metadata="https://ai.avenpa.com/.well-known/oauth-protected-resource/mcp"
| 문서 | 주소 |
|---|---|
| 보호된 리소스 (RFC 9728) | /.well-known/oauth-protected-resource/mcp |
| 인증 서버 (RFC 8414) | /.well-known/oauth-authorization-server |
둘 다 https://ai.avenpa.com에 있어요. 스코프는 lumi 하나뿐이에요.
흐름
- 등록 (RFC 7591):
redirect_uris(1~5개)와 함께POST /oauth/register를 불러요.https는 어디든 되고,http는localhost,127.0.0.1,[::1]로만 되고, 앱 자체 스킴도 돼요.token_endpoint_auth_method는none(기본),client_secret_post,client_secret_basic중 하나이고,client_name은 40자까지예요. 답은201과client_id이고, 요청했다면client_secret도 와요. - 승인: 그 사람의 브라우저를
GET /oauth/authorize로 보내요.client_id,redirect_uri,response_type=code,code_challenge,code_challenge_method=S256(PKCE는 필수),state를 달아요. 그 사람은 필요하면 Lumi에 로그인하고, 앱이 무엇을 할 수 있는지 보고, 허용을 눌러요. Lumi는 그 계정이 Go 요금제 이상이고 현재 약관에 동의했는지 확인해요.redirect_uri로code,state,iss가 돌아오거나error=access_denied가 와요. - 토큰:
grant_type=authorization_code,code,code_verifier,client_id(비밀을 등록했으면 비밀도),redirect_uri와 함께POST /oauth/token을 불러요. 코드는 5분 동안, 한 번만 쓸 수 있어요.
{ "access_token": "lumi_mcp_…", "token_type": "Bearer", "scope": "lumi" }
토큰
- 사람들이 손으로 만드는 것과 같은 종류의 Lumi 열쇠라서 REST API에서도 돼요.
- 만료되지 않고, 리프레시 토큰은 없어요. 그 사람이 Lumi의 설정 › 열쇠에서 앱을 해제하거나 내가 취소할 때까지 가요.
- 같은 앱이 다시 로그인하면 이전 토큰을 대체해요. 계정은 로그인한 앱을 10개까지 가질 수 있어요. 넘으면 가장 오래된 것이 빠져요.
- 코드를 두 번 쓰면 그 코드로 만든 토큰을 취소해요(RFC 6749, 4.1.2).
취소
token과 함께 POST /oauth/revoke(RFC 7009)를 부르면 앱이 로그인으로 받은 토큰을 지워요. 항상 200으로 답해요. 설정에서 손으로 만든 열쇠는 여기서 취소되지 않아요.
오류
JSON으로 { "error", "error_description" } 형태예요. invalid_redirect_uri, invalid_client_metadata, invalid_client(401), invalid_grant, unsupported_grant_type, slow_down(429, 한 주소에서 1분에 300번 넘는 요청), temporarily_unavailable(503)이 있어요.