local-kms-mcp-server
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., "@local-kms-mcp-server Generate a new Ed25519 signing key for agent-1"
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.
local-kms-mcp-server
Local-first, lightweight MCP server for per-agent key management.
Give every agent its own signing identity - without relying on external KMS or exposing private keys.
local-kms-mcp-server generates, stores, rotates, and uses signing keypairs entirely on the local machine. Keys never
leave the process, never touch the network, and stay under control.
It’s built for MCP clients and agent runtimes that need isolated, composable identities for tasks such as DID/SSI flows, auth handshakes, challenge signing, and any workflow where agents must prove something cryptographically
What It Does
Generates signing keypairs scoped to a keyId (one identity per agent or task)
Stores keys locally using a simple file-based keystore
Signs base64 payloads without ever exposing private key material
Rotates keys safely while preserving algorithm consistency
Deletes keys with optional secure wipe (overwrite with random data)
Lists available signing algorithms and keys
Optionally encrypts keys at rest using AES-256-GCM
Runs over MCP via stdio (default) or HTTP when needed
Related MCP server: Agent Identity MCP Server
Supported Algorithms
Algorithm | Tool value | Notes |
Ed25519 |
| Good default for general signing and DID-style use cases |
ECDSA secp256k1 |
| Common for Ethereum, Bitcoin, and other Web3 flows |
ECDSA P-256 |
| ES256, WebAuthn, and common cloud KMS compatibility |
ECDSA P-384 |
| Higher-security NIST P-384 environments |
Requirements
Node.js
>=24.0.0An MCP client that supports stdio or HTTP MCP servers
Quick Start
Stdio transport
Use stdio when running from Claude Desktop, Cursor, or another local MCP client.
{
"mcpServers": {
"local-kms": {
"command": "npx",
"args": ["-y", "local-kms-mcp-server"],
"env": {
"STORE_PATH": "/Users/yourname/.local-kms",
"ENCRYPT_STORE": "true",
"STORE_ENCRYPTION_KEY": "<base64-32-byte-key>"
}
}
}
}HTTP transport
Use HTTP only when you explicitly want a local network endpoint.
TRANSPORT=http PORT=8080 npx local-kms-mcp-serverEndpoint:
POST http://localhost:8080/mcpInstallation
Run directly with npx:
npx -y local-kms-mcp-serverOr install globally:
npm install -g local-kms-mcp-server
local-kms-mcp-serverConfiguration
Environment variable | Default | Description |
|
| Directory used for persisted key files |
|
| MCP transport: |
|
| HTTP port used only when |
|
| Set to |
| none | Base64-encoded 32-byte key required when encryption is enabled |
For local development there is an example file at .env.example, but for actual MCP client usage it is better to pass
values through the client's env configuration so startup is deterministic.
Generate an encryption key:
node -e "console.log(require('node:crypto').randomBytes(32).toString('base64'))"Tool Reference
All tool inputs are validated with Zod. Public keys and signatures are returned as base64 strings.
Tool | Purpose | Input | Output |
| Check whether a key exists |
|
|
| List all stored key IDs |
|
|
| List all supported signing algorithms |
|
|
| Create and persist a new keypair |
|
|
| Return the stored public key for a key ID |
|
|
| Rotate an existing keypair using its stored algorithm |
|
|
| Delete a keypair with optional secure wipe |
|
|
| Sign a base64-encoded payload |
|
|
Notes:
generate_keyfails if thekeyIdalready existsrotate_keyincrements the storedversiondelete_keywithsecureWipe: trueoverwrites the key file with random data before deletionsign_messageexpectsmessageto already be base64-encodedsign_messageaccepts an optionalalgooverride, but in normal usage the stored algorithm is usually what you want
Typical Usage Flow
Call
list_algorithmsto see available signing algorithmsCall
generate_keyfor a newkeyIdCall
get_key_infoto retrieve the public key for registration or distributionCall
sign_messagewhenever the agent needs to sign a challenge or payloadCall
rotate_keywhen you need new key material for the samekeyIdCall
delete_keyto securely remove a keypair when no longer neededCall
check_keypairorlist_keysfor inventory and existence checks
Example sign_message payload:
{
"keyId": "key-1",
"message": "eyJub25jZSI6IjEyMyJ9"
}Storage Model
Unencrypted keys are stored as one file per key under ${STORE_PATH}:
${STORE_PATH}/${keyId}.jsonStored records contain:
{
"keyId": "key-1",
"algo": "ed25519",
"publicKey": "...",
"privateKey": "...",
"version": 1,
"createdAt": "2026-04-18T12:34:56.000Z"
}When ENCRYPT_STORE=true, the file contents are encrypted and persisted as base64 ciphertext instead of plaintext JSON.
Security Notes
Private keys never leave the server through MCP responses
Key files are written with
0600permissionsAt-rest encryption is optional but recommended for anything beyond throwaway local development
HTTP mode does not add authentication or TLS by itself; keep it behind a trusted local boundary or your own reverse proxy
keyIdvalues become filenames, so use stable, filesystem-safe IDs
Development
pnpm install
pnpm build
pnpm test
pnpm lint
pnpm format:checkRun locally after building:
pnpm startWatch the built output during development:
pnpm start:devExtending With New Algorithms
Implement a new adapter by extending
KeyAlgorithmAdapterRegister it in
src/keystore/index.tsExpose the adapter name through the relevant tool schema if users should be able to select it
import { KeyAlgorithmAdapter } from '../adapter.js';
import type { KeyPair } from '../types.js';
export class MyAdapter extends KeyAlgorithmAdapter {
readonly name = 'my-algo';
generate(): KeyPair {
/* ... */
}
sign(privateKey: string, data: Buffer): string {
/* ... */
}
verify(publicKey: string, data: Buffer, signature: string): boolean {
/* ... */
}
rotate(_currentKeyPair: KeyPair): KeyPair {
return this.generate();
}
}Project Layout
src/
config/ environment parsing and validation
keystore/ adapters, registry, and file-based storage
tools/ MCP tool registration and handlers
utils/ crypto helpers, errors, serializers
server.ts MCP server construction
main.ts stdio and HTTP entry point
test/ unit testsLicense
MIT
Available Tools
8 toolscheck_keypairA
Check if a key pair exists for the given key ID
Inputs: keyId (required). Returns: exists
delete_keyB
Delete a key pair from the keystore
Inputs: keyId (required), secureWipe. Returns: keyId, success
generate_keyA
Generate and store a new key pair for the given key ID
Inputs: keyId (required), algo. Returns: publicKey
get_key_infoB
Get the key pair information for the given key ID
Inputs: keyId (required). Returns: algo, keyId, version, createdAt, +1 more
list_algorithmsA
List all supported signing algorithms
Inputs: no named parameters. Returns: algorithms
list_keysA
List all key pairs in the key store
Inputs: no named parameters. Returns: keys
rotate_keyB
Rotate the key pair for the given key ID, preserving the existing algorithm
Inputs: keyId (required). Returns: newPublicKey
sign_messageB
Sign a base64-encoded message with the stored private key
Inputs: keyId (required), message (required), algo. Returns: signature
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a distinct purpose: checking existence, deleting, generating, getting info, listing algorithms, listing keys, rotating, and signing. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case, such as generate_key, list_keys, rotate_key, etc. No deviations.
8 tools is within the ideal range (3-15) for a KMS server, covering key lifecycle and signing without bloat or scarcity.
The tool set covers key generation, deletion, rotation, listing, info retrieval, and signing. Missing encrypt/decrypt or import/export, but core key management is well-covered for a signing-focused KMS.
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Hosted AgentLux MCP server for marketplace, identity, creator, services, and social flows.
MCP server for OnceAsk, the AI-native current-address layer for people and agents.
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for AI agent identity — verify agents with Ed25519 signatures, check trust scores, sign and verify content, exchange encrypted messages. Built on the Agent Identity Protocol (AIP).81MIT
- AlicenseNot gradedqualityDmaintenanceMCP Server for AI agent identity and authorization. Create, verify, and manage agent identities with trust scores and scoped authorization tokens.48 PyPIMIT

touchstone-mcpofficial
AlicenseNot gradedqualityCmaintenanceLocal MCP server that signs and records agent actions into a tamper-evident log using Ed25519 keys for frictionless integration with Touchstone.55 npmApache 2.0- AlicenseNot gradedqualityCmaintenanceProvides a sovereign, MIT-licensed MCP server for professional-service workflows, running entirely on your infrastructure with Ed25519 cryptographic signing for every action.MIT