Veracrypt Mcp

io.github.bitterdevPublished by GitHub account bitterdevv0.2.0Updated Oct 24, 2026

MCP server to mount and unmount VeraCrypt containers with secure stdin password handling.

VerifiedSTDIODesktop onlyFiles & StorageSecurity & Monitoring

Overview

AI-generated overview

MCP server that lets an assistant mount and unmount VeraCrypt encrypted containers, then read and edit the files inside them.

What you can do
  • Mount a VeraCrypt container, optionally with a mount point, PIM, read-only mode or keyfiles
  • Unmount a volume by container path or mount point
  • List all currently mounted VeraCrypt volumes
  • Use a preconfigured default vault so a plain "mount my vault" request works without arguments
When to use it
Useful when you keep sensitive files in VeraCrypt containers and want an assistant to open the vault, work on the files with its normal file tools, and close it again, without the volume password appearing on the command line.
Requirements
Local Python package (Python 3.10 or newer) run over stdio. VeraCrypt command line binary must be installed and on PATH, or set VERACRYPT_PATH; macOS also needs macFUSE. Optional environment variables set a default container, keyring account, mount point, keyfiles and an unlock command; the Linux keyring source needs libsecret-tools.
Before you install
Passing a password directly to the tool sends it through the LLM conversation and chat logs; prefer the OS keyring account name. Keyfiles and an unlock command (VERACRYPT_MCP_UNLOCK_COMMAND) are read from the machine, and the unlock command runs interactively on each mount. Mounting and unmounting change system state, and mounted files can be edited by the assistant's file tools.

Installation

In SourceWeft

  1. Open Veracrypt Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

veracrypt-mcp

MCP (Model Context Protocol) server for mounting and unmounting VeraCrypt containers, with a security-first approach to password handling.

Once a container is mounted, your MCP client (e.g. Claude Code) can read and edit the files inside it with its normal file tools. Say "mount my vault", work on the files, then "unmount my vault".

mcp-name: io.github.bitterdev/veracrypt-mcp

Features

  • mount_container: mount a VeraCrypt container (optional mount point, PIM, read-only, keyfiles)
  • unmount_container: dismount by container path or mount point
  • list_mounted_containers: show all mounted VeraCrypt volumes
  • Default vault: configure your container once via environment variables; "mount my vault" then works without any arguments

Security model

The volume password is never passed as a command line argument. Command line arguments are visible to every process on the machine (ps aux), so this server always pipes the password to VeraCrypt via stdin using VeraCrypt's official --stdin option.

There are two password sources:

1. OS keyring (recommended)

Store the password once in the OS keyring. The MCP tool then only receives a keyring account name, so the password never enters the LLM context, chat logs, or transcripts.

macOS (Keychain):

bash
security add-generic-password -s veracrypt-mcp -a my-container -w# you will be prompted for the password interactively

Linux (libsecret / GNOME Keyring, requires libsecret-tools):

bash
secret-tool store --label="veracrypt-mcp my-container" service veracrypt-mcp account my-container

Then mount with keychain_account: "my-container".

2. Direct password (fallback)

You can pass password directly to the tool. It is still piped via stdin to VeraCrypt (never visible in the process list), but it passes through the LLM conversation and may be stored in chat logs. Use the keyring source whenever possible.

3. Keyfiles and hardware tokens

keyfiles (or VERACRYPT_MCP_KEYFILES, comma separated) maps to VeraCrypt -k and works with an empty password. If a keyfile is missing, the tool answers Key nicht freigegeben instead of trying other credentials. With default keyfiles configured and a keychain account set, a missing keyfile falls back to the keychain password once (useful while a volume still has its old password); if VeraCrypt rejects it, the answer is again Key nicht freigegeben.

For keyfiles that only exist after the user unlocks a hardware token (YubiKey plus PIN), set VERACRYPT_MCP_UNLOCK_COMMAND. When no credential is passed, the tool runs that command with --interaktiv; the command asks the user, mounts the volume and exits non-zero if the key was not released. Nothing is cached, so every mount needs the user's input.

Additional notes:

  • Passwords are never logged and never included in tool results or error messages.
  • Python cannot securely wipe strings from memory; for maximum security, use the keyring source and a dedicated container password.

Requirements

  • Python >= 3.10
  • VeraCrypt with the command line binary available (veracrypt on PATH, the macOS app bundle, or set VERACRYPT_PATH)
  • macOS: macFUSE (required by VeraCrypt for mounting)
  • Linux keyring source: libsecret-tools (secret-tool)

Installation

bash
pip install git+https://github.com/bitterdev/veracrypt-mcp.git

Or from a local clone:

bash
git clone https://github.com/bitterdev/veracrypt-mcp.gitcd veracrypt-mcppip install .

Configuration

Claude Code

bash
claude mcp add veracrypt -- veracrypt-mcp

With a default vault (recommended):

bash
claude mcp add veracrypt \  -e VERACRYPT_MCP_CONTAINER="/path/to/vault.hc" \  -e VERACRYPT_MCP_KEYCHAIN_ACCOUNT="my-vault" \  -- veracrypt-mcp

Claude Desktop / generic MCP client

json
{  "mcpServers": {    "veracrypt": {      "command": "veracrypt-mcp",      "env": {        "VERACRYPT_MCP_CONTAINER": "/path/to/vault.hc",        "VERACRYPT_MCP_KEYCHAIN_ACCOUNT": "my-vault"      }    }  }}

The server runs over stdio.

Usage examples

With a configured default vault:

Mount my vault

Unmount my vault

Explicit, without defaults:

Mount the container /Users/me/secret.hc using the keychain account "my-container"

Mount read-only at a specific mount point:

Mount /Users/me/secret.hc read-only at ~/mnt/secret, keychain account "my-container"

Environment variables

VariableDescription
VERACRYPT_MCP_CONTAINERDefault container path used when no container_path is given
VERACRYPT_MCP_KEYCHAIN_ACCOUNTDefault keyring account used when no password source is given
VERACRYPT_MCP_MOUNT_POINTDefault mount directory (otherwise VeraCrypt auto-selects)
VERACRYPT_MCP_KEYFILESDefault keyfile paths, comma or newline separated
VERACRYPT_MCP_UNLOCK_COMMANDInteractive unlock command, called with --interaktiv
VERACRYPT_PATHAbsolute path to the VeraCrypt binary if it is not on PATH

Tests

bash
python -m unittest discover -s tests

The tests create throwaway containers and need the VeraCrypt CLI.

License

MIT, see LICENSE.

Author

Fabian Bitter ([email protected])

Source: README.md at commit c7c9fd9

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts