Authentication
The staff MCP authenticates you, the Loby Cloud user. Every tool call forwards that Bearer token to GraphQL, so museum roles and permissionToModifyMuseum still apply. You only see museums you can manage.
OAuth (normal path)
The MCP is both the OAuth authorization server and the resource server. Login UI is the Loby Cloud Gate (https://loby.cloud).
- The client
POST /withoutAuthorization→401withWWW-Authenticate: Bearer resource_metadata=…/.well-known/oauth-protected-resource. - The client reads protected-resource and authorization-server metadata, registers (
POST /oauth/register), and opensGET /oauth/authorize(PKCE S256, scopeloby). - The MCP redirects to Loby Cloud with a ticket (
/?mcp_oauth=…). - If you are signed in, or after email OTP, Loby Cloud posts the user token back to
{mcpOrigin}/oauth/complete. - The MCP redirects to the client with an auth code.
POST /oauth/tokenexchanges it for the Bearer used on laterPOST /calls.
Endpoints
| Method | Path | Role |
|---|---|---|
GET | /.well-known/oauth-authorization-server | RFC 8414 |
GET | /.well-known/oauth-protected-resource | RFC 9728 |
POST | /oauth/register | Dynamic client registration |
GET | /oauth/authorize | PKCE authorize → Loby Cloud |
POST | /oauth/complete | Loby Cloud posts the user token |
POST | /oauth/token | Auth-code + PKCE (refresh is pass-through) |
Supported: response_type=code, grant_types authorization_code and refresh_token, code_challenge_method S256, token auth method none, scope loby. Bearer is sent in the Authorization header.
Bearer (local)
A client may send Authorization: Bearer <token> on POST / without OAuth. That token must be a user token the target GraphQL API accepts. Use this for local MCP. Hosted mcp.loby.io should use OAuth.
Permissions
There is no separate MCP API key. If a tool fails with a permission error, the signed-in user cannot change that museum in Loby Cloud either.