mcp-server

v0.5.2
@pqc-sdk/mcp-server Checked 1 day ago Published 3 days ago

MCP server exposing @pqc-sdk/core post-quantum cryptographic operations as agent tools

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

pqc_keygen

Generate a post-quantum key pair and store it in the server keystore. Returns its keyId and publicToken (safe to share). The secret key never leaves the server. Use x-wing or ml-kem-768 for encryption, ml-dsa-65 for signatures.

ParameterTypeDescription
algorithmstringAlgorithm to use. Default: x-wing.

pqc_list_keys

List the keys in the server keystore: keyId, algorithm and publicToken for each. Secret keys are never returned.

pqc_encrypt

Encrypt data for a recipient using their public key token. Only the holder of the matching secret key can decrypt. Pass exactly one of plaintext (UTF-8 text) or plaintextBase64 (binary data). Quantum-resistant.

ParameterTypeDescription
publicToken *stringRecipient's public key token (pqcv1.*.public.*).
plaintextstringText to encrypt (UTF-8).
plaintextBase64stringBinary data to encrypt, base64-encoded.

pqc_decrypt

Decrypt a ciphertext with a key from the server keystore. Returns { encoding: "utf8", plaintext } when the data is valid UTF-8, otherwise { encoding: "base64", plaintextBase64 }. Returns isError with DECRYPTION_FAILED if the ciphertext was tampered with or encrypted for a different key.

ParameterTypeDescription
ciphertextHex *stringHex-encoded ciphertext from pqc_encrypt.
keyId *stringId of a key in the server keystore, as returned by pqc_keygen or pqc_list_keys.

pqc_verify

Verify an ML-DSA signature. Returns { verified: true } if genuine, { verified: false } if tampered, wrong key, or wrong message.

ParameterTypeDescription
message *stringOriginal message that was signed.
publicToken *stringSigner's ML-DSA public key token.
signatureHex *stringHex-encoded signature from pqc_sign.

pqc_algorithms

List all supported algorithms and the FIPS-standardized subset. Use this before pqc_keygen to pick the right algorithm.