
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.
概览
让助手挂载和卸载 VeraCrypt 加密容器的 MCP 服务器,挂载后可用常规文件工具读写其中的文件。
- 可以做什么
- 挂载 VeraCrypt 容器,可指定挂载点、PIM、只读模式或密钥文件
- 按容器路径或挂载点卸载卷
- 列出当前已挂载的所有 VeraCrypt 卷
- 配置默认保险库后,直接说“挂载我的保险库”即可无需参数
- 适用场景
- 适合把敏感文件存放在 VeraCrypt 容器中,并希望助手打开保险库、用常规文件工具处理文件后再关闭,同时避免密码出现在命令行中的场景。
- 运行要求
- 本地 Python 包(Python 3.10 及以上),通过 stdio 运行。需安装 VeraCrypt 命令行程序并在 PATH 中,或设置 VERACRYPT_PATH;macOS 还需 macFUSE。可选环境变量可设置默认容器、钥匙串账户、挂载点、密钥文件和解锁命令;Linux 钥匙串方式需要 libsecret-tools。
安装
在 SourceWeft 中
- 打开 控制台中的 Veracrypt Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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):
Linux (libsecret / GNOME Keyring, requires libsecret-tools):
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 (
veracrypton PATH, the macOS app bundle, or setVERACRYPT_PATH) - macOS: macFUSE (required by VeraCrypt for mounting)
- Linux keyring source:
libsecret-tools(secret-tool)
Installation
Or from a local clone:
Configuration
Claude Code
With a default vault (recommended):
Claude Desktop / generic MCP client
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
Tests
The tests create throwaway containers and need the VeraCrypt CLI.
License
MIT, see LICENSE.
Author
Fabian Bitter ([email protected])
来源:README.md,提交 c7c9fd9
工具
0版本历史
1- v0.2.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分