Hazmat Cfr Mcp

io.github.andretaki由 GitHub 账号 andretaki 发布v0.3.0更新于 Oct 24, 2026

Complete 49 CFR 172.101 hazmat table lookup with special-provision decoding, cited to eCFR.

已验证STDIO仅桌面知识与记忆商业与电商

概览

AI 生成的概览

本地 MCP 服务器,为助手提供完整的 49 CFR 172.101 危险品表,用于 DOT 危险品查询、分类与校验,并附 eCFR 引用

可以做什么
按 UN/NA 编号或正确运输名称查询危险品条目,返回解码后的符号与特殊规定,并可一次调用获取完整运输要求(标签、包装、船舶积载、标牌、引用)。解析并校验运输描述,检查标签要求、标牌、隔离要求与有限数量资格。将第 7 栏特殊规定和第 8 栏包装引用解码为法规原文。说明某字段或规则所依据的公开 CFR 来源。
适用场景
当助手需要回答危险品运输问题——正确运输名称、危险类别、包装类别、标签、航空限制、船舶积载——并应引用法规而非猜测时适用。面向物流、运输与合规起草工作,不能替代受过训练的危险品从业人员。
运行要求
作为本地 stdio 进程在用户机器上运行,通过 npx 启动 hazmat-cfr-mcp 包(需要 Node.js)。未声明 API 密钥、账户或环境变量;数据集随包提供,并固定到某个日期的 eCFR 快照。
安装前请注意
仅为信息辅助:README 声明其不是法律建议、不是合规认证,也不能替代受过训练的危险品从业人员,运输决策应依据最新 eCFR 核实。数据固定于某一快照,可能落后于后续法规变更。仅做只读查询与校验,不向第三方发送数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Hazmat Cfr Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

hazmat-cfr-mcp

The complete 49 CFR 172.101 Hazardous Materials Table, as an MCP tool for AI agents — every field cited to a pinned eCFR revision.

[CI] [npm] [MCP] [License: MIT]

[hazmat-cfr-mcp demo]

Give Claude, Cursor, Codex, and other MCP clients a DOT hazmat lookup, classification, and validation tool backed by the entire Hazardous Materials Table — not a sample.

Ask an agent:

Can I ship 60 L of acetone on a cargo-only aircraft? What are its label, packing, and special-provision requirements?

It returns the proper shipping name, hazard class, packing group, label codes, packaging references, aircraft limits, vessel stowage, decoded special provisions, and CFR citations — in structured JSON.

Use it two ways:

  • hazmat-cfr-mcp — MCP stdio server for agents
  • hazmat-cfr — local CLI for humans, tests, and scripts

No API keys. No customer data. No carrier contracts. No NMFC. Public CFR only.

What's in the box

  • ~2,700 Hazardous Materials Table entries (49 CFR 172.101) — every UN/NA entry plus Forbidden materials, ingested directly from the official eCFR.
  • Special-provision decoding — all ~420 Column 7 codes (49 CFR 172.102: numeric, A, B, IB, IP, N, R, T, TP, W) expanded into their regulatory text.
  • Legend decoding — Column 1 symbols (+ A D G I W), Column 10A vessel stowage categories, and Columns 8A–8C packaging references resolved to part-173 sections.
  • Pinned to a dated eCFR snapshot so every answer is reproducible and citable to an exact revision.
  • A curated synonym/CAS layer so "IPA", "muriatic acid", or "bleach" resolve — kept clearly separate from regulatory data.

10-second try

bash
npx -y hazmat-cfr-mcp --helpnpx -y hazmat-cfr lookup UN1088          # not in any "sample" — the whole table is herenpx -y hazmat-cfr decode-sp IB2 T8 A3

Why this exists

Foundation models are weak at regulated shipping details. They may know what acetone is, but they should not guess whether a shipping description is complete, what IB2 means, or which CFR field backs a label requirement.

This server gives agents an explicit, cited, complete hazmat tool surface so they answer with the regulation instead of a hallucination.

Accuracy & verification

