Local-first MCP server for per-agent signing key management

Local-first MCP server for per-agent signing key management

local-kms-mcp-server•bydiegoescalonaro

A lightweight MCP server that generates, stores, rotates, and uses per-agent signing keypairs entirely on the local machine, keeping private keys local and never exposing them through responses.

License: MIT•Runtime: Awaiting documentation review•Category: auth security

WHAT IT DOES

  • •Generates signing keypairs scoped to a keyId, giving one identity per agent or task.
  • •Signs base64 payloads without exposing private key material and rotates keys while preserving the stored algorithm.
  • •Supports Ed25519 and several ECDSA algorithms, including secp256k1 and P-256.
  • •Can encrypt stored keys at rest with AES-256-GCM and delete keys with optional secure wipe.

BEST FOR

  • •Agents that need isolated signing identities for DID/SSI flows, auth handshakes, and challenge signing.
  • •Local workflows where signing keys must remain on the local machine instead of an external KMS.

ABOUT LOCAL-KMS-MCP-SERVER

Local-first MCP server for per-agent signing key management is cataloged as an MCP server attributed to diegoescalonaro. A lightweight MCP server that generates, stores, rotates, and uses per-agent signing keypairs entirely on the local machine, keeping private keys local and never exposing them through responses. It is categorized under auth security. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Local-first MCP server for per-agent signing key management are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Why are private keys kept within the process?

The server is designed so private keys never leave the process, never touch the network, and are not returned through MCP responses.

How are stored key files protected?

Key files are written with 0600 permissions, and at-rest encryption can optionally be enabled for anything beyond throwaway local development.

Does HTTP mode provide authentication or TLS?

HTTP mode does not add authentication or TLS by itself, so it should be kept behind a trusted local boundary or a reverse proxy.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 22b134562371 · 采集于 2026-11-13 12:27:01 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

local-kms-mcp-server

npm version License: MIT

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

Supported Algorithms

AlgorithmTool valueNotes
Ed25519ed25519Good default for general signing and DID-style use cases
ECDSA secp256k1ecdsa-secp256k1Common for Ethereum, Bitcoin, and other Web3 flows
ECDSA P-256ecdsa-prime256v1ES256, WebAuthn, and common cloud KMS compatibility
ECDSA P-384ecdsa-secp384r1Higher-security NIST P-384 environments

Requirements

  • Node.js >=24.0.0
  • An 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-server

Endpoint:

POST http://localhost:8080/mcp

Installation

Run directly with npx:

npx -y local-kms-mcp-server

Or install globally:

npm install -g local-kms-mcp-server
local-kms-mcp-server

Configuration

Environment variableDefaultDescription
STORE_PATH./keysDirectory used for persisted key files
TRANSPORTstdioMCP transport: stdio or http
PORT8080HTTP port used only when TRANSPORT=http
ENCRYPT_STOREfalseSet to true or 1 to encrypt key files at rest
STORE_ENCRYPTION_KEYnoneBase64-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.

ToolPurposeInputOutput
check_keypairCheck whether a key exists{ "keyId": "agent-1" }{ "exists": true }
list_keysList all stored key IDs{}{ "keys": ["agent-1", "agent-2"] }
list_algorithmsList all supported signing algorithms{}{ "algorithms": ["ed25519", ...] }
generate_keyCreate and persist a new keypair{ "keyId": "agent-1", "algo": "ed25519" }{ "publicKey": "..." }
get_key_infoReturn the stored public key for a key ID{ "keyId": "agent-1" }{ "publicKey": "..." }
rotate_keyRotate an existing keypair using its stored algorithm{ "keyId": "agent-1" }{ "newPublicKey": "..." }
delete_keyDelete a keypair with optional secure wipe{ "keyId": "agent-1", "secureWipe": true }{ "success": true }
sign_messageSign a base64-encoded payload{ "keyId": "agent-1", "message": "aGVsbG8=" }{ "signature": "..." }

Notes:

  • generate_key fails if the keyId already exists
  • rotate_key increments the stored version
  • delete_key with secureWipe: true overwrites the key file with random data before deletion
  • sign_message expects message to already be base64-encoded
  • sign_message accepts an optional algo override, but in normal usage the stored algorithm is usually what you want

Typical Usage Flow

  1. Call list_algorithms to see available signing algorithms
  2. Call generate_key for a new keyId
  3. Call get_key_info to retrieve the public key for registration or distribution
  4. Call sign_message whenever the agent needs to sign a challenge or payload
  5. Call rotate_key when you need new key material for the same keyId
  6. Call delete_key to securely remove a keypair when no longer needed
  7. Call check_keypair or list_keys for 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}.json

Stored 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 0600 permissions
  • 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
  • keyId values become filenames, so use stable, filesystem-safe IDs

Development

pnpm install
pnpm build
pnpm test
pnpm lint
pnpm format:check

Run locally after building:

pnpm start

Watch the built output during development:

pnpm start:dev

Extending With New Algorithms

  1. Implement a new adapter by extending KeyAlgorithmAdapter
  2. Register it in src/keystore/index.ts
  3. 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();
  }
}

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 tests

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Local-first MCP server for per-agent signing key management from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/local-kms-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related auth security MCP Servers

Alternative and complementary servers in the same category

View all in auth security →

A modular FastMCP server for interacting with Microsoft Graph API, supporting advanced queries for users, sign-in logs, MFA status, and privileged users.

Repository stats unavailable
Security & Secrets
Keycloak MCP Server
keycloak-mcp-server•sshaaf

A Model Context Protocol (MCP) server that provides programmatic access to Keycloak administration functionality.

Repository stats unavailable
Security & Secrets

An MCP server for LLM-driven penetration testing that wraps Kali tools and adds scope enforcement, engagement tracking, and structured output.

Repository stats unavailable
Security & Secrets