Skip to main content
Glama
crypto-inventory-mcp

crypto-inventory-mcp

crypto-inventory-mcp

Turn a published rule into a check any AI agent can run, keep a human on the decision, and produce evidence in a standard format.

The first rule-set is encryption. The tool reads a codebase, finds where encryption is used, rates each finding against published NIST, UK NCSC and IETF guidance, and writes:

  • a plain-English report with a human sign-off table (owner, decision, date), and

  • a CBOM (Cryptography Bill of Materials) in the open CycloneDX 1.6 format, checked against the official schema in the tests.

It runs as an MCP server, so any MCP-compatible agent can call it.

How it works

Why

  • The UK NCSC asks organisations to carry out a full discovery exercise of what depends on cryptography by 2028 (timelines).

  • NIST deprecates quantum-vulnerable public-key algorithms (RSA, ECDSA, EdDSA, DH, ECDH) after 2030 and disallows them after 2035 (NIST IR 8547).

  • More broadly, agent projects stall on governance: controls, evidence and accountable sign-off. This repo is a small, working example of all three.

Related MCP server: qrp-mcp

Ratings

Rating

Examples

Source

Already weak today

MD5, SHA-1, RC4, Triple DES

RFC 6151, NIST SHA-1 transition, RFC 7465, NIST SP 800-131A Rev. 2

At risk from future quantum computers

RSA, DSA, ECDSA, EdDSA, DH, ECDH, X25519

NIST IR 8547 (Oct 2026)

Hybrid (classic + post-quantum)

X25519MLKEM768, mlkem768x25519

FIPS 203; NCSC: an interim measure

Quantum-safe, on watch

ML-KEM, ML-DSA

FIPS 203/204; published research (Nov 2026) lowered long-term confidence in structured lattices

Quantum-safe

SLH-DSA

FIPS 205

Not significantly affected

AES, ChaCha20, SHA-2, SHA-3

NCSC, Next steps in preparing for PQC

Every rating links to its source in rules.py. No rating exists without one.

Quick start

pip install -r requirements.txt
python3 scanner.py path/to/code --out out     # report + CBOM + findings
python3 -m pytest -q                          # 14 tests

Example outputs from two public open-source libraries are in examples/.

Example scan

Use from an agent (MCP)

QI_ALLOWED_ROOT=path/to/code python3 server.py   # MCP over stdio

Tools: scan_folder, get_report, get_cbom, explain_rating. Runs locally over stdio; a cloud agent platform would need it hosted over HTTP first.

Safety by design

  • Read-only. Reads files as text; never runs or changes code.

  • Fenced. The MCP server only scans inside one allowed folder, resolves links before checking, and never follows linked files out of it.

  • No secrets in output. Long key-like strings are masked in the findings file; a private key stored in code raises its own warning.

Limits

It matches algorithm names in code and config. It does not check key sizes, follow how code uses an algorithm, or see running systems, cloud key stores or compiled programs. Whole comment lines are skipped; a comment at the end of a code line is still read. Every finding needs a person to confirm it: that is what the sign-off table is for.

Licence

MIT. See LICENSE.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • 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
      17
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      A local cryptographic inventory for developers and AI agents that carries verifiable coverage and its own limits inside the CBOM.
      6
      1,976 PyPI
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP-compatible AI agents to scan code for leaked secrets, copyleft licenses, unprotected routes, missing privacy policies, and risky card handling before committing or shipping.
      MIT