Vault MCP Server

MCP server for HashiCorp Vault mounts and secrets.

By defaultCan delete
Safest setupNo read-only mode Use a read-only credential
Flagssecrets

Labels are provisional (from the project README/docs, checked Oct 27, 2026). Not yet tested in our sandbox.

Read-only switch

No read-only switch documented in the README. Reading secrets is itself high-risk: anything the agent reads can end up in prompts and logs.

Preset

No read-only switch. This config is the vendor default plus an approval prompt on every tool. It is not read-only. The credential is what protects you.

Claude Code

.mcp.json
{
  "mcpServers": {
    "vault": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm", "-e", "VAULT_ADDR", "-e", "VAULT_TOKEN",
        "hashicorp/vault-mcp-server"
      ],
      "env": {
        "VAULT_ADDR": "https://vault.example.com:8200",
        "VAULT_TOKEN": "${VAULT_TOKEN}"
      }
    }
  }
}
.claude/settings.json
{
  "permissions": {
    "ask": ["mcp__vault"]
  }
}

ask makes Claude Code prompt before every tool from this server.

Codex

~/.codex/config.toml
# Generated by redpresets.dev on 2026-11-03. Unverified preset. Also use a read-only credential. Not a security guarantee.

[mcp_servers.vault]
command = "docker"
args = ["run", "-i", "--rm", "-e", "VAULT_ADDR", "-e", "VAULT_TOKEN", "hashicorp/vault-mcp-server"]
env_vars = ["VAULT_TOKEN"]
default_tools_approval_mode = "prompt"

[mcp_servers.vault.env]
VAULT_ADDR = "https://vault.example.com:8200"

default_tools_approval_mode = "prompt" asks before every tool call.

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "vault": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "-i", "--rm", "-e", "VAULT_ADDR", "-e", "VAULT_TOKEN",
        "hashicorp/vault-mcp-server"
      ],
      "env": {
        "VAULT_ADDR": "https://vault.example.com:8200",
        "VAULT_TOKEN": "${env:VAULT_TOKEN}"
      }
    }
  }
}

Don't add write tools to mcpAllowlist in .cursor/permissions.json. Leave them on approval. Cursor's docs say the allowlist is not a security boundary.

Credential layer

Use a Vault token with a policy limited to list on metadata paths. Avoid read on secret data for agents.

Gotchas

  • Secrets read by an agent may be sent to the model provider.

Facts

Vendor
HashiCorp official
Source
hashicorp/vault-mcp-server
License
MPL-2.0
GitHub stars
65
Latest release
v0.2.0 (Sep 24, 2025)
Last push
Oct 24, 2026
Status
Active
Last checked
Oct 27, 2026

Sources

Spotted something wrong? Labels change when vendors change. Suggest a correction

Read-only alternatives in IaC