Skip to content

MCP server

GitHub →

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 mcp

For 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

ToolArgumentsWhat it does
encrypt_filefile_path; optional passphrase or for_emailEncrypts 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_filefile_path; optional passphrase, recovery_passphraseDecrypts 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_keysnoneLists every key
export_keykey_idReturns the public part of a key (ID, type, fingerprint, public key). Writes no file
get_statusnoneCipher status and configuration
lookup_keyemailLooks up a public key through CKD
import_keypublic_key (base64); optional alias, typeImports someone else’s public key

What the server will not do

  • Create or delete keys. Use mdstn-cipher keys create and keys delete in 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_file and decrypt_file write 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.