Vault MCP Server
Provides tools for managing HashiCorp Vault: checking health/seal status, reading, writing, deleting and listing KV v2 secrets, enabling and listing secrets engines, plus full TOTP secrets engine support (create/import keys, generate and validate codes, list and delete keys). Supports namespace-scoped access for Vault Enterprise/HCP.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
HashiCorp Vault MCP Server
A Model Context Protocol (MCP) server that provides secure access to HashiCorp Vault for credential management and TOTP code generation.
π Features
Credential Management: Read, write, delete, and list secrets in KV v2 engine
TOTP Support: Generate, import, validate TOTP codes for 2FA
Vault Administration: Check status, enable engines, manage configurations
Secure by Design: Token-based auth, Docker secrets, masked outputs
Enterprise Ready: Supports namespaces for Vault Enterprise/HCP
Related MCP server: HashiCorp Vault MCP Server
π Prerequisites
Docker Desktop with MCP Toolkit enabled
Docker MCP CLI plugin (
docker mcpcommand)A running HashiCorp Vault server
Valid Vault authentication token
π οΈ Available Tools
Secret Management
check_vault_status- Check health and seal statusread_secret- Read secrets from KV v2 enginewrite_secret- Write secrets with JSON datadelete_secret- Delete specific or all versionslist_secrets- List secrets at a pathlist_secrets_engines- List enabled enginesenable_secrets_engine- Enable new engines
TOTP Management
create_totp_key- Generate new TOTP keysimport_totp_key- Import existing TOTP keysget_totp_code- Generate current codesvalidate_totp_code- Validate codeslist_totp_keys- List all TOTP keysdelete_totp_key- Remove TOTP keys
π¦ Installation
Step 1: Clone and Build
git clone https://github.com/Cosmicjedi/vault-mcp-server.git
cd vault-mcp-server
docker build -t vault-mcp-server .Step 2: Configure Secrets
# Set your Vault token
docker mcp secret set VAULT_TOKEN="your-vault-token"
# Set Vault server address
docker mcp secret set VAULT_ADDR="http://your-vault-server:8200"
# Optional: For Vault Enterprise/HCP
docker mcp secret set VAULT_NAMESPACE="admin"Step 3: Add to MCP Catalog
Create ~/.docker/mcp/catalogs/custom.yaml:
version: 2
name: custom
displayName: Custom MCP Servers
registry:
vault:
description: "HashiCorp Vault integration for secure credential and TOTP management"
title: "Vault"
type: server
dateAdded: "2025-01-24T00:00:00Z"
image: vault-mcp-server:latest
ref: ""
tools:
- name: check_vault_status
- name: read_secret
- name: write_secret
- name: delete_secret
- name: list_secrets
- name: create_totp_key
- name: import_totp_key
- name: get_totp_code
- name: validate_totp_code
- name: list_totp_keys
- name: delete_totp_key
- name: enable_secrets_engine
- name: list_secrets_engines
secrets:
- name: VAULT_TOKEN
env: VAULT_TOKEN
example: hvs.CAESIGZ3...
- name: VAULT_ADDR
env: VAULT_ADDR
example: http://127.0.0.1:8200
- name: VAULT_NAMESPACE
env: VAULT_NAMESPACE
example: admin
metadata:
category: integration
tags:
- security
- credentials
- secrets
- totp
- vault
license: MIT
owner: localStep 4: Update Registry
Add to ~/.docker/mcp/registry.yaml under the registry: key:
registry:
# ... existing servers ...
vault:
ref: ""Step 5: Configure Claude Desktop
Edit Claude Desktop config:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add custom catalog to args:
{
"mcpServers": {
"mcp-toolkit-gateway": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v", "/var/run/docker.sock:/var/run/docker.sock",
"-v", "[YOUR_HOME]/.docker/mcp:/mcp",
"docker/mcp-gateway",
"--catalog=/mcp/catalogs/docker-mcp.yaml",
"--catalog=/mcp/catalogs/custom.yaml",
"--config=/mcp/config.yaml",
"--registry=/mcp/registry.yaml",
"--tools-config=/mcp/tools.yaml",
"--transport=stdio"
]
}
}
}Step 6: Restart Claude Desktop
Quit and restart Claude Desktop to load the new tools.
π§ͺ Quick Test Setup
For testing, you can run Vault in dev mode:
# Start Vault in dev mode (INSECURE - testing only!)
docker run --cap-add=IPC_LOCK \
-e 'VAULT_DEV_ROOT_TOKEN_ID=root' \
-p 8200:8200 \
-d --name=vault-dev \
vault:latest
# Configure MCP secrets for dev vault
docker mcp secret set VAULT_TOKEN="root"
docker mcp secret set VAULT_ADDR="http://host.docker.internal:8200"
# Enable TOTP engine
docker exec vault-dev vault secrets enable totp㪠Usage Examples
In Claude Desktop, try these commands:
"Check the status of my Vault server"
"List all secrets in the secret mount"
"Write API credentials to secret/myapp/api with data {"key": "abc123"}"
"Read the secret at secret/myapp/api"
"Generate a new TOTP key for GitHub with account user@example.com"
"Get the current TOTP code for GitHub"
"List all my TOTP keys"
"Enable a new KV secrets engine at path myapp"
π Security Considerations
All secrets stored in Docker Desktop secrets
Never hardcode credentials
Use least-privilege Vault policies
Sensitive values are masked in outputs
Runs as non-root user in container
π‘οΈ Required Vault Permissions
path "secret/*" {
capabilities = ["create", "read", "update", "delete", "list"]
}
path "totp/*" {
capabilities = ["create", "read", "update", "delete", "list"]
}
path "sys/health" {
capabilities = ["read"]
}
path "sys/mounts/*" {
capabilities = ["read", "update"]
}π Troubleshooting
Tools Not Appearing
Verify Docker image built successfully
Check catalog and registry files
Ensure Claude Desktop config includes custom catalog
Restart Claude Desktop
Authentication Errors
Verify token with
docker mcp secret listEnsure token has required permissions
Check VAULT_ADDR is accessible
For HCP Vault, ensure VAULT_NAMESPACE is set
Connection Issues
Verify Vault is running and unsealed
Check network connectivity
Ensure TLS certificates are valid (if using HTTPS)
π Documentation
π License
MIT License - see LICENSE file for details.
π€ Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
π€ Author
Created for the MCP community to enable secure Vault integration by Cosmicjedi.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage VaultCord-protected Discord servers: members, verification, backups and security.
A vault for .env files and project credentials: one encryption key per project, a second factor before protected values open, an audit row for every reveal, and scoped MCP access for coding agents.
Encrypted secret store and rotation for autonomous agent credentials
Send and verify one-time passcodes over SMS, WhatsApp and Telegram.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables interaction with HashiCorp Vault to read, write, list, and delete secrets through a containerized MCP server with secure token-based authentication.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with HashiCorp Vault for secret management operations including reading, writing, listing, and deleting secrets through the Model Context Protocol.1MIT
- AlicenseNot gradedqualityFmaintenanceEnables language models to securely manage HashiCorp Vault secrets and ACL policies through the Model Context Protocol. It supports automated secret rotation, discovery, and HCL policy authoring using a suite of dedicated tools and resources.10 npm6MIT
- FlicenseNot gradedqualityCmaintenanceCentralized credential management for servers, websites, and APIs with HashiCorp Vault integration. Provides authentication, authorization, and audit logging for secure access to secrets.2-