US Code of Federal Regulations

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

Look up, search, and track changes to the US Code of Federal Regulations (eCFR).

发布方自己的服务:Regulations.ai — Global AI Law Tracker

概览

AI 生成的概览

本地 MCP 服务器,让助手查询、检索并追踪美国联邦法规(eCFR)并给出引注。

可以做什么
  • 查询某条法规引注的原文,包括部分与分部层级
  • 全文检索法规,并查看哪些篇目包含某术语及命中次数
  • 浏览篇目或部分的层级结构,并将机构映射到其主管的篇目
  • 追踪修订历史,以及引发每次变更的联邦公报规则
  • 对比某条引注在两个日期之间的文本差异,并按指定日期读取当时的法规
适用场景
当你需要真实的法规原文和引注而不是听起来合理的猜测时使用,例如确认某条款要求什么,或某部分自某年以来是否修改过。适合美国联邦法规的合规研究、政策问答与文书起草。
运行要求
以 Python 包(cfr-mcp)通过 uvx 在本地以 stdio 运行,需要 Python 3.11 或更高版本。无需 API 密钥,eCFR 与联邦公报 API 是开放的。需要访问这些 API 的网络,并在 ~/.cache/cfr-mcp 下写入磁盘缓存,可用 CFR_MCP_CACHE_DIR 更改位置。
安装前请注意
非官方社区项目,与联邦公报办公室、NARA 或 GPO 无关联,由个人按现状维护。eCFR 文本具有权威性但非官方,用于法律研究时应与官方 CFR、每日联邦公报及 LSA 核对。它只返回法规文本,不构成法律意见,也不包含通过引用并入的私人标准。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

cfr-mcp

[CI] [PyPI]

An MCP server that gives AI assistants access to the US Code of Federal Regulations.

Ask "what does 21 CFR 101.9 require?" or "has 40 CFR 261 changed since 2023?" and get the actual regulation text, with citations, instead of a plausible-sounding guess.

Unofficial community project. Not affiliated with or endorsed by the Office of the Federal Register, NARA, or GPO, and uses no government seals or logos.

Maintained by one person as a personal project and provided as-is (MIT). Issues and pull requests are welcome but may not get a quick response. To report a security issue, see SECURITY.md.

Install

Requires Python 3.11+. No API key — the eCFR and Federal Register APIs are open.

Claude Code:

bash
claude mcp add cfr -- uvx cfr-mcp

Any other MCP client:

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

Tools

ToolWhat it does
lookup_citationText of a citation — 21 CFR 101.9, 40 CFR 261.4(b)(1), 40 CFR Part 261 Subpart C
search_regulationsFull-text search; returns citations and snippets, never bodies
where_does_term_appearWhich titles contain a term, with hit counts. Fetches no text
browse_structureThe hierarchy of a title or part, no text
what_changedAmendment history for a citation, linking each change to the Federal Register rule that caused it, plus published corrections
compare_versionsDiff of a citation's text between two dates — see exactly what an amendment changed
list_agenciesMaps agency names to the CFR titles they administer

Point-in-time works throughout: pass date as YYYY-MM-DD to read the CFR as it stood.

Design notes

Context budget is the whole game. The eCFR full endpoint returns an entire downloadable XML document for a title-level request. Every tool here caps output and degrades to an outline rather than dumping text into the model's context. Title-level XML requests are refused outright.

Dates must be resolved, not assumed. Versioner routes 404 on dates that aren't valid issue dates for a title, so the client resolves through titles.json first rather than passing today's date blindly.

Caching is courtesy. The eCFR publishes no rate limit and has no key to identify callers politely, so the client caches to disk (historical dates forever, since point-in-time content is immutable) and self-limits concurrency. The cache lives in ~/.cache/cfr-mcp (respects XDG_CACHE_HOME); set CFR_MCP_CACHE_DIR to relocate it.

Legal

Regulation text is free to reproduce. 1 CFR 2.6 states that any person may reproduce or republish material appearing in the Federal Register, with no restrictions on what is reproduced, who reproduces it, or where. Federal government works are also outside copyright under 17 U.S.C. §105.

Incorporation by reference. Some CFR sections incorporate private standards (ASTM, NFPA, ASHRAE) whose copyright status after incorporation remains unsettled. The eCFR does not contain the text of those standards and neither does this server — it returns the citation only. Obtain standards from the issuing organization or the Office of the Federal Register reading room.

Status of the text. The eCFR is authoritative but unofficial. Anyone relying on it for legal research should verify against the current official CFR, the daily Federal Register, and the List of CFR Sections Affected (LSA).

Not legal advice. This is a retrieval tool. It returns the text of regulations; it does not tell you whether you are compliant with them.

Development

bash
uv sync --extra devuv run pytest

MIT licensed.

来源:README.md,提交 6a03cc8

工具

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

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

其他 Regulations 集成