@ztechlab/mcp-server-yubikey
MCP server that exposes read-only YubiKey management tools (info, FIDO2, PIV, OpenPGP, OTP) to AI agents via the ykman CLI.
README
@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 PATH - A YubiKey connected via USB
- Node.js 18+
Install
npm install -g @ztechlab/mcp-server-yubikey
Configuration
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 |
|---|---|
yubikey-list |
List all connected YubiKeys with serial numbers |
yubikey-info |
Device details: serial, firmware, model, interfaces, enabled applications |
yubikey-otp-info |
OTP slot configuration (Slot 1 and Slot 2 status) |
yubikey-fido-info |
FIDO2 applet status: PIN set, credentials stored, remaining retries |
yubikey-fido-credentials |
List FIDO2 resident credentials (passkeys). Requires PIN. |
yubikey-fido-fingerprints |
List enrolled fingerprints (YubiKey Bio). Requires PIN. |
yubikey-piv-info |
PIV application status: management key type, PIN/PUK retries, certificate slots |
yubikey-piv-keys-info |
PIV key metadata for a specific slot (9a, 9c, 9d, 9e) |
yubikey-openpgp-info |
OpenPGP application status: key slots, touch policies, signature count |
yubikey-openpgp-keys-info |
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.