Skip to main content
Glama

ecfr-mcp

eCFR(电子联邦法规)API 的 MCP 服务器。无需身份验证即可读取 FAR、DFARS 及所有机构 FAR 补充文本。

适用于任何兼容 MCP 的客户端(Claude Desktop、Claude Code、Cursor、Cline、Continue、Zed 等)。

经过五轮针对实时 eCFR API 的集成测试,已进行加固。包含 101 个回归测试,涵盖了 2 个 P0 级灾难性错误、26 个 P1 级静默错误数据错误以及 32 个 P2 级验证漏洞的修复。完整测试记录请参阅 TESTING.md

功能介绍

将 eCFR API 封装为 13 个 MCP 工具,涵盖法规文本、结构、搜索、版本历史及常见采购工作流:

核心端点

  • get_latest_date - 获取 CFR 标题的最新可用日期(在调用其他工具前使用)

  • get_cfr_content - 获取章节、子部分或部分的解析法规文本

  • get_cfr_structure - 层级目录结构

  • get_version_history - 章节或部分的修订历史

  • get_ancestry - 面包屑层级路径

  • search_cfr - 带有层级过滤器的全文搜索

  • list_agencies - 所有机构及其 CFR 引用

  • get_corrections - 标题的编辑更正

工作流便利工具

  • lookup_far_clause - 一键查询 FAR/DFARS 条款文本(自动解析日期)

  • compare_versions - 两个日期之间的文本并排对比

  • list_sections_in_part - FAR/DFARS 部分中的所有章节

  • find_far_definition - 在 FAR 2.101 中搜索术语定义

  • find_recent_changes - 自给定日期以来修改的章节

Related MCP server: regulationsgov-mcp

无需身份验证

eCFR API 完全公开。无需 API 密钥、无需注册、无需身份验证标头。安装即可使用。

安装

通过 uvx(推荐)

uvx ecfr-mcp

通过 pip

pip install ecfr-mcp

从源码安装

git clone https://github.com/1102tools/federal-contracting-mcps.git
cd federal-contracting-mcps/servers/ecfr-mcp
pip install -e .

Claude Desktop 配置

添加到 ~/Library/Application Support/Claude/claude_desktop_config.json

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

重启 Claude Desktop。ecfr 服务器将出现在您的 MCP 工具面板中,包含 13 个工具。

提示词示例

  • “获取 FAR 15.305(建议评估)的当前文本并总结其要求。”

  • “列出 FAR 第 19 部分(小企业计划)中的所有章节。”

  • “在 2.101 中查找 FAR 对‘商业产品’的定义。”

  • “过去 6 个月内修改了哪些 FAR 章节?”

  • “对比 2024-01-01 和 2025-01-01 之间的 FAR 52.212-4,并向我展示更改内容。”

  • “获取 DFARS 252.227-7014(非商业计算机软件权利)的当前文本。”

  • “在第 48 卷中搜索‘组织利益冲突’并向我展示相关章节。”

  • “哪个机构拥有第 48 卷的第 8 章?获取其 FAR 补充结构。”

设计说明

  • 服务端 XML 解析。 eCFR 内容端点返回原始 XML。此服务器在返回给 Claude 之前将其解析为清晰的文本(标题、段落、引用),从而节省了大量的上下文 Token。

  • 自动日期解析。 eCFR 比《联邦公报》滞后 1-2 个工作日。在版本端点上使用今天的日期会导致 404 错误。除非您指定日期,否则所有内容工具都会自动解析为最新的可用日期。

  • 搜索默认为当前文本。 如果没有 date=current,eCFR 搜索会返回所有历史版本,包括已废弃的版本。默认的 current_only=True 可防止重复结果。

  • 结构端点限制。 eCFR 结构端点不支持章节级过滤(会返回 400)。list_sections_in_part 通过获取部分结构并遍历树来解决此问题。

  • FAR 2.101 优化。 定义部分约为 109KB 的 XML。find_far_definition 在服务端解析整个部分,仅返回带有上下文的匹配段落。

CFR 第 48 卷快速参考

章节

法规

部分

1

FAR

1-99

2

DFARS

200-299

3

HHSAR

300-399

4

AGAR

400-499

5

GSAR

500-599

6

DOSAR

600-699

7

AIDAR

700-799

8

VAAR

800-899

9

DEAR

900-999

18

NFS

1800-1899

数据来源

所有数据来自 ecfr.gov,这是由联邦公报办公室维护的持续更新的在线联邦法规。每日更新,通常在《联邦公报》发布后 1-2 个工作日内更新。这不是官方法律版本;如需官方引用,请参考 GPO 的年度 CFR。

配套技能

此 MCP 镜像了来自 1102tools.comecfr-api 技能。该技能基于 Markdown,用于 Claude 的交互式使用;MCP 将相同的 API 封装为确定性工具调用,用于代理工作流和自动化。

许可证

MIT

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
6dResponse time
3dRelease cycle
34Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Federal procurement intelligence toolkit that searches SAM.gov contract opportunities, analyzes agency spending patterns, tracks competitor wins, and monitors small business set-aside programs (8a, HUBZone, SDVOSB, WOSB). 4 tools using SAM.gov and USASpending.gov data.
    2
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables interaction with the Regulations.gov API to search federal rulemaking dockets, proposed and final rules, public comments, and comment periods. Supports tracking FAR/DFARS case histories and monitoring open comment periods across federal agencies with optional API key authentication for higher rate limits.
  • A
    license
    A
    quality
    A
    maintenance
    The most comprehensive keyless federal-data MCP server. 36 tools for SAM.gov + USAspending + Federal Register + eCFR + Grants.gov. No API key, no registration, no signup. Works in Claude Desktop, Claude Code, Codex CLI, Cursor, Continue, Gemini CLI, and any MCP-aware host.
    30
    100
    142
    5
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    GovToolsPro MCP Server — an MCP server that gives Claude and other AI clients workflow tools for US federal contractors: go/no-go scoring, incumbent intelligence (USAspending + FPDS), teaming-partner search, recompete prediction, Navy NECO lookup, and SAM.gov solicitation retrieval. It returns synthesized decisions rather than raw data, so contractors and capture teams can triage opportunities d
    10
    51
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • SAM.gov contracts and USAspending awards. 4 procurement tools.

  • Search and trace US federal rules across the Federal Register, eCFR, and Regulations.gov.

  • 55 tools for federal/state/local RFPs, awards, vendors, contact graph, contract vehicles, pursuits.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/1102tools/federal-contracting-mcps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server