io.github.daedalus/mcp-cryptography
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.daedalus/mcp-cryptography hash the string 'hello' using SHA-256"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-cryptography
MCP server exposing cryptography library functionality.
mcp-name: io.github.daedalus/mcp-cryptography
Install
pip install mcp-cryptographyRelated MCP server: Azure Key Vault MCP
Usage
from mcp_cryptography import mcp
# Run the MCP server
if __name__ == "__main__":
mcp.run()Available Tools
The server provides the following cryptographic tools:
Key Generation
generate_symmetric_key- Generate a Fernet symmetric keygenerate_rsa_key- Generate an RSA key pairgenerate_x25519_key- Generate an X25519 key pair
Symmetric Encryption
fernet_encrypt/fernet_decrypt- Fernet encryptionaes_encrypt/aes_decrypt- AES encryption (CBC/GCM modes)
Asymmetric Encryption
rsa_encrypt/rsa_decrypt- RSA OAEP encryptionrsa_sign/rsa_verify- RSA digital signatures
Hashing
hash_sha256- SHA-256 hashhash_sha512- SHA-512 hashhash_sha1- SHA-1 hash
HMAC
hmac_sign- Generate HMAChmac_verify- Verify HMAC
Key Derivation
pbkdf2_derive- PBKDF2 key derivationscrypt_derive- Scrypt key derivation
X.509 Certificates
generate_self_signed_cert- Generate self-signed certificateparse_certificate- Parse X.509 certificate
Utilities
generate_random_bytes- Generate random bytesgenerate_random_base64- Generate random base64 bytes
Development
git clone https://github.com/daedalus/mcp-cryptography.git
cd mcp-cryptography
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mcp_cryptography src/Available Tools
22 toolsaes_decryptA
Decrypt AES ciphertext.
Args: key: Hex-encoded AES key. ciphertext: Hex-encoded ciphertext. iv: Hex-encoded initialization vector. mode: Encryption mode - 'CBC' or 'GCM' (default CBC).
Returns: Decrypted string.
Raises: ValueError: If key size is invalid.
Inputs: iv (required), key (required), ciphertext (required), mode. Returns: result
aes_encryptA
Encrypt data using AES.
Args: key: Hex-encoded AES key (16, 24, or 32 bytes). data: String to encrypt. mode: Encryption mode - 'CBC' or 'GCM' (default CBC).
Returns: Dictionary with 'ciphertext' (hex) and 'iv' (hex).
Raises: ValueError: If key size is invalid.
Inputs: key (required), data (required), mode. Returns: object
fernet_decryptA
Decrypt Fernet ciphertext.
Args: key: Base64-encoded Fernet key. ciphertext: Base64-encoded ciphertext.
Returns: Decrypted plain text string.
Raises: cryptography.fernet.InvalidToken: If decryption fails.
Inputs: key (required), ciphertext (required). Returns: result
fernet_encryptA
Encrypt data using Fernet symmetric encryption.
Args: key: Base64-encoded Fernet key. data: Plain text string to encrypt.
Returns: Base64-encoded ciphertext.
Example: >>> key = generate_symmetric_key() >>> ciphertext = fernet_encrypt(key, "Hello, World!") >>> len(ciphertext) > 0 True
Inputs: key (required), data (required). Returns: result
generate_random_base64A
Generate random bytes encoded as base64.
Args: length: Number of bytes to generate (default 32).
Returns: Base64-encoded random string.
Inputs: length. Returns: result
generate_random_bytesA
Generate random bytes.
Args: length: Number of bytes to generate (default 32).
Returns: Hex-encoded random bytes.
Example: >>> generate_random_bytes(16) 'a1b2c3d4e5f6...'
Inputs: length. Returns: result
generate_rsa_keyA
Generate an RSA key pair.
Args: key_size: Key size in bits (default 2048). Must be at least 2048.
Returns: Dictionary with 'public_key' and 'private_key' in PEM format.
Raises: ValueError: If key_size is less than 2048.
Inputs: key_size. Returns: object
generate_self_signed_certA
Generate a self-signed X.509 certificate.
Args: common_name: Common name for the certificate subject. organization: Organization name (optional). days_valid: Number of days the certificate is valid (default 365).
Returns: Dictionary with 'certificate' (PEM) and 'private_key' (PEM).
Inputs: common_name (required), days_valid, organization. Returns: object
generate_symmetric_keyA
Generate a Fernet symmetric key.
Returns: Base64-encoded 32-byte key suitable for Fernet encryption.
Example: >>> key = generate_symmetric_key() >>> len(key) # 44 characters base64 encoded 44
Inputs: no named parameters. Returns: result
generate_x25519_keyA
Generate an X25519 key pair for key exchange.
Returns: Dictionary with 'public_key' and 'private_key' in PEM format.
Example: >>> keys = generate_x25519_key() >>> len(keys['public_key']) > 0 True
Inputs: no named parameters. Returns: object
hash_sha1A
Compute SHA-1 hash.
Note: SHA-1 is considered cryptographically broken. Use only for legacy compatibility.
Args: data: String to hash.
Returns: Hex-encoded hash.
Inputs: data (required). Returns: result
hash_sha256A
Compute SHA-256 hash.
Args: data: String or base64-encoded bytes to hash.
Returns: Hex-encoded hash.
Example: >>> hash_sha256("Hello, World!") 'dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f'
Inputs: data (required). Returns: result
hash_sha512B
Compute SHA-512 hash.
Args: data: String to hash.
Returns: Hex-encoded hash.
Inputs: data (required). Returns: result
hmac_signA
Generate HMAC.
Args: key: Hex-encoded key. data: String to sign. algorithm: Hash algorithm - 'sha256' or 'sha512' (default sha256).
Returns: Hex-encoded HMAC.
Example: >>> hmac_sign("aabbcc", "message") 'c053c4f7...'
Inputs: key (required), data (required), algorithm. Returns: result
hmac_verifyA
Verify HMAC.
Args: key: Hex-encoded key. data: String that was signed. hmac: Hex-encoded HMAC to verify. algorithm: Hash algorithm - 'sha256' or 'sha512'.
Returns: True if HMAC is valid.
Inputs: key (required), data (required), hmac (required), algorithm. Returns: result
parse_certificateB
Parse X.509 certificate.
Args: certificate_pem: Certificate in PEM format.
Returns: Dictionary with 'subject', 'issuer', 'not_valid_before', 'not_valid_after'.
Inputs: certificate_pem (required). Returns: object
pbkdf2_deriveA
Derive key using PBKDF2.
Args: password: Password to derive from. salt: Hex-encoded salt (optional, will generate if not provided). iterations: Number of iterations (default 480000, OWASP recommended).
Returns: Dictionary with 'derived_key' (hex) and 'salt' (hex).
Inputs: password (required), salt, iterations. Returns: object
rsa_decryptB
Decrypt RSA ciphertext using private key.
Args: private_key_pem: RSA private key in PEM format. ciphertext: Base64-encoded ciphertext.
Returns: Decrypted string.
Inputs: ciphertext (required), private_key_pem (required). Returns: result
rsa_encryptA
Encrypt data using RSA with OAEP asymmetric_padding.
Args: public_key_pem: RSA public key in PEM format. data: String to encrypt (max ~446 bytes for 4096-bit key).
Returns: Base64-encoded ciphertext.
Raises: ValueError: If data is too large for the key size.
Inputs: data (required), public_key_pem (required). Returns: result
rsa_signA
Create RSA digital signature.
Args: private_key_pem: RSA private key in PEM format. data: String to sign.
Returns: Base64-encoded signature.
Inputs: data (required), private_key_pem (required). Returns: result
rsa_verifyA
Verify RSA digital signature.
Args: public_key_pem: RSA public key in PEM format. data: Original signed data. signature: Base64-encoded signature.
Returns: True if signature is valid.
Inputs: data (required), signature (required), public_key_pem (required). Returns: result
scrypt_deriveA
Derive key using Scrypt.
Args: password: Password to derive from. salt: Hex-encoded salt (optional, will generate if not provided).
Returns: Dictionary with 'derived_key' (hex) and 'salt' (hex).
Inputs: password (required), salt. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Tools are generally distinct, but generate_symmetric_key and generate_random_bytes both produce random data, which could cause confusion; however, descriptions clarify their purposes.
Naming conventions vary: some tools use verb_noun (generate_symmetric_key), others use algorithm_verb (fernet_encrypt, aes_encrypt), and hash_sha256 mixes verb and algorithm. Inconsistency reduces predictability.
22 tools cover a broad cryptography domain; while slightly above the typical 3-15 range, each tool has a clear purpose and the count is justified.
Major cryptographic operations are covered: symmetric/asymmetric encryption, hashing, signing, key derivation, certificates. Missing modern algorithms like Ed25519 or ECDSA are minor gaps.
Maintenance
Related MCP Connectors
Production-grade cryptography toolkit with 31 MCP tools for classical, PQC, and KMS workflows.
Hash passwords with bcrypt and issue/verify JWT session tokens over A2A + MCP.
Exact hashing, base64/hex/URL encoding, JWT decoding and UUIDs for AI agents. No auth required.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides cryptographic identity and signing capabilities for AI agents, enabling them to create persistent identities, sign actions with private keys, and allow external systems to verify the authenticity and provenance of agent-initiated operations.4MIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables management of Azure Key Vault secrets and certificates, including creation, retrieval, deletion, format conversion (PEM/CRT to PFX), certificate chain imports, and self-signed certificate generation.-
- AlicenseNot gradedqualityCmaintenanceProvides cryptographic hash and HMAC computation for text, supporting algorithms like md5, sha1, sha256, sha384, and sha512. All operations are performed locally without transmitting or storing input data.326 npmMIT
- AlicenseAqualityDmaintenanceEnables cryptographic operations including hashing, encoding/decoding, ID generation, password tools, and JWT inspection via MCP.559 npmMIT