@jkumonpm/hash-crypto-mcp
v2.0.1
Published
Hash & Crypto MCP server — hash, UUID, random strings, AES encrypt/decrypt
Downloads
28
Maintainers
Readme
hash-crypto-mcp
Hash & Crypto MCP server. Hash, UUID, random strings, AES encrypt/decrypt.
No external dependencies. Pure Node.js crypto.
Install
npm install -g hash-crypto-mcpUsage
Claude Desktop / Cursor / OpenCode
Add to your MCP config:
{
"mcpServers": {
"hash-crypto": {
"command": "npx",
"args": ["-y", "hash-crypto-mcp"]
}
}
}Tools
generate_hash — Generate Hash
Generate a cryptographic hash of the input string.
Input:
{
"algorithm": "sha256",
"input": "hello world"
}Output:
{
"algorithm": "sha256",
"input": "hello world",
"hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
}Supported algorithms: md5, sha1, sha256, sha512
generate_uuid — Generate UUID
Generate UUIDs (v4 or v7).
Input:
{
"version": "4",
"count": 3
}Output:
{
"version": 4,
"count": 3,
"uuids": [
"550e8400-e29b-41d4-a716-446655440000",
"6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"6ba7b811-9dad-11d1-80b4-00c04fd430c8"
]
}generate_random_string — Generate Random String
Generate random strings with specified length and character set.
Input:
{
"length": 16,
"charset": "alphanumeric",
"count": 3
}Output:
{
"length": 16,
"charset": "alphanumeric",
"count": 3,
"strings": ["aB3xK9mP2qR7sT1v", "wY5zN8jL4hF6gD0c", "eU2iO7pA3bM9nQ1x"]
}Built-in charsets: alphanumeric, lowercase, uppercase, digits, hex, symbols, printable
You can also pass a custom charset string directly.
seed_random_string — Seed-Based Random String
Generate a deterministic random string from a seed. Same seed + same params always produce the same output.
Input:
{
"seed": "user-123-api-key",
"length": 32,
"charset": "hex"
}Output:
{
"seed": "user-123-api-key",
"length": 32,
"charset": "hex",
"string": "a3f8c2d1e9b7..."
}Use cases:
- Generate reproducible API keys or tokens from a seed
- Create deterministic test data
- Password template generation
encrypt_string — Encrypt/Decrypt String
AES-256-CBC encrypt or decrypt a string.
Encrypt:
{
"action": "encrypt",
"text": "secret message",
"password": "mykey123"
}Output:
{
"action": "encrypt",
"encrypted": "a1b2c3d4e5f6...",
"salt": "abcdef1234567890...",
"iv": "1234567890abcdef..."
}Decrypt:
{
"action": "decrypt",
"encrypted": "a1b2c3d4e5f6...",
"password": "mykey123",
"salt": "abcdef1234567890...",
"iv": "1234567890abcdef..."
}Output:
{
"action": "decrypt",
"decrypted": "secret message"
}verify_hash — Verify Hash
Verify that a string produces the expected hash. Returns match status and the actual hash.
Input:
{
"algorithm": "sha256",
"input": "hello world",
"expected": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
}Output (match):
{
"algorithm": "sha256",
"input": "hello world",
"expected": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
"match": true,
"actual": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
}Output (mismatch):
{
"algorithm": "sha256",
"input": "hello world",
"expected": "0000000000000000000000000000000000000000000000000000000000000000",
"match": false,
"actual": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
}Design
| Feature | Why |
|---------|-----|
| Zero runtime deps | Only @modelcontextprotocol/sdk and zod |
| Native crypto | Uses node:crypto — no external libraries |
| AES-256-CBC | Industry-standard encryption with random salt + IV |
| UUID v7 support | Timestamp-based UUIDs for sortable IDs |
| Dynamic charset | Pass any custom character string |
| Seed-based random | Deterministic output for reproducible results |
| Hash verification | One-step verify with match status |
License
MIT
