MCP Authentication
Model Context Protocol authentication integration. Add secure identity verification to MCP servers using OIDC with QR code authentication flows.
Demo
See an example of Nuggets authentication within an MCP server.
If you’re running an MCP server and want to add secure, verifiable authentication to your chat, Nuggets makes this easy using OpenID Connect (OIDC).
With Nuggets, users authenticate by scanning a QR code with their mobile app, proving specific attributes (e.g. identity, role, age) using Verifiable Credentials. This brings strong identity into the chat experience—without relying on usernames or passwords.
How to Integrated Nuggets into My MCP Server
To get started, create an OIDC Application Client in the Nuggets Account Portal. Here you will receive:
- A Client ID
- A private key for signing requests
- The ability to configure redirect URIs and verifications
Once set up, your MCP server simply:
- Generates an OIDC authentication request
- Displays a QR code in the chat UI
- Waits for the callback to receive the
id_token
- Verifies the token, extracts the claims, and authenticates the user in chat
Here’s what makes it powerful:
- Strong identity based on Verifiable Credentials
- Seamless UX with QR-based login
- Custom claims in the token (like
did
,role
, or other verified attributes)
Make sure to securely store the private key.
If you’re already running OIDC flows in your backend, this plugs in with minimal changes. And if not, Nuggets provides everything you need to get started securely.