vault-kv-mcp
Provides tools for reading secrets and metadata from HashiCorp Vault KV secrets engine, including listing paths, reading secret versions, and checking server health.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vault-kv-mcpread the secret at path secret/demo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vault-kv-mcp
A read-only MCP (Model Context Protocol) server that exposes the HashiCorp Vault KV secrets engine (versions 1 and 2) as tools. Every tool performs only non-destructive reads — there are no write, delete, or destroy operations. It authenticates with a Vault token and speaks MCP over stdio, so it works with local MCP clients such as Claude Desktop.
Tools (all read-only)
Tool | Description |
| Read a secret (latest or a specific KV v2 version). |
| List keys / sub-folders under a path. |
| KV v2: read version history and metadata. |
| Discover available secret mounts and their KV versions. |
| Check Vault server health / connectivity. |
KV v1 vs v2 is auto-detected per mount when kv_version is not supplied (falling back to v2).
For defense in depth, pair this with a Vault token whose policies grant only read/list capabilities on the relevant paths.
Related MCP server: Vault MCP Server (mschuchard)
Configuration
Set these environment variables (see .env.example):
VAULT_ADDR— Vault base URL (defaulthttp://127.0.0.1:8200)VAULT_TOKEN— required Vault token, sent as theX-Vault-TokenheaderVAULT_NAMESPACE— optional, for Vault Enterprise / HCP VaultVAULT_SKIP_VERIFY— optional, settrueto skip TLS verification (dev only)
The token only needs policies granting access to the KV paths you intend to use.
Build
npm install
npm run buildRun / test with the MCP Inspector
VAULT_ADDR=http://127.0.0.1:8200 VAULT_TOKEN=hvs.xxxx npm run inspectorUse with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"vault-kv": {
"command": "node",
"args": ["/absolute/path/to/vault-mcp/dist/index.js"],
"env": {
"VAULT_ADDR": "http://127.0.0.1:8200",
"VAULT_TOKEN": "hvs.your-token-here"
}
}
}
}Quick local Vault for testing
vault server -dev # prints a Root Token and unseal info
export VAULT_ADDR=http://127.0.0.1:8200
export VAULT_TOKEN=<root-token-from-output>
vault kv put secret/demo username=app password=s3cr3tThen ask your MCP client to read secret/demo.
Security notes
The server only ever reads from Vault; it never writes, deletes, or destroys secrets.
The token is read only from the environment and never logged.
Prefer a short-lived, least-privilege token (read/list only) over a root token.
Available Tools
5 toolsvault_healthVault server healthARead-onlyIdempotent
Check the Vault server's health: whether it is initialized, sealed, and in standby. Good for verifying connectivity and configuration.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| initialized | No | |
| sealed | No | |
| standby | No | |
| version | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only, non-destructive, idempotent. Description adds specific health checks (init, seal, standby), enhancing transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with purpose. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool is simple with 0 parameters and output schema present. Description is complete for its function.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so baseline 4 applies. Description need not add param info.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks Vault server health, specifying initialized, sealed, and standby status. It distinguishes from sibling KV tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Good for verifying connectivity and configuration,' providing clear context. No exclusions needed as siblings are unrelated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_kv_listList KV keysARead-onlyIdempotent
List the secret keys/sub-folders under a path. Keys ending in '/' are sub-folders. Use path '' or '/' to list the root of the mount.
| Name | Required | Description | Default |
|---|---|---|---|
| mount | Yes | Mount point of the KV secrets engine, without leading/trailing slashes (e.g. 'secret', 'kv', 'apps/prod'). | |
| path | No | Folder path to list within the mount. Omit or use '' to list the mount root. | |
| kv_version | No | KV engine version: 1 or 2. If omitted, the server auto-detects it from the mount (falling back to 2). Set explicitly to avoid an extra detection call. |
Output Schema
| Name | Required | Description |
|---|---|---|
| keys | Yes | Secret names and sub-folders (sub-folders end with '/'). |
| kv_version | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, destructiveHint, idempotentHint. The description adds behavioral context: keys ending in '/' are sub-folders, and kv_version auto-detection can be bypassed. This adds value beyond annotations without contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences that are front-loaded and free of fluff. First sentence states exact purpose, second sentence adds key nuance. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With all parameters documented in schema, behavioral details provided, and an output schema present, the description covers everything needed for an agent to correctly invoke this tool. No gaps identified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds extra meaning: explains path behavior for root listing and kv_version's performance benefit. This enriches understanding of parameters beyond schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists secret keys/sub-folders under a path, with a specific verb and resource. It distinguishes from siblings like vault_kv_read and vault_kv_read_metadata by focusing on listing versus reading. Additional details (keys ending in '/') add clarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains how to list the root using path '' or '/', providing clear usage context. However, it does not explicitly state when not to use this tool or name alternatives, though sibling tool names are provided in context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_kv_readRead a KV secretARead-onlyIdempotent
Read the key/value data stored at a secret path in a Vault KV engine. For KV v2 you may request a specific historical version; omit it to get the latest.
| Name | Required | Description | Default |
|---|---|---|---|
| mount | Yes | Mount point of the KV secrets engine, without leading/trailing slashes (e.g. 'secret', 'kv', 'apps/prod'). | |
| path | Yes | Path of the secret within the mount (e.g. 'db/creds', 'services/api'). Do NOT include the mount, or the KV v2 'data/'/'metadata/' prefix — those are added automatically. | |
| kv_version | No | KV engine version: 1 or 2. If omitted, the server auto-detects it from the mount (falling back to 2). Set explicitly to avoid an extra detection call. | |
| version | No | KV v2 only: specific secret version number to read. Omit for the latest version. |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | Yes | The secret's key/value pairs. |
| metadata | No | KV v2 version metadata (version, created_time, etc.). |
| kv_version | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. The description adds behavioral context beyond annotations: versioning support for KV v2, and auto-detection of kv_version. No contradictions. Minor missing details like error handling or auth requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose. Every sentence adds value with no fluff. Highly concise and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present (not shown but indicated), explanation of return values is unnecessary. The description covers versioning, mount/path format, and kv_version auto-detection. Missing error behavior but acceptable for a read operation. Completeness is high given available context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds value by explaining version parameter semantics ('specific historical version; omit for latest') and clarifying mount/path formatting. This extra context justifies a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Read') and resource ('key/value data stored at a secret path in a Vault KV engine'). It distinguishes between KV v1 and v2 regarding version, and the tool is distinct from siblings like vault_kv_list and vault_kv_read_metadata.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use the version parameter for KV v2 but does not explicitly guide the agent on when to choose this tool over siblings (e.g., vault_kv_read_metadata for metadata, vault_kv_list for listing). Implicit context is provided but no clear when-not or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_kv_read_metadataRead KV v2 secret metadataARead-onlyIdempotent
KV v2 only: read metadata for a secret, including the full version history, current version, created/updated times, and custom_metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| mount | Yes | Mount point of the KV secrets engine, without leading/trailing slashes (e.g. 'secret', 'kv', 'apps/prod'). | |
| path | Yes | Path of the secret within the mount (e.g. 'db/creds', 'services/api'). Do NOT include the mount, or the KV v2 'data/'/'metadata/' prefix — those are added automatically. |
Output Schema
| Name | Required | Description |
|---|---|---|
| metadata | Yes | Metadata object including versions, current_version, created_time, custom_metadata. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so the description's job is to add context. It does so by listing what metadata is returned (version history, times, custom_metadata), providing behavioral detail beyond the annotations. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that is front-loaded with the critical 'KV v2 only' qualifier. Every word adds value; no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of sibling tools, annotations, and an output schema (which documents return values), the description covers the essential purpose, scope (KV v2 only), and included data. It does not mention error conditions or authentication, but those are likely standard for Vault tools. Overall sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the schema already describes both parameters clearly. The description does not add additional parameter-level meaning beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads metadata for a secret in KV v2, listing specific data fields (version history, current version, timestamps, custom_metadata). It distinguishes from siblings like vault_kv_read (data) and vault_kv_list (listing paths) by emphasizing it's for metadata only.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly limits usage to KV v2 ('KV v2 only'), which helps agents choose between this and vault_kv_read for data. However, it does not explicitly state when not to use or name alternatives, but the sibling context makes the distinction clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_list_kv_mountsList KV secret mountsARead-onlyIdempotent
Discover the secret engine mounts available to the current token, including each KV mount's version. Useful to learn which 'mount' values to pass to the other tools.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| mounts | Yes | Available secret mounts. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide safety and idempotency info. Description adds that it returns KV mount versions, but no further behavioral traits beyond what annotations indicate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, immediately clear purpose, no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and clear annotations, description is complete. Output schema handles return values.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, and schema coverage is 100%. Description doesn't need to add parameter details; baseline 4 for zero-parameter tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it discovers secret engine mounts and their KV versions, differentiating from sibling tools that operate on specific paths or health checks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states utility: learn mount values for other tools. Implicitly when-not-to-use is not needed as it's a discovery tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.0.0- First observed
vault_health - First observed
vault_kv_list - First observed
vault_kv_read - First observed
vault_kv_read_metadata - First observed
vault_list_kv_mounts
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: health check, listing keys, reading secrets, reading metadata, and discovering mounts. No overlap or ambiguity.
All tools follow the vault_ prefix and verb_noun pattern, but there is slight inconsistency in ordering (e.g., vault_kv_list vs vault_list_kv_mounts). Overall still predictable.
Five tools is well-scoped for a Vault KV server, covering essential operations without bloat or missing necessary categories.
Missing write/update and delete operations for secrets, which are typical in KV management. The tools are read-heavy, leaving notable gaps for lifecycle management.
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
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.43 npmMIT
- AlicenseNot gradedqualityBmaintenanceA third-party MCP server for interacting with HashiCorp Vault to manage ACL policies, audit devices, and secret engines like KV v2, PKI, and Transit. It provides tools for system backend administration and includes prompts for generating security policy configurations.MIT

wundervaultofficial
AlicenseAqualityAmaintenanceMCP server for Wundervault zero-knowledge secret management. Exposes vault secrets to AI agents via the Model Context Protocol — secrets are decrypted server-side and never returned to the agent in plaintext.1324 npm2AGPL 3.0- AlicenseNot gradedqualityBmaintenanceA read-only MCP server for inspecting and diagnosing HCP Terraform workspaces, runs, and plan summaries from ChatGPT and other MCP clients. It provides tools to list workspaces, inspect runs, and summarize plans without exposing sensitive data.MIT