Labsco
MCP SERVER

Local KMS MCP

by Diegoescalonaro

Give each agent its own signing key, generated and kept on the local machine.

Identity, Access, Secrets & EncryptionVerified
Summary
Private key material never leaves the process.

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.

What it is

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.

What you get
  • generate_key creates and persists a keypair for a key id, in the algorithm you choose
  • sign_message signs a base64-encoded message with the stored private key and returns the signature as base64
  • rotate_key replaces the pair while keeping the existing algorithm
  • delete_key removes a pair, optionally overwriting it with random data first
  • check_keypair, get_key_info, list_keys and list_algorithms cover inspection
  • Algorithms: Ed25519, ECDSA secp256k1 for Ethereum and Bitcoin flows, ECDSA P-256 for ES256 and WebAuthn, ECDSA P-384
  • Keys can be encrypted at rest with AES-256-GCM
Requirements

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.

Setup effort

One command — npx -y local-kms-mcp-server