Skip to main content
Glama
pqblocks-mcp

pqblocks-mcp

Official
by PQBlocks

pqblocks-mcp

An MCP server that tells AI coding agents which PQBlocks package to use, with install lines and quickstarts verified to run. Use it in Claude Code, Claude Desktop, Cursor, VS Code or any Model Context Protocol client when you add or migrate post-quantum cryptography, audit code for RSA and ECC, or pick a quantum-inspired solver. Implements the Model Context Protocol over stdio (protocol versions 2024-11-05, 2025-03-26 and 2025-06-18).

claude mcp add pqblocks -- uvx --from git+https://github.com/PQBlocks/pqblocks-mcp pqblocks-mcp

CI Runtime dependencies Python Licence M8ven Score Docs

Why PQBlocks MCP

Ask an assistant to "add post-quantum encryption" and it will often invent a function name. This server answers from a catalog generated from the PQBlocks packages themselves, in which every quickstart was executed against its package before it was written. The agent gets a real package, the install line that works today and code that runs.

flowchart LR
    A["Agent: 'sign JWTs with ML-DSA'"] -->|recommend_package| S[pqblocks-mcp]
    S --> C[(catalog.json<br/>every package<br/>quickstarts executed)]
    S -->|package · install · import · quickstart · docs| A
    A -->|get_snippet / check_config| S

Related MCP server: Apiiro Guardian Agent MCP Server

Install

Client

Configuration

Claude Code

claude mcp add pqblocks -- uvx --from git+https://github.com/PQBlocks/pqblocks-mcp pqblocks-mcp

Claude Desktop

claude_desktop_config.json → "pqblocks": {"command": "uvx", "args": ["--from", "git+https://github.com/PQBlocks/pqblocks-mcp", "pqblocks-mcp"]} under mcpServers

Cursor

.cursor/mcp.json → same entry under mcpServers

VS Code

.vscode/mcp.json → "pqblocks": {"type": "stdio", "command": "uvx", "args": ["--from", "git+https://github.com/PQBlocks/pqblocks-mcp", "pqblocks-mcp"]} under servers

Any client, with pip

pip install git+https://github.com/PQBlocks/pqblocks-mcp, then run pqblocks-mcp

The server has no runtime dependencies: it speaks MCP over stdio with its own small JSON-RPC implementation. Install the sdk extra (pqblocks-mcp[sdk]) to use the official MCP Python SDK transport instead.

Usage

Tools

Tool

Input

Returns

recommend_package

task_description

Best package, why, install, import, executed quickstart, docs, alternatives

get_snippet

package (full or short name), framework (optional)

Install, import, executed quickstart, example scripts, evidence documents, warnings

check_config

code_or_config

Line-numbered findings: RSA, ECDSA, ECDH / NIST curves, DH, DSA, lone X25519 / Ed25519, MD5, SHA-1, 3DES, AES-128, with replacements and packages

list_packages

category (optional area)

All packages with area, version, status, install line

From Python

The tools are plain functions too:

from pqblocks_mcp.server import check_config, recommend_package

print(recommend_package("find RSA usage in my repo")["recommended_package"])   # pqblocks-scan
for f in check_config('key = rsa.generate_private_key(key_size=2048)')["findings"]:
    print(f["line"], f["algorithm"], "->", f["replace_with"])

API reference

Function

Signature

recommend_package

(task_description: str) -> dict

get_snippet

(package: str, framework: str = "python") -> dict

check_config

(code_or_config: str) -> dict

list_packages

(category: str | None = None) -> list[dict]

main

Console entry point pqblocks-mcp; --stdio-fallback forces the built-in transport

Security notes

  • The server reads only its bundled catalog. It makes no network calls and executes no code it receives.

  • check_config is a pattern match on algorithm names. It cannot see algorithms chosen at runtime or hidden behind library defaults, and it says so in every response. Use pqblocks-scan for a whole repository.

  • Recommendations point to pre-1.0 packages that are not FIPS 140-3 / CMVP validated or externally audited; each package's SECURITY_NOTES.md has the details.

Verification

  • tests/test_server.py checks that every catalog entry is verified and parses, that 22 realistic tasks route to the right package, that a package is never recommended for something its README says it does not do, that the config checker has no false positives on hybrid names, and the full stdio protocol (initialize, notifications, tools/list, tools/call, errors, ping).

  • The catalog is built in the pqblocks.github.io repository, which runs every quickstart, and synced here every six hours by .github/workflows/sync-catalog.yml after the tests pass. New packages appear without a code change.

pip install -e ".[test]" && pytest -q

Part of PQBlocks, a QubitRock project

PQBlocks builds verified building blocks for the post-quantum era. See also pqblocks-skills (Claude skill, Cursor rule, AGENTS.md) and the package catalog. Licensed under Apache-2.0.

Available Tools

4 tools
check_configA

Scan pasted code or config for quantum-vulnerable public-key algorithms (RSA, ECDSA, ECDH, DH, DSA, lone X25519/Ed25519) and classically weak ones (MD5, SHA-1, 3DES, AES-128); returns line-numbered findings, replacements and matching packages.

Inputs: code_or_config (required).

get_snippetB

Install line, import name and the README quickstart for one PQBlocks package. Every quickstart was executed against the package source when the catalog was built; use it as-is rather than guessing an API.

Inputs: package (required), framework.

list_packagesA

List every PQBlocks package with area, status, version and the install line that works today. Optional category filter: 'PQ cryptography', 'Migration & readiness', 'Interoperability', 'Conformance', 'Quantum-inspired'.

Inputs: category.

recommend_packageA

Pick the PQBlocks package for a task described in plain words (e.g. 'sign JWTs with ML-DSA', 'find RSA in my repo', 'solve a QUBO'). Returns the package, why, its install line, a quickstart verified to run, docs links and alternatives.

Inputs: task_description (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool has a distinct role: list_packages browses the catalog, recommend_package maps a task to a package, get_snippet returns details for a known package, and check_config scans user code. The only real overlap is that recommend_package also returns install lines and quickstarts, so an agent might sometimes skip get_snippet, but the descriptions make the task-driven vs package-specific split clear.

    Naming Consistency5/5

    All four tools follow a clean verb_noun snake_case pattern (recommend_package, get_snippet, check_config, list_packages). No mixed conventions or vague verbs.

    Tool Count4/5

    Four tools is slightly lean but each maps to a distinct step in the workflow: discover, choose, inspect, and audit. Nothing feels redundant or missing for a package catalog server.

    Completeness4/5

    The surface covers the key lifecycle: listing packages, recommending one for a task, retrieving its quickstart, and auditing existing code for vulnerable algorithms. Gaps are minor, e.g. no dedicated search-by-keyword or version/detail lookup beyond what list_packages and get_snippet provide.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI coding assistants to leverage Application Security Posture Management (ASPM) capabilities, allowing developers to write secure code, query security risks, trigger diff scans, and manage security findings directly from their AI assistant.
      5
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Post-quantum readiness for AI coding agents: scans code for quantum-vulnerable cryptography (RSA/ECDH/ECDSA/DH) and returns NIST ML-KEM/ML-DSA/SLH-DSA (and hybrid) migration guidance, with fix verification and dependency checks. Content-based, advisory tools only; runs local (npx @quantakrypto/mcp) or as a hosted OAuth endpoint.
      16
      16
      Apache 2.0