Allows an AI client to mount and unmount VeraCrypt containers using secure stdin password handling and OS keyring integration.
Also known as bitterdev/veracrypt-mcp
- Stars
- 1
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.2.0
- Last commit
- Oct 19, 2026
- License
- MIT
What is VeraCrypt MCP?
VeraCrypt allows an AI client to mount and unmount VeraCrypt containers using secure stdin password handling and OS keyring integration.
Summary generated from the project's README
About VeraCrypt MCP server
Managing encrypted VeraCrypt volumes through an AI client allows developers to interact with sensitive files using natural language. This server provides tools to mount and unmount containers, list currently active volumes, and handle complex authentication methods like PIM, read-only modes, and keyfiles. Once a volume is mounted, an AI client can use standard file tools to read or edit the contents of the encrypted container.
Security is prioritized by piping passwords through stdin to avoid visibility in process lists. Users can integrate with macOS Keychain or Linux libsecret to fetch credentials via a keychain account name, ensuring passwords stay out of chat logs. The setup requires Python 3.10 or higher and the VeraCrypt command line binary. For macOS users, macFUSE is a necessary requirement for the mounting process to function correctly.
What you can do with it
- 1Accessing a default encrypted vaultAsk the AI to mount a pre-configured container using a single command.
- 2Mounting volumes with specific constraintsInstruct the AI to open a container in read-only mode at a specific directory.
Written from the project's README. Every use case is checked against a quote from it.
How to install VeraCrypt MCP
Formats verified 10 Nov 2026Install VeraCrypt MCP in Claude Code
$ claude mcp add veracrypt-mcp -- uvx veracrypt-mcpInstall VeraCrypt MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"veracrypt-mcp": {
"command": "uvx",
"args": [
"veracrypt-mcp"
]
}
}
}Install VeraCrypt MCP in VS Code
.vscode/mcp.json
{
"servers": {
"veracrypt-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"veracrypt-mcp"
]
}
}
}Install VeraCrypt MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"veracrypt-mcp": {
"command": "uvx",
"args": [
"veracrypt-mcp"
]
}
}
}Install VeraCrypt MCP in Codex
~/.codex/config.toml
[mcp_servers.veracrypt-mcp] command = "uvx" args = ["veracrypt-mcp"]
Install VeraCrypt MCP in Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"veracrypt-mcp": {
"command": "uvx",
"args": [
"veracrypt-mcp"
]
}
}
}Configuration
VERACRYPT_MCP_CONTAINERVERACRYPT_MCP_KEYCHAIN_ACCOUNT
| Name | Description | |
|---|---|---|
| VERACRYPT_MCP_CONTAINER | — | |
| VERACRYPT_MCP_KEYCHAIN_ACCOUNT | — |
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablebitterdev/veracrypt-mcp is public and reachablegithub.com/bitterdev/veracrypt-mcp ↗Pass
- Package names this repository as its sourceveracrypt-mcp names bitterdev/veracrypt-mcp as sourcepypi.org/project/veracrypt-mcp/ ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-19github.com/bitterdev/veracrypt-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from veracrypt-mcpPass
- No critical advisory in the package or its dependencies29 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubveracrypt-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):
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):
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 (
veracrypton PATH, the macOS app bundle, or setVERACRYPT_PATH) - macOS: macFUSE (required by VeraCrypt for mounting)
- Linux keyring source:
libsecret-tools(secret-tool)
Installation
pip install git+https://github.com/bitterdev/veracrypt-mcp.git
Or from a local clone:
git clone https://github.com/bitterdev/veracrypt-mcp.git
cd veracrypt-mcp
pip install .
Configuration
Claude Code
claude mcp add veracrypt -- veracrypt-mcp
With a default vault (recommended):
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
{
"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
| Variable | Description |
|---|---|
VERACRYPT_MCP_CONTAINER |
Default container path used when no container_path is given |
VERACRYPT_MCP_KEYCHAIN_ACCOUNT |
Default keyring account used when no password source is given |
VERACRYPT_MCP_MOUNT_POINT |
Default mount directory (otherwise VeraCrypt auto-selects) |
VERACRYPT_MCP_KEYFILES |
Default keyfile paths, comma or newline separated |
VERACRYPT_MCP_UNLOCK_COMMAND |
Interactive unlock command, called with --interaktiv |
VERACRYPT_PATH |
Absolute path to the VeraCrypt binary if it is not on PATH |
Tests
python -m unittest discover -s tests
The tests create throwaway containers and need the VeraCrypt CLI.
License
MIT, see LICENSE.
Author
Fabian Bitter (fabian@bitter.de)
VeraCrypt MCP questions
How do I add VeraCrypt MCP to Claude Code?
Run claude mcp add veracrypt-mcp -- uvx veracrypt-mcp in your terminal. Add --scope user to make it available in every project.
How do I add VeraCrypt MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
How does the server handle passwords securely?
The server pipes the password to VeraCrypt via stdin using the official --stdin option, ensuring passwords are never visible in the process list.
What is the recommended way to manage passwords?
It is recommended to store the password in the OS keyring (macOS Keychain or Linux libsecret) so the password never enters the LLM context.
Can I use hardware tokens like YubiKey?
Yes, you can set a VERACRYPT_MCP_UNLOCK_COMMAND for keyfiles that require a hardware token unlock.