MCP Hub
Back to servers

Post-Quantum Cryptography MCP Server

A specialized MCP server providing NIST-standardized post-quantum cryptographic operations (ML-KEM, ML-DSA, SPHINCS+) via the liboqs library to enable quantum-resistant security analysis and development.

Tools
9
Updated
Jan 8, 2026
Validated
Jan 9, 2026

Post-Quantum Cryptography MCP Server

License: MIT Python 3.10+ liboqs MCP

A Model Context Protocol (MCP) server that provides post-quantum cryptographic operations using Open Quantum Safe's liboqs. Enables AI assistants like Claude to perform quantum-resistant cryptographic operations including key generation, encryption, signing, and verification.

Why Post-Quantum Cryptography?

Current cryptographic systems (RSA, ECC, ECDSA) will be broken by quantum computers running Shor's algorithm. NIST has standardized new quantum-resistant algorithms:

StandardAlgorithmTypeStatus
FIPS 203ML-KEM (Kyber)Key EncapsulationFinalized 2024
FIPS 204ML-DSA (Dilithium)Digital SignatureFinalized 2024
FIPS 205SLH-DSA (SPHINCS+)Hash-based SignatureFinalized 2024

This MCP server makes these algorithms accessible to AI agents for research, development, and integration.

Features

  • 32 Key Encapsulation Mechanisms (KEMs): ML-KEM, FrodoKEM, HQC, BIKE, Classic McEliece
  • 221 Signature Algorithms: ML-DSA, Falcon, SPHINCS+, MAYO, CROSS, UOV
  • Full MCP Integration: Works with Claude Desktop, Claude Code, Cursor, and any MCP client
  • NIST Standards Compliant: Implements FIPS 203, 204, and 205 algorithms
  • Security Analysis: Compare classical vs quantum security levels

Quick Start

Prerequisites

  • Python 3.10+
  • liboqs shared library
  • uv (recommended) or pip

Installation

1. Install liboqs

macOS (Homebrew with shared library):

# Homebrew only provides static library, build from source for shared:
git clone --depth 1 --branch 0.15.0 https://github.com/open-quantum-safe/liboqs.git
cd liboqs && mkdir build && cd build
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
make -j4 && make install

Ubuntu/Debian:

sudo apt-get install liboqs-dev

2. Clone and Install

git clone https://github.com/scottdhughes/post-quantum-mcp.git
cd post-quantum-mcp

# Create virtual environment with Python 3.10+
uv venv --python 3.10 .venv
source .venv/bin/activate

# Install dependencies
uv pip install liboqs-python "mcp>=1.0.0"

3. Configure Claude Code / Claude Desktop

Add to your MCP configuration:

Claude Code (~/.claude.json):

{
  "mcpServers": {
    "pqc": {
      "type": "stdio",
      "command": "/path/to/post-quantum-mcp/run.sh",
      "args": [],
      "env": {}
    }
  }
}

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "pqc": {
      "command": "/path/to/post-quantum-mcp/run.sh"
    }
  }
}

Available Tools

pqc_list_algorithms

List all available post-quantum algorithms.

Input: { "type": "kem" | "sig" | "all" }
Output: List of available algorithms with NIST standard mappings

pqc_algorithm_info

Get detailed information about a specific algorithm.

Input: { "algorithm": "ML-KEM-768" }
Output: Key sizes, security level, performance characteristics

pqc_generate_keypair

Generate a quantum-resistant key pair.

Input: { "algorithm": "ML-DSA-65" }
Output: Base64-encoded public and secret keys

pqc_encapsulate

Perform key encapsulation (create shared secret).

Input: { "algorithm": "ML-KEM-768", "public_key": "<base64>" }
Output: Ciphertext and shared secret

pqc_decapsulate

Recover shared secret from ciphertext.

Input: { "algorithm": "ML-KEM-768", "secret_key": "<base64>", "ciphertext": "<base64>" }
Output: Shared secret

pqc_sign

Sign a message with a post-quantum signature.

Input: { "algorithm": "ML-DSA-65", "secret_key": "<base64>", "message": "Hello, quantum world!" }
Output: Base64-encoded signature

pqc_verify

Verify a post-quantum signature.

Input: { "algorithm": "ML-DSA-65", "public_key": "<base64>", "message": "...", "signature": "<base64>" }
Output: { "valid": true/false }

pqc_hash_to_curve

Hash a message using quantum-safe hash functions.

Input: { "message": "data", "algorithm": "SHA3-256" | "SHA3-512" | "SHAKE128" | "SHAKE256" }
Output: Digest in hex and base64

pqc_security_analysis

Analyze security properties of an algorithm.

Input: { "algorithm": "ML-KEM-768" }
Output: NIST level, classical/quantum security equivalents, Grover/Shor resistance

Supported Algorithms

Key Encapsulation Mechanisms (KEMs)

AlgorithmNIST LevelPublic KeyCiphertextShared Secret
ML-KEM-5121800 B768 B32 B
ML-KEM-76831,184 B1,088 B32 B
ML-KEM-102451,568 B1,568 B32 B
FrodoKEM-64019,616 B9,720 B16 B
HQC-12812,249 B4,481 B64 B

Digital Signatures

AlgorithmNIST LevelPublic KeySignatureNotes
ML-DSA-4421,312 B2,420 BBalanced
ML-DSA-6531,952 B3,309 BRecommended
ML-DSA-8752,592 B4,627 BHigh security
Falcon-5121897 B653 BSmallest sigs
Falcon-102451,793 B1,280 BCompact
SPHINCS+-SHA2-128f132 B17,088 BStateless, hash-based
SPHINCS+-SHA2-256f564 B49,856 BMaximum security

Example Usage with Claude

Once configured, you can ask Claude:

"Generate an ML-KEM-768 keypair and show me the security analysis"

"Sign the message 'Hello quantum world' using ML-DSA-65 and verify it"

"Compare the signature sizes of Falcon-512 vs SPHINCS+-SHA2-128f"

"What's the quantum security level of ML-KEM-1024?"

Architecture

post-quantum-mcp/
├── pqc_mcp_server/
│   ├── __init__.py      # Main MCP server implementation
│   └── __main__.py      # Entry point
├── run.sh               # Wrapper script (sets DYLD_LIBRARY_PATH)
├── pyproject.toml       # Package configuration
└── README.md

Security Considerations

  • Key Storage: This server generates keys in memory. For production use, implement secure key storage.
  • Side Channels: liboqs implementations aim to be constant-time but may not be suitable for all threat models.
  • Algorithm Selection: ML-KEM and ML-DSA are NIST-approved. Other algorithms are experimental.
  • Version Compatibility: Ensure liboqs version matches liboqs-python expectations.

Development

# Run tests
python -m pytest tests/

# Format code
python -m black pqc_mcp_server/

# Type checking
python -m mypy pqc_mcp_server/

Related Projects

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

Acknowledgments

Reviews

No reviews yet

Sign in to write a review