This is a compliance-adjacent tool, so correctness is enforced by the build, not by hope:

  • The dataset is generated from the eCFR versioner API and committed to the repo (see docs/data-pipeline.md). It is never hand-edited.
  • The ingest fails if any special-provision code referenced by the table does not resolve in 172.102 (documented source errata, e.g. IP16, are resolved to an explicit "referenced but not defined" note — never fabricated).
  • test/data-integrity.test.ts re-checks entry counts, structural validity, referential integrity, and ~22 hand-verified spot-checks on every run.
  • The parsers are unit-tested against fixtures in test/fixtures/.

⚠️ Disclaimer. This is an informational aid that surfaces public CFR text. It is not legal advice, not a compliance certification, and not a substitute for a trained hazmat employee. Always verify any shipping decision against the current eCFR.

Install and run

bash
npx hazmat-cfr-mcp            # MCP stdio servernpx hazmat-cfr lookup UN1090  # CLI

From a clone:

bash
git clone https://github.com/andretaki/hazmat-cfr-mcp.gitcd hazmat-cfr-mcpnpm installnpm run buildnpm run demo

CLI:

bash
npx hazmat-cfr lookup UN1090npx hazmat-cfr requirements UN1830          # everything to ship it, in one callnpx hazmat-cfr placard 2.3npx hazmat-cfr validate "UN1090, Acetone, 3, PG II"npx hazmat-cfr segregation 3 5.1 8npx hazmat-cfr lq 3 II 1000 12 truenpx hazmat-cfr decode-sp IB2 T8 A3npx hazmat-cfr decode-pkg nonBulk 202

MCP client config

json
{  "mcpServers": {    "hazmat-cfr": {      "command": "npx",      "args": ["hazmat-cfr-mcp"]    }  }}

For a local checkout, point command at node and args at dist/server.js.

Tools

ToolPurpose
lookup_hazmat_entryLook up by UN/NA number or proper shipping name; returns matching entries with decoded symbols and special provisions.
get_shipping_requirementsOne call → everything to ship a material: identity, labels, decoded packaging, special provisions, vessel stowage, placard, and citations.
classify_shipping_descriptionParse free text into structured fields, then validate it.
validate_basic_hazmat_descriptionValidate structured fields against the full 172.101 table.
get_label_requirementsReturn hazard label codes and caveats.
get_placard49 CFR 172.504 placard name + quantity threshold for a hazard class.
check_basic_segregationConservative pairwise segregation findings (49 CFR 177.848 subset).
check_limited_quantity_eligibilityConservative Class 3/Class 8 LQ-candidate screen.
decode_special_provisionExpand Column 7 codes (e.g. IB2, T8, A3) into 49 CFR 172.102 text.
decode_packaging_referenceResolve a Column 8A/8B/8C value to its part-173 section.
explain_cfr_sourceExplain which public CFR source backs a field or rule.

Example call:

json
{ "query": "UN1090" }

Library use

ts
import { defaultCatalog, decodeSpecialProvisions, ECFR_SNAPSHOT_DATE } from "hazmat-cfr-mcp";
const acetone = defaultCatalog.lookup("UN1090");const provisions = decodeSpecialProvisions(acetone.entries[0].specialProvisions);console.log(`Backed by eCFR snapshot ${ECFR_SNAPSHOT_DATE}`);

Refreshing the data

bash
# bump ECFR_SNAPSHOT_DATE in src/data/snapshot.ts, then:npm run ingest -- --freshnpm test

See docs/data-pipeline.md for the full pipeline.

Non-goals

Not legal advice; not a replacement for trained hazmat employees; not a full compliance certification engine; not NMFC classification; not carrier contract/tariff analysis. No private customer data, contract rates, or internal business records belong in this repo.

Safety

bash
npm testnpm run typechecknpm run scan:secrets

Maintainer

Andre Taki — Alliance Chemical — [email protected]

License

MIT — the underlying 49 CFR text is a public-domain work of the U.S. government.

来源:README.md,提交 c733ac6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分