Skip to main content
Glama
kelleyblackmore

Vault MCP Server

vault_write

Store encrypted secrets in HashiCorp Vault at specified paths using JSON data for secure credential management and configuration storage.

Instructions

Write a secret to Vault at the specified path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path to write the secret to (e.g., 'secret/data/myapp')
dataYesThe secret data to write as a JSON object

Implementation Reference

  • The execution handler for the 'vault_write' tool. It extracts 'path' and 'data' from the tool arguments, wraps 'data' in an object for KV v2 compatibility, writes to Vault using vaultClient.write, and returns the JSON-stringified result as text content.
    case "vault_write": {
      const { path, data } = args as { path: string; data: Record<string, any> };
      // For KV v2, wrap data in a data object
      const result = await vaultClient.write(path, { data });
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema for the 'vault_write' tool, defining required 'path' (string) and 'data' (object) properties.
    inputSchema: {
      type: "object",
      properties: {
        path: {
          type: "string",
          description: "The path to write the secret to (e.g., 'secret/data/myapp')",
        },
        data: {
          type: "object",
          description: "The secret data to write as a JSON object",
        },
      },
      required: ["path", "data"],
    },
  • src/index.ts:45-62 (registration)
    Tool registration in the TOOLS array, including name, description, and input schema for 'vault_write'. This is returned by the ListTools handler.
    {
      name: "vault_write",
      description: "Write a secret to Vault at the specified path",
      inputSchema: {
        type: "object",
        properties: {
          path: {
            type: "string",
            description: "The path to write the secret to (e.g., 'secret/data/myapp')",
          },
          data: {
            type: "object",
            description: "The secret data to write as a JSON object",
          },
        },
        required: ["path", "data"],
      },
    },

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kelleyblackmore/vault-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server