
pqc-scan
io.github.microtoll由 GitHub 账号 microtoll 发布v0.3.3更新于 Oct 24, 2026
The cryptography a JavaScript or TypeScript codebase uses, and which a quantum computer would break.
发布方自己的服务:scan.mx Email Diagnostics
概览
一个本地 MCP 服务器,扫描 JavaScript 或 TypeScript 代码库,报告其中使用的密码学算法以及哪些会被量子计算机攻破。
- 可以做什么
- 扫描指定文件夹,返回精简的 JSON 摘要:统计数量、按算法分组并附文件和行号的待复核用法(最紧急的在前),以及其他按算法计数的用法。可请求完整 JSON 报告而非摘要。可用排除项和测试文件选项缩小扫描范围。
- 适用场景
- 适合让编码代理检查它刚写下的密码学代码,或快速获得 JS/TS 项目的后量子就绪清单及迁移优先级。它只是清单和线索,不是合规证明。
- 运行要求
- 通过 npx 从 npm 包以 stdio 在本地运行;需要 Node.js 20 或更高版本。无需账户、API 密钥、配置或网络连接。扫描文件夹以绝对路径或相对于宿主启动服务器位置的路径给出。
安装
在 SourceWeft 中
- 打开 控制台中的 pqc-scan,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
pqc-scan
An inventory of the cryptography a JavaScript or TypeScript codebase uses, and which of it a large quantum computer would break.
An inventory and pointers, not a compliance certificate.
pqc-scan reads your source files, your package.json and lockfile, and
any TLS (Transport Layer Security) configuration written down in the tree.
It writes a report of every cryptographic algorithm it finds: through which
interface (Web Crypto, node:crypto, a library), with what key size where
the code says, where in the code, and a migration priority for each use a
quantum computer would break. The report follows the discovery exercise the
UK National Cyber Security Centre (NCSC) asks for in its post-quantum
migration timeline: discovery and a plan by 2028, the highest-priority
migrations by 2031, the rest by 2035.
It only reads. It runs nothing it scans, reads no environment variables, sends nothing anywhere, and has no telemetry. Zero dependencies; Node 20 or later. Free, and the command line stays free: a hosted report (trends over time, an organisation-wide view) may exist later, and would read the same JSON file; nothing of it is built.
Install
pqc-scan is a command-line tool. You need two things on your computer:
- Node.js 20 or later. Check with
node --versionin a terminal (Command Prompt, PowerShell or Windows Terminal on Windows; Terminal on macOS or Linux). If the command is not found, or prints a version below 20, install the current "LTS" release from https://nodejs.org. On Windows the installer is a normal.msi; accept the defaults, then open a new terminal window so it picks up the change. - The scanner. The quickest way needs nothing more than Node.js: run
it straight from the npm registry, downloading nothing by hand:
or install it once and call it as
pqc-scanfrom anywhere: If you would rather read the code first, or work without the registry, take it from this repository in one of two ways:- Download: on the repository page, Code → Download ZIP, then unzip
it somewhere convenient, for example
C:\Tools\pqc-scanon Windows or~/tools/pqc-scanelsewhere. - Clone, if you have git:
- Download: on the repository page, Code → Download ZIP, then unzip
it somewhere convenient, for example
There is nothing else to install: the scanner has no dependencies, so there
is no npm install step inside it, and it needs no configuration, no
account and no network connection to run.
Run it
Point it at the folder that holds your application's code (the one with its
package.json).
On Windows (PowerShell or Command Prompt), with the scanner unzipped at
C:\Tools\pqc-scan and your app at C:\Code\my-app:
On macOS or Linux:
It prints a short summary and writes two files into the folder you are
standing in: pqc-scan.md, the report to read, and pqc-scan.json, the
same for other tools. The summary tells you both paths:
Open pqc-scan.md in any editor or Markdown viewer (Visual Studio Code
shows it with Ctrl+Shift+V). Start with section 1, the summary, then
section 3, the priorities, where each High or Medium says which line of your
code it points at and why.
To put the reports somewhere else, name the files: --md C:\Reports\app.md
and, if you want it, --json C:\Reports\app.json. If your tests are not in
folders called test, tests, spec or __tests__, tell the scanner what
their names contain, so the report can say how much of what it found is test
code: --test-files self-check, repeatable.
A scan of a medium-sized application takes a few seconds. If you are in the
scanner's own folder, . means "this folder", and --help prints every
option:
Things that catch people out:
- "node is not recognized" on Windows: Node.js is not installed, or the terminal was opened before the installer ran. Install it, then open a new terminal.
- A path with spaces needs quotes:
"C:\My Projects\app". - Nothing found? The scanner reads only JavaScript and TypeScript
(
.js,.mjs,.cjs,.ts,.mts,.cts,.jsx,.tsx), lockfiles and TLS configuration files. Code in other languages is not seen (see "What it cannot see"). - It never changes your files. It reads them and writes only the report files you name.
The full set of options:
In a script or a pipe, with none of --json, --md or --cbom, the
Markdown goes to standard output and nothing is written to disk; at a
terminal pqc-scan.md and pqc-scan.json are written instead (the bill of
materials only when asked for). Exit codes: 0 done, 1 the --fail-on
threshold was met, 2 a usage or read error. The threshold counts
everything in the report, test code included; use --exclude to leave a
directory out.
In GitHub Actions
The action runs the scanner on the workspace, adds the Markdown report to
the job summary, uploads the two reports and the bill of materials as the
pqc-scan artefact, and then, if fail-on is set and met, fails the job.
Its inputs: path, fail-on, exclude (one name per line), json, md,
cbom, job-summary, upload, artifact-name. Its outputs: high,
medium, low, verdict, json, cbom.
It needs Node 20 or later on the runner; GitHub's hosted runners have it.
What it finds
- Web Crypto:
crypto.subtlecalls, with the algorithm read from the nearest literal, including the post-quantum and hybrid names (ML-KEM-768,ML-DSA-65,X25519MLKEM768,MLKEM768-X25519). node:crypto: hashes, HMACs, ciphers, key pairs, signatures, Diffie– Hellman, public-key encryption, PBKDF2, scrypt, HKDF and random numbers.- Libraries: nearly sixty catalogued packages (
tweetnacl,libsodium, the@noblefamily,jose,jsonwebtoken,bcrypt,crypto-js,web-push,openpgp, …), frompackage.json,package-lock.json,yarn.lockandpnpm-lock.yaml, with their calls where the catalogue maps them and JSON Web Token (JWT) algorithm names such asRS256. - TLS: nginx, Apache, Caddy and Node's
tlsandhttpsoptions; whether a hybrid post-quantum key-exchange group is enabled.
A value it cannot read (an algorithm name held in a variable) is reported as dynamic — check by hand, never guessed.
The priorities
Only public-key uses get a priority: a large quantum computer breaks RSA, elliptic-curve and Diffie–Hellman cryptography, but only weakens symmetric ciphers and hashes.
- High: a key agreement or public-key encryption that seals data. Someone can record the ciphertext now and open it later ("harvest now, decrypt later"). Consider a hybrid seal for new data.
- Medium: a signature. It can be forged only once such a computer exists, so the risk is to long-lived signatures. Plan; do not rush.
- Low: a key exchange for a session, including TLS without a hybrid group. The exposure is the session, not the archive.
The priority is a heuristic from the words near the call (seal, encrypt,
store… against session, tls, handshake…). A use with no telling
word is High until a person checks. Every entry says which word decided
it. A person should review each High.
The report
pqc-scan.json: the inventory, described byschema/pqc-scan.schema.json(version 1). Paths are relative, with forward slashes; the scanned directory appears by name only; two scans of the same tree differ only inscannedAt.pqc-scan.md: a summary, the inventory, the priorities with a replacement to consider, notes on symmetric ciphers and hashes (AES-128, SHA-1, MD5, 3DES, ECB mode, weak PBKDF2 iteration counts), dependencies, TLS, next steps in the NCSC's three milestones, and what the scan cannot see.--cbom <file>: the same inventory as a cryptographic bill of materials in the CycloneDX 1.6 format, the shape a central inventory, a supplier questionnaire or a viewer for these files expects.
The cryptographic bill of materials
A CycloneDX 1.6 bill of materials lists each algorithm variant the scan
found as a cryptographic-asset component (AES-256-GCM, ECDH P-256,
ML-KEM-768…) with CycloneDX's own fields where the name settles them
(the primitive, the key size or curve, the mode, the functions used, the
classical and NIST post-quantum security levels) and an occurrence for
every use: the file, the line, the interface and call, and the source line
with its priority. The Web Crypto API, node:crypto and each catalogued
package appear as library components that provide the assets found
through them, with a package URL (pkg:npm/…) and version where the
lockfile says. Each TLS configuration is a protocol asset that references
its key-exchange groups, so X25519 in a server's group list and X25519
in a Web Crypto call are one asset. What CycloneDX has no field for (the
scanner's class and kind, the migration priority and its reason, literal
parameters such as an iteration count, the notes) travels in properties
named microtoll:pqc-scan:*. The bill of materials says nothing the JSON
report does not: it is written from the report alone, its serial number
is worked out from its own contents (two scans of one tree give the same
bill of materials apart from the timestamp and the serial number), and it
keeps the sentence an inventory and pointers, not a
compliance certificate in its metadata. The mapping is in DESIGN.md
§8.14, and every output is checked against the published CycloneDX schema
in the tests.
For coding agents
pqc-scan mcp runs the scanner as a Model Context Protocol (MCP) server
over standard input and output, so a coding agent in Claude Code, Cursor or
any other MCP host can check the cryptography it has just written. Add it
to Claude Code, for every project, with:
Without --scope user, Claude Code registers the server for the folder the
command was run in only. New conversations pick it up; one already open
does not.
Any other host takes the same command (npx -y @microtoll/pqc-scan mcp) as
a stdio server. It offers one tool:
The summary holds the report's counts; each use to review (one with a
priority, one whose algorithm could not be read, or one with a note)
grouped by algorithm and what to do about it, with its files and lines, the
most urgent first; and every other use counted by algorithm. It is what an
agent acts on, and a twentieth the size of the whole report on a typical
application, whose report can pass a host's limit on a tool result (Claude
Code's is about 25,000 tokens). For the full report of a large codebase,
scan the folder you changed, or use exclude.
The tool reads files only: it writes no report file and runs nothing it
scans, and the scanner sends nothing anywhere. Its result goes back to the
host that asked for it, and from there into the agent's context, which
usually reaches the agent's model provider; the full report carries the
source lines it found as evidence, lines the agent could already read; the
summary carries files and line numbers only. To scan a folder that is itself named
mcp, run pqc-scan ./mcp. The details are in DESIGN.md §8.15.
The tool tells the host the same through the specification's behaviour
hints (annotations): read-only, destroys nothing, safe to call again, no
network. It also has a plain title, "List the cryptography a codebase
uses". A host may use these to decide when to ask the person before a call
(DESIGN.md §8.17).
What it cannot see
- Anything that is not JavaScript, TypeScript, a lockfile or a TLS configuration file: other languages, binaries, the operating system, a cloud key service, anything behind a network call.
- Which files actually run. A library imported only by a file your service never loads is still reported.
- A framework's own cryptography, unless the framework is in the catalogue.
- Values that are not written down where it looks: it follows a
constin the same block, or one hop to a relative import (not an import by a workspace package's name), and nothing else. A function parameter that shadows a module-level constant of the same name is the one known way this can mislead. - Evidence is copied as written. A secret on the same line as a cryptographic call will appear in the report. Treat the report like the code it describes.
Develop
node:test, no framework, no dependencies. Every false positive found
becomes a fixture under test/fixtures/ and a line in a test. The design
and every settled detail are in DESIGN.md; security reports
go by SECURITY.md.
How it was built, and support
The scanner was written with Claude Code (Anthropic's coding agent) working
from a design written and decided by the founder, who read and accepted
every change. The checks are what you can read here: the design, the
fixtures of real code shapes, the tests, and the hand reviews of real
repositories recorded in DESIGN.md §8. Every false positive those reviews
found became a test.
The command line is free and stays free. If it saves you time, you can sponsor the work on GitHub.
Licence
Apache-2.0. See LICENSE.
来源:README.md,提交 33bfc6e
工具
0版本历史
3- v0.3.3最新Oct 6, 2026
- v0.3.2Oct 2, 2026
- v0.3.1Sep 30, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Scan 集成
scan.mx Email Diagnostics
mx.scan官方发布者
远程 MCP 服务器,让助手对域名执行带评级的邮件送达率与 DNS 检查,涵盖 MX、SPF、DKIM、DMARC、黑名单等。

GreenOps Scan
由 GitHub 账号 spidgorny 发布
本地 CLI 扫描工具,检查 AWS 账户中闲置或过度配置的资源,并报告预计节省的金额与碳排放。
Psyseal scan
由 GitHub 账号 psyseal 发布
本地只读 MCP 服务器,扫描电脑上的 AI 智能体目录,找出明文密钥泄露、心跳开销以及被植入或臃肿的记忆。
MTG Trade Scan
fr.mtg-trade
扫描万智牌卡册照片:上传页面图片并生成扫描任务,每天有免费页数,超出后按页付费。

mcp-guard
由 GitHub 账号 diegoperezg7 发布
面向 MCP 服务器的安全扫描器,检查工具投毒、工具遮蔽、权限过大、密钥泄露和传输层缺陷。