MCP server
mdstn-cipher mcp runs an MCP server over stdio (JSON-RPC 2.0,
one message per line, protocol versions 2025-06-18 and 2024-11-05). It writes only protocol
messages to stdout; logs go to stderr.
Setup
For Claude Code:
claude mcp add cipher -- mdstn-cipher mcpFor Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS,
%APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"cipher": {
"command": "mdstn-cipher",
"args": ["mcp"]
}
}
}Add "--db", "/path/to/cipher.db" to args to use a key database other than
~/.mdstn/cipher.db.
Tools
| Tool | Arguments | What it does |
|---|---|---|
encrypt_file | file_path; optional passphrase or for_email | Encrypts to <file_path>.mdstn, with a file password or to a recipient found through CKD. With neither, it uses your default key, which must already exist |
decrypt_file | file_path; optional passphrase, recovery_passphrase | Decrypts next to the file: the path without .mdstn, else <file_path>.decrypted. Returns the sender’s file name but never uses it as a path |
list_keys | none | Lists every key |
export_key | key_id | Returns the public part of a key (ID, type, fingerprint, public key). Writes no file |
get_status | none | Cipher status and configuration |
lookup_key | email | Looks up a public key through CKD |
import_key | public_key (base64); optional alias, type | Imports someone else’s public key |
What the server will not do
- Create or delete keys. Use
mdstn-cipher keys createandkeys deletein a terminal. A new key’s 24-word recovery phrase must never end up in an AI transcript, and a prompt injection must not be able to destroy keys. - Replace a file.
encrypt_fileanddecrypt_filewrite only to their default paths next to the input, and stop if a file is already there. - Write where the caller chooses. No tool takes an output path.
A failed call returns an error result; one malformed call can’t stop the server.