Documentation
What Rekey does, top-to-bottom.
Rekey is MIT licensed and free to self-host. The SDKs are live on npm under the @rekey.dev scope, and every REST endpoint is documented in the interactive API reference. Need a hand? Talk to the team.
# server SDK pnpm add @rekey.dev/node # next.js + react helpers pnpm add @rekey.dev/nextjs @rekey.dev/react # cli + mcp server pnpm add -g @rekey.dev/cli @rekey.dev/mcp
Self-host quickstart
Boot the whole stack with one docker compose --profile full up, or deploy on Dokploy with automatic HTTPS. Env vars, public URLs, and a production checklist.
See guide →End-user auth
Email + password, OAuth (Google, GitHub, plus OIDC). MFA with TOTP + backup codes. Refresh-token rotation, role-per-Application, session revocation.
API reference →Billing
BillingProvider interface — Stripe, PayPal, Razorpay live behind one schema. Subscriptions, Licenses, and Usage plans. BYO credentials per Tenant.
API reference →API keys
Public + secret key pairs per Application. Scoped, rotatable, revocable. Public keys are safe to ship to browsers.
API reference →MCP server
Per-Application MCP server with OAuth 2.1 + PKCE + dynamic client registration, off until you enable it on the Application. End-users authenticate from Claude Desktop / Code / Cursor and the agent reads their own account data.
MCP guide →Webhooks
Signed outbound events Rekey POSTs to your backend — user lifecycle, payments, subscriptions, dunning. HMAC-SHA256 signature, the JSON envelope, verification code, and the full event catalog.
Webhooks guide →Error catalog
Every error carries code + message + fix. The fix line tells you what to do — no Slack-pinging the integration engineer.
API reference →SDKs
All published on npm under the @rekey.dev scope. Written in TypeScript, shipped as ESM, typed end-to-end.
@rekey.dev/nodeServer SDK — typed, zero-any. Errors carry fix: lines.@rekey.dev/reactReact hooks + drop-in <SignIn /> / <SignUp /> components.@rekey.dev/nextjsNext.js adapters — App Router middleware, route handlers.@rekey.dev/cliNon-interactive CLI. --json everywhere, money as integers.@rekey.dev/mcpRead-only MCP server for Claude / Cursor / Claude Code.@rekey.dev/shared-typesZod schemas shared between API and SDKs.
Building with an AI agent?
Point your coding agent at the integration spec — the model rules (org vs user billing, secret vs public keys, server-side entitlements, webhook registration) that prevent the common first mistakes. Also served as plain text at /docs/prompt/raw.
