@ztechlab/mcp-server-yubikey
Allows reading YubiKey information via the ykman CLI, including device details, OTP slots, FIDO2 status and credentials, PIV certificates and keys, and OpenPGP status.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@ztechlab/mcp-server-yubikey What YubiKey is plugged in?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@ztechlab/mcp-server-yubikey
MCP server that exposes YubiKey management tools to AI agents via the ykman CLI.
Read-only. No writes, no resets, no destructive operations.
Prerequisites
YubiKey Manager CLI (
ykman) installed and on PATHA YubiKey connected via USB
Node.js 18+
Related MCP server: Voraxx MCP Server
Install
npm install -g @ztechlab/mcp-server-yubikeyConfiguration
Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"yubikey": {
"command": "mcp-server-yubikey"
}
}
}Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"yubikey": {
"command": "npx",
"args": ["-y", "@ztechlab/mcp-server-yubikey"]
}
}
}Custom ykman path
If ykman is not on PATH, set the YKMAN_PATH environment variable:
{
"mcpServers": {
"yubikey": {
"command": "mcp-server-yubikey",
"env": {
"YKMAN_PATH": "C:/Program Files/Yubico/YubiKey Manager CLI/ykman.exe"
}
}
}
}Tools
All tools are read-only. Tools that accept a serial parameter will use the only connected key if omitted.
Tool | Description |
| List all connected YubiKeys with serial numbers |
| Device details: serial, firmware, model, interfaces, enabled applications |
| OTP slot configuration (Slot 1 and Slot 2 status) |
| FIDO2 applet status: PIN set, credentials stored, remaining retries |
| List FIDO2 resident credentials (passkeys). Requires PIN. |
| List enrolled fingerprints (YubiKey Bio). Requires PIN. |
| PIV application status: management key type, PIN/PUK retries, certificate slots |
| PIV key metadata for a specific slot (9a, 9c, 9d, 9e) |
| OpenPGP application status: key slots, touch policies, signature count |
| OpenPGP key slot metadata (sig, enc, aut, att) |
Examples
Once configured, ask your AI agent:
"What YubiKey is plugged in?"
"Show me the FIDO2 status on my YubiKey"
"What PIV certificates are on this key?"
"List the OTP slot configuration"
License
MIT
Available Tools
10 toolsyubikey-fido-credentialsA
List FIDO2 resident credentials (passkeys) stored on the YubiKey. Requires PIN.
Inputs: pin (required), serial.
yubikey-fido-fingerprintsA
List enrolled fingerprints on a YubiKey Bio. Requires PIN.
Inputs: pin (required), serial.
yubikey-fido-infoB
Get FIDO2 applet status: PIN set, credentials stored, remaining retries
Inputs: serial.
yubikey-infoA
Get detailed information about a connected YubiKey (serial, firmware, model, interfaces, applications)
Inputs: serial.
yubikey-listA
List all connected YubiKeys with serial numbers
Inputs: no named parameters.
yubikey-openpgp-infoA
Get OpenPGP application status: key slots, touch policies, signature count
Inputs: serial.
yubikey-openpgp-keys-infoA
Get metadata about an OpenPGP key slot: key type, fingerprint, creation date
Inputs: key (required), serial.
yubikey-otp-infoA
Get OTP slot configuration (Slot 1 and Slot 2 status)
Inputs: serial.
yubikey-piv-infoA
Get PIV (smart card) application status: management key type, PIN/PUK retries, certificate slots in use
Inputs: serial.
yubikey-piv-keys-infoA
Get private key metadata for a PIV slot: key type, origin (generated vs imported), PIN policy, touch policy
Inputs: slot (required), serial.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct aspect of YubiKey functionality (FIDO, OpenPGP, OTP, PIV, general info), with no overlap. An agent can clearly differentiate them.
All tools follow the pattern 'yubikey-<subsystem>-<descriptor>', with only 'yubikey-list' and 'yubikey-info' being slightly standalone but still predictable.
10 tools cover the major YubiKey subsystems (FIDO, OpenPGP, OTP, PIV, listing, info) without being excessive or insufficient.
The tool set is entirely read-only, providing only info retrieval. Missing write operations (e.g., set PIN, generate keys, delete credentials) is a significant gap for management.
Maintenance
Related MCP Connectors
Read-only MCP server exposing a user ORANO library to their own AI agent.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Read-only MCP server for the OPERANT AI operating-agent calibration benchmark.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseCqualityCmaintenanceRead-only MCP server for querying a running Obsidian vault from agentic runtimes, exposing safe Obsidian CLI commands.551MIT
- AlicenseAqualityDmaintenanceA minimal, dependency-free MCP server that gives AI agents three real, read-only security-orchestration tools: cve_lookup, shodan_host_lookup, and nuclei_scan.3MIT
- FlicenseAqualityDmaintenanceA read-only MCP server that enables AI assistants to search files, list directories, retrieve system info, and get file metadata on the local file system.4-
- AlicenseAqualityDmaintenanceRead-only MCP server exposing a W3C PROV knowledge graph of verified facts with provenance, enabling AI agents to list, search, and check facts while enforcing that writes remain CLI-only.5MIT