Vault MCP Server
Official HashiCorp Vault MCP server: mounts, KV secrets and PKI certificates from an agent
Install
git clone https://github.com/hashicorp/vault-mcp-server.git
cd vault-mcp-server
make buildBuilds the binary; run with ./vault-mcp-server stdio
This is third-party code. Review the repository files before installing.
What it does
The server connects the agent to HashiCorp Vault. The agent creates, lists and deletes KV v1 and v2 mounts, and reads, writes and deletes secrets and individual keys. For PKI it enables the engine, creates issuers and roles and issues certificates. It runs over stdio or Streamable HTTP with CORS, rate limiting and TLS support.
Who it is for. For DevOps and security engineers who run Vault in test and local environments.
Good fit when
- You need to lay out test secrets across KV paths
- You need a certificate for an internal service in a dev environment
- You want to see which mounts and paths exist in Vault
Not a fit when
- A production Vault with real secrets
- The client or model is not fully trusted
Example request
Create a kv2 mount at dev-app and store a test database password thereLimitations
The authors intend it for local use on trusted networks. Secrets that are read end up in the model context. Requires a Vault token with suitable policies. Install by building from source with Go 1.24+ or via a Docker image. HashiCorp and Docker Hub downloads are not always reachable from Russia.
How to disable. Remove the vault-mcp-server block from the MCP config and revoke its token with vault token revoke.
MCP
- Transport
- stdio, http
- Authentication
- API key
| Environment variables | |
|---|---|
| VAULT_ADDR | Vault address, default http://127.0.0.1:8200 |
| VAULT_TOKEN required, secret | Vault token with the required policies |
| VAULT_NAMESPACE | Vault Enterprise namespace |
| MCP_ALLOWED_ORIGINS | Allowed origins for HTTP mode |
Security check
- Reads and writes secrets that end up in the model context
- Can delete mounts and secrets
- Issues PKI certificates
README in short
The README opens with security warnings: local use only, allowed origins must be set in HTTP mode, and secrets may leak into the model. It then covers building, stdio and HTTP modes, environment variables, VS Code and Gemini CLI setup, Docker and the KV and PKI tool list. MPL 2.0 licensed.
FAQ
How do I pass the token in HTTP mode?
Via VAULT_ADDR, X-Vault-Token and X-Vault-Namespace headers or environment variables. Do not pass the address as a URL query parameter.
Is there a Gemini CLI extension?
Yes: gemini extensions install https://github.com/hashicorp/vault-mcp-server, with address and token in ~/.gemini/.env.
Related
NVIDIA's open stack for running OpenClaw, Hermes and LangChain Deep Agents in OpenShell sandboxes with network policy and managed inference
Static code analysis with rules that look like source code, plus a built-in MCP server for AI agents
Trail of Bits skills
Trail of Bits Skills Marketplace
Trail of Bits plugin marketplace for security work: smart contracts, C/C++ and Rust review, Semgrep, CodeQL and fuzzing
Nine skills that let an agent run Strix pentests, fix validated findings and add security scanning to CI