Veracrypt Mcp

io.github.bitterdev由 GitHub 帳號 bitterdev 發布v0.2.0更新於 Oct 24, 2026

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

已驗證STDIO僅桌面檔案與儲存安全與監控

概覽

AI 產生的概覽

讓助理掛載與卸載 VeraCrypt 加密容器的 MCP 伺服器,掛載後可用一般檔案工具讀寫其中的檔案。

可以做什麼
  • 掛載 VeraCrypt 容器,可指定掛載點、PIM、唯讀模式或金鑰檔
  • 依容器路徑或掛載點卸載磁碟區
  • 列出目前所有已掛載的 VeraCrypt 磁碟區
  • 設定預設保險庫後,直接說「掛載我的保險庫」即可免參數執行
適用情境
適合將敏感檔案存放在 VeraCrypt 容器中,並希望助理開啟保險庫、以一般檔案工具處理檔案後再關閉,同時避免密碼出現在命令列的情況。
執行需求
本機 Python 套件(Python 3.10 以上),透過 stdio 執行。需安裝 VeraCrypt 命令列程式並位於 PATH,或設定 VERACRYPT_PATH;macOS 另需 macFUSE。可用選用環境變數設定預設容器、鑰匙圈帳號、掛載點、金鑰檔與解鎖命令;Linux 鑰匙圈方式需要 libsecret-tools。
安裝前請注意
直接把密碼傳給工具會讓密碼經過 LLM 對話並可能留在聊天記錄中,建議改用系統鑰匙圈帳號名稱。金鑰檔與解鎖命令(VERACRYPT_MCP_UNLOCK_COMMAND)會從本機讀取,解鎖命令每次掛載都會互動執行。掛載與卸載會改變系統狀態,掛載後的檔案可被助理的檔案工具修改。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Veracrypt Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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])

來源:README.md,提交 c7c9fd9

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分