# Hanko (Passkey Auth) MCP for AI Agents AI Agent Connect

> Hanko (Passkey Auth) MCP lets you manage passkey registrations, logins, and user identities through your AI agent. It handles WebAuthn flows and admin tasks like listing credentials or creating users directly.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_FOAninCZae9duJcms78Myb9CbNaXDk54ffuUq1dU/ai-agent-connect
- **Tags:** authentication, passkeys, passwordless, webauthn, user-management, security

## Description

This Connector lets you talk to your Hanko instance to handle passkey-based authentication and user management. If you're building a passwordless system, you can tell your agent to run the heavy lifting of WebAuthn flows without you having to manually hit API endpoints. You can initiate a registration, get the public key options for your frontend, and then finalize the process all in one conversation. It's a big help for security audits where you need to see exactly which credentials a user has registered or for product teams who want to walk through a transaction flow without navigating a complex UI every single time. Because Vinkius hosts this Connector, you can plug it into your existing workflow and let your agent handle the identity management. You get to spend less time on the plumbing of security and more time on the actual features of your app.

## Tools

### passkey_delete_credential
Remove a specific WebAuthn credential from a user's account. Use this to clean up old or revoked keys.

### passkey_list_credentials
Check which passkeys a user has active. This is great for helping users manage their own devices.

### passkey_login_finalize
Complete the final step of a passkey login. This finishes the authentication process for the user.

### passkey_login_init
Get the public key options needed to start a passkey login. Use this to provide the correct data to your frontend.

### passkey_registration_finalize
Finish the registration of a new passkey. This completes the WebAuthn registration flow.

### passkey_registration_init
Get the public key options required to start a passkey registration. This provides the necessary data for navigator.credentials.create().

### admin_create_user
Create a new user in your Hanko project via the admin API. This is useful for setting up test accounts quickly.

### admin_get_user
Pull specific user details using their unique ID. Use this to check the status of a specific account.

### admin_list_user_credentials
See every WebAuthn credential a specific user has registered. This helps you audit a user's security posture.

### admin_list_users
Get a full list of all users currently in your Hanko instance. Use this to see your total user base.

### flow_execute
Run a specific Hanko flow action as needed. This gives your agent flexibility in handling custom flows.

### passkey_transaction_finalize
Complete a passkey-signed transaction like a payment. Use this to finish secure, multi-step actions.

### passkey_transaction_init
Start a passkey transaction for a specific user. This is useful for initiating secure payments or signed actions.

### public_get_jwks
Retrieve the JSON Web Key Set for token verification. Use this to get the keys needed for your backend.

### public_validate_session
Check if a Hanko session token is currently valid. Use this to quickly verify a user's active session.

## Prompt Examples

**Prompt:** 
```
Create a user named 'test_user_1' and show me their credentials.
```

**Response:** 
```
I've created the user 'test_user_1' in your Hanko project. Here are the details:

| User ID | Username | Credentials |
| :--- | :--- | :--- |
| `test_user_1` | `test_user_1` | 1 x FaceID Passkey |

Would you like me to list more details for this user?
```

**Prompt:** 
```
I need to start a passkey registration for 'user_99'. What options do I use?
```

**Response:** 
```
To start the registration for `user_99`, use these WebAuthn options:

```json
{
  "challenge": "...",
  "user": {
    "id": "user_99",
    "name": "user_99",
    "displayName": "user_99"
  },
  "pubKeyCredParams": [{"type": "public-key", "alg": -7}]
}
```
You can now pass this to your frontend's `navigator.credentials.create()` method.
```

**Prompt:** 
```
Is this session token valid? [token_here]
```

**Response:** 
```
I've checked the session token for you.

✅ **Status:** Valid
⏳ **Expires:** 2026-07-10T15:48:31Z

The session is active and can be used for authenticated requests.
```

## Capabilities

### Start passkey registrations
Get the public key options needed to initiate a new passkey registration for a user.

### Finish passkey logins
Complete the final step of a passkey login to grant access.

### Create new users
Add a new user to your Hanko project using the admin API.

### Delete old credentials
Remove specific WebAuthn credentials from a user's account.

### Validate session tokens
Check if a Hanko session token is currently valid.

### Fetch JSON Web Key Sets
Retrieve the JWKS required for token verification.

## Use Cases

### Testing a new signup flow
A developer asks the agent to register a user and get the options for a new passkey to see if the frontend handles the response correctly.

### Security audit
A security engineer asks the agent to list all credentials for a specific user ID to check for duplicate or outdated keys.

### Payment simulation
A product manager asks the agent to initialize and finalize a transaction to see how the passkey signs a mock payment.

### Bulk user creation
A developer needs to create 10 test users quickly and has the agent do it via the admin tools to populate a staging environment.

## Benefits

- Speed up testing by using passkey_registration_init to get options for your frontend without manual API testing.
- Audit security faster by using admin_list_user_credentials to see every registered passkey in one view.
- Manage users at scale by using admin_create_user and admin_list_users to handle identity data.
- Secure transactions easily by using passkey_transaction_init and passkey_transaction_finalize for payments.
- Verify sessions instantly with public_validate_session and public_get_jwks for token checks.
- Clean up old data by using passkey_delete_credential to remove specific WebAuthn credentials.

## How It Works

The bottom line is you get a direct line from your AI agent to your Hanko identity management system.

1. Subscribe to the Hanko MCP on Vinkius.
2. Add your Hanko Tenant ID and API Key to your configuration.
3. Ask your agent to create users or run WebAuthn flows.

## Frequently Asked Questions

**How does Hanko (Passkey Auth) MCP help with WebAuthn?**
It lets your AI agent handle the complex steps of WebAuthn, like getting the correct public key options and finalizing registrations, so you don't have to do it manually.

**Can I use Hanko (Passkey Auth) MCP to create users?**
Yes, you can ask your agent to create new users or list existing ones in your Hanko project using the built-in admin tools.

**How do I audit passkeys with Hanko (Passkey Auth) MCP?**
You can simply ask your agent to list the credentials for a specific user ID. It will pull the list of registered passkeys directly from your Hanko instance.

**Can Hanko (Passkey Auth) MCP handle payments?**
Yes, it can initialize and finalize passkey-signed transactions, which is perfect for testing secure payment flows in your app.

**Is Hanko (Passkey Auth) MCP safe for production?**
It uses your existing Hanko Tenant ID and API Key to perform actions. It's designed to work with your production identity flows securely.

**How do I get JWKS from Hanko (Passkey Auth) MCP?**
Just ask your agent to fetch the JWKS. It will retrieve the JSON Web Key Set you need for token verification on your backend.

**How do I start a new passkey registration for a user?**
Use the `passkey_registration_init` tool with the user's ID and username. This will return the necessary WebAuthn options to be used on the client side.

**Can I view all WebAuthn credentials associated with a specific user?**
Yes, you can use the `passkey_list_credentials` tool (or `admin_list_user_credentials` for admin access) to retrieve a list of all registered passkeys for any user ID.

**Is it possible to create a user directly through the AI agent?**
Absolutely. Use the `admin_create_user` tool to provision a new user in your Hanko project by providing a unique user ID.