Skip to main content
Glama

LLM Vault MCP Banner

LLM Vault MCP

Model Context Protocol Server for Zero-Context Secret Injection & Local Envelope Decryption

CI License: MIT Protocol: MCP Node.js 22+ TypeScript 5.x Domain: Llm-Vault-Mcp Conventional Commits


Model Context Protocol (MCP) server for llm-vault. It decrypts secret envelopes locally via the W3C Web Cryptography API (crypto.subtle) and injects credentials into child processes or outbound HTTP requests without exposing plaintext secret values to LLM context windows, chat transcripts, or model telemetry.

Architecture & Security Model

  • Local Zero-Knowledge Decryption: The MCP process loads the workstation's AgentDecryptionKey (from the OS keychain or runtime secret store), unwraps the vault's AgentEncryptedVaultKey, and decrypts AES-256-GCM payloads locally. Every encryption and decryption operation binds canonical Additional Authenticated Data (AAD):

    UTF8("${tenantId}:${vaultId}:${secretId}:${version}:${keyVersion}")
  • Opaque Surrogate Handles: Discovery and secret-resolution tools return type-prefixed ULID identifiers (sec_<ulid>) and template handles ({{vault:sec_<ulid>}}, {{vault:lease_<ulid>}}) rather than raw secret strings.

  • Multi-Encoding Output Scrubber: When executing commands (vault_run_command, vault_inject_env) or proxying HTTP calls (vault_http_proxy), the server scans stdout, stderr, and response headers for raw UTF-8, Base64-encoded, and URL-encoded occurrences of active secrets and replaces matches with [REDACTED:<id>].

  • Time-Bounded Ephemeral Leases: vault_lease_secret holds decrypted Uint8Array secret bytes in process memory under a lease_<ulid> handle and overwrites the buffer with zeroes (buf.fill(0)) immediately upon TTL expiration.

  • Admin Plane Isolation: User provisioning, role mutation, and identity provider configuration endpoints are omitted from the MCP surface so prompt-injected agents cannot escalate privileges. Only vault_admin_audit_logs (read-only query and hash-chain verification) is exposed for ComplianceAuditor tokens.

Related MCP server: agent-vault

MCP Toolset

Tool

Purpose

vault_status

Report active vault connection, agt_<ulid> identity, keychain state, and permission scopes.

vault_search

Search decrypted item metadata (name, description, tags, folder_id) and return safe item summaries.

vault_list_tags

List unique tags across accessible vaults.

vault_get_secret

Return an opaque {{vault:sec_<ulid>}} handle and metadata summary. Blocks raw plaintext unless break-glass policy and out-of-band human approval are both satisfied.

vault_lease_secret

Issue a time-bounded lease_<ulid> handle backed by an in-memory Uint8Array that auto-zeroizes on TTL expiry.

vault_run_command

Spawn a subprocess with {{vault:sec_...}} or lease_<ulid> handles injected into environment variables, scrubbing stdout and stderr before returning.

vault_inject_env

Alias/companion execution tool that resolves secret handles into an execution environment map and scrubs command output.

vault_http_proxy

Execute an outbound HTTP request with secret handles resolved inside request headers and scrub echoed credentials from response headers and body.

vault_generate_and_store_secret

Generate a high-entropy secret inside the MCP server via crypto.getRandomValues(), encrypt it with VaultKey + canonical AAD, and return only { id, version }.

vault_prompt_secret_oob

Prompt a human operator out-of-band to enter a third-party secret directly into client-side encryption without passing through chat context.

vault_admin_audit_logs

Query append-only aud_<ulid> audit records and verify cryptographic hash-chain continuity (prev_event_hash -> event_hash).

Requirements & Development

Requires Node.js >= 22.

npm install
npm run typecheck
npm run lint
npm test
npm run build

Running the Server

Stdio transport (default for local coding agents such as Claude Desktop, Cursor, and Antigravity):

npx llm-vault-mcp stdio

Loopback Streamable HTTP transport (enforces Host/Origin validation and MCP_TOKEN bearer authentication):

MCP_TOKEN="your-ephemeral-token" PORT=3000 HOST=127.0.0.1 node dist/main.js streamable-http

License

MIT

Available Tools

19 tools
vault_absorb_credentialsB

Extract unencrypted secrets from a file (e.g. .env), encrypt them locally with VaultKey + AAD into sec_ records, and generate {{vault:sec_}} template (.env.tpl).

Inputs: filePath (required), dryRun, inPlace, vaultId.

vault_admin_audit_logsA

Read-only query and HMAC-SHA256 hash-chain verification of aud_ audit logs for ComplianceAuditor tokens. User, role, and IdP admin mutations are excluded from MCP.

Inputs: limit, actionFilter.

vault_confirm_actionA

Confirm or cancel a pending destructive action or break-glass reveal using an out-of-band confirmation token.

