Vaultwarden MCP

v0.3.2
io.github.metodex-tech/vaultwarden-mcp Checked 2 days ago Published 3 days ago

Security-first Bitwarden/Vaultwarden secrets for AI agents: allowlists, use-without-reveal, approval

Values you need

VariableWhat it is
VW_POLICYrequired Path to the policy (allowlist) JSON file
VW_SESSION_FILErequired Path to a file holding the bw session key
BITWARDENCLI_APPDATA_DIRoptional bw CLI state directory (logged-in account)
VW_APPROVALoptional Ask the user before releasing secrets: never | always Default: never

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add vaultwarden-mcp -e 'VW_POLICY=<VW_POLICY>' -e 'VW_SESSION_FILE=<VW_SESSION_FILE>' -- npx -y @metodex/vaultwarden-mcp@0.3.2 serve
Add to claude_desktop_config.json
{
  "mcpServers": {
    "vaultwarden-mcp": {
      "args": [
        "-y",
        "@metodex/vaultwarden-mcp@0.3.2",
        "serve"
      ],
      "command": "npx",
      "env": {
        "VW_POLICY": "<VW_POLICY>",
        "VW_SESSION_FILE": "<VW_SESSION_FILE>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "vaultwarden-mcp": {
      "args": [
        "-y",
        "@metodex/vaultwarden-mcp@0.3.2",
        "serve"
      ],
      "command": "npx",
      "env": {
        "VW_POLICY": "<VW_POLICY>",
        "VW_SESSION_FILE": "<VW_SESSION_FILE>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "VW_POLICY",
      "id": "vw-policy",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "VW_SESSION_FILE",
      "id": "vw-session-file",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "vaultwarden-mcp": {
      "args": [
        "-y",
        "@metodex/vaultwarden-mcp@0.3.2",
        "serve"
      ],
      "command": "npx",
      "env": {
        "VW_POLICY": "${input:vw-policy}",
        "VW_SESSION_FILE": "${input:vw-session-file}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.vaultwarden-mcp]
command = "npx"
args = ["-y", "@metodex/vaultwarden-mcp@0.3.2", "serve"]
env = { "VW_POLICY" = "<VW_POLICY>", "VW_SESSION_FILE" = "<VW_SESSION_FILE>" }

For AI agents

  1. Ask the user for: VW_POLICY, VW_SESSION_FILE. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_secret, vault_status, list_item_metadata, use_secret.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json