Skip to main content

No project description provided

Project description

🧟 Monstermash

"He did the mash. He did the monster mash."

Encryption that doesn't bite. Monstermash wraps the battle-tested NaCl (libsodium) cryptography in a friendly CLI, a clean Python API, and an MCP server — so developers, engineers, and now AI agents can encrypt things correctly without touching a single cryptographic knob.

1️⃣ version: 2.0.0  ·  ✍️ author: Mitchell Lisle

PyPI Python


Why Monstermash?

  • 🔒 Safe by default — built on NaCl's Box (Curve25519 + XSalsa20-Poly1305). No hand-rolled crypto, no caller-managed nonces, no footguns.
  • 🪄 Decrypt with just your private key — the sender's public key rides inside the ciphertext (the "Mashed Envelope"), so the recipient needs nothing extra.
  • 🧰 One tool, three surfaces — the same guarantees from the CLI, the Python library, and an optional MCP server for LLMs.
  • 🗝️ Profiles, not key-juggling — store keypairs once (mode 0600, just like your SSH keys) and reference them by name.
  • 🚨 Tamper-evident — authenticated encryption fails loudly; a corrupted or wrong-key ciphertext raises, it never returns garbage.

Install

pip install monstermash

Want the MCP server for AI agents? Grab the optional extra:

pip install "monstermash[mcp]"

Quickstart

1. Generate a keypair

monstermash generate
-----------------
Private Key (keep it secret, keep it safe)
a715a3d11d0f9c13de3bd6d390e36ba4e3322f4f2e4f1a13a54ba85be606de87
Public Key (you can share this one)
01765c67f451f3175f53bbe11d69d73a36d45074da935271473b4a1c460e3d79
-----------------

2. Save it as a profile (optional, but nice)

Profiles live in ~/.monstermashcfg and are written with owner-only (0600) permissions.

monstermash configure \
  --profile default \
  --private-key a715a3d11d0f9c13de3bd6d390e36ba4e3322f4f2e4f1a13a54ba85be606de87 \
  --public-key 01765c67f451f3175f53bbe11d69d73a36d45074da935271473b4a1c460e3d79

3. Encrypt

monstermash encrypt --profile default --data "hello world"

Or pass keys explicitly, or encrypt a whole file:

monstermash encrypt \
  --private-key a715a3d11d0f9c13de3bd6d390e36ba4e3322f4f2e4f1a13a54ba85be606de87 \
  --public-key 03ab4b8a77456729678a8022c2bfe22f64ed2db72692903e5f69e4a92649e646 \
  --file ./secret-plans.txt

4. Decrypt

monstermash decrypt \
  --private-key 91c7b2534454587a3330537bce60056e9da9a9bf75d32507152f49e85514970d \
  --data 01765c67f451f3175f53bbe11d69d73a36d45074da935271473b4a1c460e3d797bee92fa7ff1216eb5324b247fd41cce283adbcc4df92baacfea27765360a7c0feb226cccc1538c0397783003d0283d2841d2a

The --profile flag works here too — no public key needed, it's baked into the ciphertext.

How it works

Monstermash owns no cryptographic primitives — it leans entirely on NaCl. What it adds is ergonomics:

plaintext ──▶ NaCl Box (Curve25519 + XSalsa20-Poly1305) ──▶ [ sender public key │ nonce │ MAC │ ciphertext ] ──▶ hex
                                                                └──────────── the "Mashed Envelope" ────────────┘

Because the sender's public key travels inside the envelope, the recipient decrypts with only their private key. See docs/domain/cryptography.md for the full domain model and design decisions.

MCP Server

Monstermash ships an optional Model Context Protocol server so an LLM can do real encryption natively — without ever handling raw private keys.

Security model: tool arguments flow into the model's context, so private keys never cross the boundary. The model works by profile name (à la ssh-agent); the server reads the key from disk locally. Set a default with MONSTERMASH_MCP_DEFAULT_PROFILE.

Run it over stdio:

monstermash-mcp

Register it with an MCP client (e.g. Claude Desktop):

{
  "mcpServers": {
    "monstermash": {
      "command": "monstermash-mcp"
    }
  }
}

Tools

Tool Description
generate_keypair Generate a keypair, store it under a profile, and return only the public key.
encrypt Encrypt text using a profile's keys (recipient defaults to the profile; override with public_key).
decrypt Decrypt a ciphertext using a profile's private key.
configure Import an existing keypair under a named profile.
list_profiles List profile names and public keys — private keys are never returned.

License

See the repository for license details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monstermash-2.0.0.tar.gz (195.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monstermash-2.0.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file monstermash-2.0.0.tar.gz.

File metadata

  • Download URL: monstermash-2.0.0.tar.gz
  • Upload date:
  • Size: 195.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for monstermash-2.0.0.tar.gz
Algorithm Hash digest
SHA256 21dc5d6489e4cc3fc030385ccc94fcd6b76b6e02dc35b42da3a0a55258ce67d7
MD5 e851656b965db4f8c1d6aae4ac1a1d54
BLAKE2b-256 5771bcbe02a0fcbc410dcbe7de03e51661d112d527a427de9b5e2d363f4d2f2d

See more details on using hashes here.

File details

Details for the file monstermash-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: monstermash-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for monstermash-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0144f755d5e4907435c25eb29c80f4899c2c0d17cb9736cc3ac37e4b5d09e59
MD5 d0ff39cd48530c8e3ca513180b362cf5
BLAKE2b-256 eb0e4ae87cd47896e7931b42199f0ccddc709fd193ee695ac58027fda2d6ab49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page