Set up sign-in from your coding agent

knuckles-mcp is an MCP server that gives coding agents (Claude Code, Cursor, any MCP client) the same powers as the CLI: create a tenant, turn on sign-in methods, and run doctor. A bundled Claude Code skill, knuckles-setup, walks the agent through the rest, including adding the SDK, the sign-in routes and the auth middleware to your app.

Your Knuckles server needs KNUCKLES_ADMIN_TOKEN set.

Install

uvx --from knuckles-cli knuckles login --url https://auth.example.com   # once; prompts for the admin token
claude mcp add knuckles -- uvx knuckles-mcp
uvx knuckles-mcp install-skill

uvx fetches and caches the packages on first use. Without uv, pip install knuckles-mcp installs both the knuckles and knuckles-mcp commands; drop the uvx prefixes.

Then, in your app’s repo, ask:

Add Knuckles sign-in with Google, email links and passkeys to this app.

The agent checks the server, creates the tenant (writing its credentials into your .env), asks you for the provider files it needs, configures each method, wires the app, and finishes with doctor.

What the agent will ask you for

The agent never asks you to paste a secret. It asks for file paths:

Method What to get Where
Email A Resend API key saved to a file, and a verified sending domain resend.com
Google The client_secret_*.json for a Web application OAuth client Google Cloud Console
Apple Team id, Services ID, and the AuthKey_<KEYID>.p8 key Apple Developer portal
Passkeys Nothing; just the site’s origin —

The step-by-step walkthroughs for each provider are in the setup guide.

Or connect by URL (hosted)

Your Knuckles server also serves MCP itself at /v1/mcp, so an agent can connect with nothing installed. Put the server in your project’s .mcp.json and keep the admin token in your shell environment (never commit it):

{
  "mcpServers": {
    "knuckles": {
      "type": "http",
      "url": "https://auth.example.com/v1/mcp",
      "headers": { "X-Admin-Token": "${KNUCKLES_ADMIN_TOKEN}" }
    }
  }
}

The hosted endpoint never handles a secret, so it can do less than the local server:

  Local (knuckles-mcp) Hosted (/v1/mcp)
List, show and check tenants Yes Yes
Create a tenant Yes, secret written to .env Yes, but no secret; mint it locally with knuckles apps rotate-secret <id> --env-file .env
Origins, passkeys, clear a method Yes Yes
Rotate secret, email, Google, Apple Yes, from files No; run the knuckles providers ... command locally

Like the rest of the admin API, /v1/mcp 404s unless KNUCKLES_ADMIN_TOKEN is set on the server. See Decision #028.

Using another MCP client

Point it at the knuckles-mcp command over stdio. To skip knuckles login, set KNUCKLES_URL and KNUCKLES_ADMIN_TOKEN in the server’s environment instead. The tool reference is in the package README.


Knuckles is open source under the MIT license.

This site uses Just the Docs, a documentation theme for Jekyll.