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.

Start the quickstart

Already know the model? Go straight to the API reference or the SDK reference.

Installlive on npm
# server SDK
pnpm add @rekey.dev/node

# next.js + react helpers
pnpm add @rekey.dev/nextjs @rekey.dev/react

# astro
pnpm add @rekey.dev/astro

# cli + local mcp server, self-host only (needs SUPER_ADMIN_KEY)
pnpm add -g @rekey.dev/cli @rekey.dev/mcp

Run the whole stack, then point an app at it

API, Postgres, Redis, the operator panel and the customer portal, on your machine. Nothing to sign up for.

docker compose --profile full up

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 and zero-any. Errors carry fix: lines.
  • @rekey.dev/reactReact hooks + drop-in <SignIn /> / <SignUp /> components.
  • @rekey.dev/nextjsNext.js adapters for App Router middleware and route handlers.
  • @rekey.dev/astroSession handling for Astro: middleware, cookies, and the two rules that are easy to get wrong.
  • @rekey.dev/cliNon-interactive CLI. --json everywhere, money as integers. Self-host only: it calls the admin API with SUPER_ADMIN_KEY.
  • @rekey.dev/mcpLocal stdio MCP server for Claude / Cursor / Claude Code. Eight read tools plus `mint_api_key`. The read tools take SUPER_ADMIN_KEY, so they are self-host only; on Rekey Cloud use the hosted operator MCP (see MCP server above).
  • @rekey.dev/shared-typesZod schemas shared between API and SDKs.
Full SDK method reference

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.

AI agent integration guide
Have a question? Ask the team.
Documentation: API, SDKs, auth & billing | Rekey