Local Kms Mcp
About
Local-first, lightweight MCP server for per-agent key management.
Details
- Author
- Diegoescalonaro
- Downloads
- 165
- Categories
- Other, Security, Infrastructure
Jump to
- Local-first architecture
- Lightweight implementation
- Per-agent key management
- MCP server integration
—
Local-first, lightweightMCP serverfor per-agent key management.
Give every agent its own signing identity - without relying on external KMS or exposing private keys.
local-kms-mcp-servergenerates, 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
- Generates signing keypairs scoped to a keyId (one identity per agent or task)
- Stores keys locally using a simple file-based keystore
- Rotates keys safely while preserving algorithm consistency
- Signs base64 payloads without ever exposing private key material
- Optionally encrypts keys at rest using AES-256-GCM
- Runs over MCP via stdio (default) or HTTP when needed
- Node.js>=24.0.0
- An MCP client that supports stdio or HTTP MCP servers
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>" } } } }
Use HTTP only when you explicitly want a local network endpoint.
TRANSPORT=http PORT=8080 npx local-kms-mcp-server
npm install -g local-kms-mcp-server local-kms-mcp-server
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'senvconfiguration so startup is deterministic.
node -e "console.log(require('node:crypto').randomBytes(32).toString('base64'))"
All tool inputs are validated with Zod. Public keys and signatures are returned as base64 strings.
- generate_keyfails if thekeyIdalready exists
- rotate_keyincrements the storedversion
- sign_messageexpectsmessageto already be base64-encoded
- sign_messageaccepts an optionalalgooverride, but in normal usage the stored algorithm is usually what you want
- Callgenerate_keyfor a newkeyId
- Callget_key_infoto retrieve the public key for registration or distribution
- Callsign_messagewhenever the agent needs to sign a challenge or payload
- Callrotate_keywhen you need new key material for the samekeyId
- Callcheck_keypairorlist_keysfor inventory and existence checks
{ "keyId": "key-1", "message": "eyJub25jZSI6IjEyMyJ9" }
Unencrypted keys are stored as one file per key under${STORE_PATH}:
{ "keyId": "key-1", "algo": "ed25519", "publicKey": "...", "privateKey": "...", "version": 1, "createdAt": "2026-04-18T12:34:56.000Z" }
WhenENCRYPT_STORE=true, the file contents are encrypted and persisted as base64 ciphertext instead of plaintext JSON.
- Private keys never leave the server through MCP responses
- Key files are written with0600permissions
- At-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
pnpm install pnpm build pnpm test pnpm lint pnpm format:check
Watch the built output during development:
- Implement a new adapter by extendingKeyAlgorithmAdapter
- Register it insrc/keystore/index.ts
- Expose 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(); } }
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 tests
Interact with AWS resources using Single Sign-On (SSO). Supports SSO login, listing accounts/roles, and executing AWS CLI commands.
Deploy and manage apps on your cloud from coding agents. Create environments, choose regions, configure infrastructure, and monitor jobs. Supports OAuth 2.0 with Dynamic Client Registration, RBAC permissions, and approval workflows for production environments.
Administer Google Workspace using the GAM command-line tool.
An MCP server with built-in GitHub OAuth support, deployable on Cloudflare Workers.
MCP Remote with Okta/Adobe IMS Authentication
A remote MCP server that uses Adobe IMS/Okta for authentication.
An MCP server with built-in GitHub OAuth support, designed for deployment on Cloudflare Workers.
Administer Keycloak by managing users, realms, roles, and other resources through an LLM interface.
Allows AI models to interact with your Okta environment to manage and analyze resources, designed for IAM engineers, security teams, and administrators.
Interact with Okta's user management system for comprehensive user, group, and onboarding automation.
A RESTful API to programmatically interact with the Opal Security platform.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



