One identity for every Micro Club project.
Log in with Discord once, sync roles and members, and receive signed data from your project, all through one API.
$ npx mcid-cli login --profile prod- Discord OAuth
- SSO
- Signed webhooks
- Role sync
- REST API
- mcid-cli


A login your project never has to build
MCID runs the Discord OAuth flow, keeps the session and knows every role. Your project redirects, receives a code and asks MCID who the member is.
Step 1: Your project redirects to MCID
Send the browser to /auth/sso/authorize with your project id, a registered redirect address and a state.
GET /auth/sso/authorize?client_id=…&state=…Step 2: The member signs in with Discord once
MCID asks Discord only when there is no SSO session yet. After that, every club project signs the member in without a prompt.
mcid_sso cookie set · next login skips DiscordStep 3: Your backend exchanges the code
POST /auth/token with your API key returns a session token, the public profile and the server roles, ready to gate your pages.
POST /auth/token → { token, member, roles }
Identity, roles and data in one place
The pieces every club project needs, shared instead of rebuilt each semester.
SSO across projects
One Discord login covers every Micro Club project. Sessions are scoped per project, and a member can log out everywhere at once.
Role and permission sync
Members and roles follow Discord through gateway events and queued syncs. Check one permission or a batch in a single call.
Admin panel with access levels
Each role gets none, read, write or manage on every resource, so leads see what they run and nothing else.
Inbound webhooks
Projects send HMAC-signed submissions. MCID validates them against a form schema and keeps them for review.
mcid-cli
Run MCID from the terminal: create projects and keys, sync servers, check member access, test sign-in and manage your webhooks without the panel.
Audit and monitoring
Every admin change is recorded with who made it and when, next to the health of the API and the Discord bot.
Exchange a code, get a member
Your backend trades the one-time code for a 30-day session. The response carries the public profile and the member roles, read from Discord.
- Codes work once and expire after 120 seconds.
- Tokens are scoped to your project and never cross projects.
- POST /auth/validate returns the live roles of a token.
Request
curl -s -X POST "$MCID_URL/auth/token" \ -H "X-API-Key: $MCID_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "clientId": "<project id>", "code": "<the code from the redirect>", "redirectUri": "http://localhost:4000/callback" }'Response 200
{ "token": "cfcf51c8987f7028...", "refreshToken": "b86ac997ca73309d...", "expiresAt": "2026-11-04T18:16:43.479Z", "member": { "id": "800000000000000010", "username": "alice", ... }, "roles": [{ "roleId": "179122419032032858", "roleName": "Dev", ... }]}Plug your project into MCID
Register a project, get an API key and sign members in with Discord in an afternoon.