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).

  1. The client POST / without Authorization401 with WWW-Authenticate: Bearer resource_metadata=…/.well-known/oauth-protected-resource.
  2. The client reads protected-resource and authorization-server metadata, registers (POST /oauth/register), and opens GET /oauth/authorize (PKCE S256, scope loby).
  3. The MCP redirects to Loby Cloud with a ticket (/?mcp_oauth=…).
  4. If you are signed in, or after email OTP, Loby Cloud posts the user token back to {mcpOrigin}/oauth/complete.
  5. The MCP redirects to the client with an auth code. POST /oauth/token exchanges it for the Bearer used on later POST / calls.

Endpoints

MethodPathRole
GET/.well-known/oauth-authorization-serverRFC 8414
GET/.well-known/oauth-protected-resourceRFC 9728
POST/oauth/registerDynamic client registration
GET/oauth/authorizePKCE authorize → Loby Cloud
POST/oauth/completeLoby Cloud posts the user token
POST/oauth/tokenAuth-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.

Previous
Connect
Next
Languages