check_keypair
Check if a key pair exists for the given key ID
Give each agent its own signing key, generated and kept on the local machine.
LABSCO SUMMARY
The tools return public keys and signatures as base64 and nothing else, so an agent can prove something cryptographically without ever holding the key it used. Encryption at rest is where the responsibility lands on you: it is off until ENCRYPT_STORE is set and a key is supplied.
A local key manager over MCP. It generates signing keypairs scoped to a key id, stores them in a file-based keystore, signs base64 payloads without exposing private key material, rotates keys while preserving the algorithm, and deletes them with an optional secure wipe.
The npm package local-kms-mcp-server, run with npx -y or installed globally. Node.js 24.0.0 or newer. STORE_PATH is the directory holding the key files and defaults to ./keys. ENCRYPT_STORE set to true turns on encryption at rest, which then requires STORE_ENCRYPTION_KEY, a base64-encoded 32-byte value. TRANSPORT defaults to stdio; set it to http with PORT to expose POST /mcp on a local endpoint. Pass these through the client's env block rather than a .env file so startup is deterministic.
One command — npx -y local-kms-mcp-server
USE CASES
One keypair per key id, so tasks and agents can be told apart by what they signed.
Pass a base64 payload, get a base64 signature back, with the private key never leaving the process.
The replacement keeps the same curve, so verifiers downstream do not need reconfiguring.
Delete the pair, with an optional overwrite so the material is not just unlinked.
Ed25519 for general signing, secp256k1 for Web3, P-256 for WebAuthn and cloud KMS compatibility.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
check_keypairCheck if a key pair exists for the given key ID
delete_keyDelete a key pair from the keystore
generate_keyGenerate and store a new key pair for the given key ID
get_key_infoGet the key pair information for the given key ID
list_algorithmsList all supported signing algorithms
list_keysList all key pairs in the key store
rotate_keyRotate the key pair for the given key ID, preserving the existing algorithm
sign_messageSign a base64-encoded message with the stored private key
BEFORE YOU INSTALL
8 tools when we connected.
CONTEXT COST
Rated by the size of the 8 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y local-kms-mcp-server{
"mcpServers": {
"local-kms": {
"command": "npx",
"args": [
"-y",
"local-kms-mcp-server"
],
"env": {
"STORE_PATH": "/Users/<YOUR_USERNAME>/.local-kms",
"ENCRYPT_STORE": "true",
"STORE_ENCRYPTION_KEY": "<YOUR_STORE_ENCRYPTION_KEY>"
}
}
}
}/Users/<YOUR_USERNAME>/.local-kms is a directory for the key files (leave STORE_PATH out and it uses ./keys). With ENCRYPT_STORE set to true the server needs STORE_ENCRYPTION_KEY, a base64-encoded 32-byte key you generate yourself: node -e "console.log(require('node:crypto').randomBytes(32).toString('base64'))". Remove both lines to keep the key files unencrypted, which is the default.
Start it in HTTP mode and keep it running
TRANSPORT=http PORT=8080 npx local-kms-mcp-serverThen add this endpoint to your client
Add it as a Streamable HTTP server in any client that supports HTTP MCP servers; the server answers POST requests on /mcp. If you change PORT, change the URL to match. HTTP mode adds no authentication or TLS, so keep it on your own machine.
http://localhost:8080/mcp