Inputs: approved (required), confirmationToken (required).

vault_delete_secretA

Delete a secret item from the vault. Requires 'secrets:delete' scope and out-of-band human confirmation. Returns a pending confirmationToken when unconfirmed.

Inputs: secretId (required), confirmationToken.

vault_generate_and_store_secretB

Generate a high-entropy secret inside llm-vault-mcp via crypto.getRandomValues(), encrypt it locally with VaultKey and canonical AAD, and return only { id, vaultId, version, handle }.

Inputs: name (required), tags, vaultId, encoding, +4 more.

vault_get_secretA

Resolve a secret by sec_ and return an opaque surrogate handle ({{vault:sec_}}) by default. Raw plaintext reveal is blocked unless break-glass policy and out-of-band human confirmation are satisfied.

Inputs: secretId (required), breakGlassReason, confirmationToken, requestRawPlaintext.

vault_http_proxyB

Execute an outbound HTTP request with {{vault:sec_}} or {{vault:lease_}} handles injected into request headers and scrub echoed credentials from response headers and body.

Inputs: url (required), headers (required), body, method.

vault_inject_envC

Resolve opaque secret or lease handles into a subprocess execution environment and return scrubbed command output.

Inputs: env (required), command (required), cwd, args.

vault_install_pre_commit_hookA

Install, check status of, or remove a zero-dependency git pre-commit hook that blocks unencrypted secrets from git staging.

Inputs: action, workspaceDir.

vault_k8s_eso_templateC

Generate ready-to-apply Kubernetes External Secrets Operator (ESO) SecretStore and ExternalSecret manifests for zero-knowledge vault synchronization.

Inputs: secrets (required), vaultId (required), storeName, secretName, +3 more.

vault_lease_secretB

Acquire a time-bounded lease_ handle holding decrypted secret bytes in MCP memory. Automatically zeroes the buffer upon TTL expiration.

Inputs: secretId (required), ttlSeconds.

vault_list_tagsB

List unique decrypted tag labels across accessible vaults.

Inputs: vaultId.

vault_prompt_secret_oobC

Prompt a human operator out-of-band (OOB) to enter a secret directly into client-side WebCrypto encryption without exposing the value in chat context.

Inputs: name (required), tags, vaultId, folderId, +3 more.

vault_revoke_leaseB

Explicitly revoke an active lease_ handle and immediately zeroize its in-memory buffer.

Inputs: leaseId (required).

vault_run_commandB

Execute a subprocess with {{vault:sec_}} or {{vault:lease_}} handles injected into environment variables, scrubbing stdout and stderr for raw, Base64, and URL-encoded secret leaks.

Inputs: env (required), command (required), cwd, args.

vault_scan_workspaceB

Scan workspace files, git staged diffs, or direct text content for unencrypted credentials, returning structured findings with line numbers, entropy, and suggested {{vault:sec_}} handles.

Inputs: path, content, minEntropy, stagedOnly.

vault_ssh_agent_statusB

Inspect active SSH agent status, loaded Ed25519 signing keys, socket path, and interactive/OOB approval policies.

Inputs: socketPath.

vault_statusA

Query active MCP vault connection status, agt_ identity, OS keychain unlock state, and permission scopes.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 19 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions, but vault_run_command and vault_inject_env overlap heavily: both inject secret/lease handles into a subprocess environment and return scrubbed output. Other adjacent pairs like get vs lease and scan vs absorb remain distinguishable from their descriptions.

    Naming Consistency5/5

    Every tool uses lower snake_case with a consistent vault_ prefix, and the verb/noun structure is predictable across the set. There is no mixing of naming conventions.

    Tool Count4/5

    19 tools is somewhat heavy, but the scope includes vault access, leasing, execution, import, scanning, audit, and external integrations, so most tools earn their place. The main redundancy is the run-command vs inject-env overlap.

    Completeness4/5

    The surface covers create, read, lease, delete, audit, scanning, and integrations well, but there is no explicit secret update/rotate operation or tag-mutation tool. Agents can work around rotation by deleting and recreating or absorbing secrets again, so these are notable but not fatal gaps.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Local AES-256-GCM encrypted vault for AI agents. Resolve {{PLACEHOLDER}} secrets in prompts at runtime — LLMs never see real API keys. Argon2id key derivation, zero cloud.
      2
      70 npm
      7
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Agent Vault is a local credential vault for AI agents. It enables agents to use secrets by name without ever seeing their values, with host allowlists, output scrubbing, and audit logging.
      4
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to scan and audit environment files for leaked secrets, sanitize them, encrypt/decrypt vaults, and run processes with zero-disk secret injection.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to stage API keys into non-exposing handles and make API calls where the real key is injected locally, so secrets stay out of prompts, transcripts, tool arguments, and logs. Also allows listing handles, revoking secrets, and inspecting vault info without ever returning raw secret values.
      5
      1
      MIT No Attribution