cfr-mcp
This server gives AI assistants access to the U.S. Code of Federal Regulations (CFR), returning actual regulation text and citation-linked history instead of guessed answers.
Look up the full text of a specific CFR citation (e.g., 21 CFR 101.9, 40 CFR 261.4(b)(1), or a whole part/subpart as an outline).
Search regulations across the CFR, returning citations and snippets (not full text) to save context.
Find which titles/chapters/parts contain a term, with hit counts and no text fetched.
Browse the hierarchy of a CFR title or part without pulling regulation text.
See what changed for a citation: amendment dates linked to Federal Register rules, plus published corrections.
Compare versions of a citation's text between two dates to see exactly what an amendment changed.
List federal agencies and map them to the CFR titles/chapters they administer.
Use point-in-time dates (YYYY-MM-DD) to read regulations as they stood on a given day.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cfr-mcp what does 21 CFR 101.9 require?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cfr-mcp
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:
claude mcp add cfr -- uvx cfr-mcpAny other MCP client:
{
"mcpServers": {
"cfr": {
"command": "uvx",
"args": ["cfr-mcp"]
}
}
}Related MCP server: CourtListener MCP Server
Tools
Tool | What it does |
| Text of a citation — |
| Full-text search; returns citations and snippets, never bodies |
| Which titles contain a term, with hit counts. Fetches no text |
| The hierarchy of a title or part, no text |
| Amendment history for a citation, linking each change to the Federal Register rule that caused it, plus published corrections |
| Diff of a citation's text between two dates — see exactly what an amendment changed |
| Maps 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
uv sync --extra dev
uv run pytestMIT licensed.
Available Tools
7 toolsbrowse_structureA
Return the CFR hierarchy for a title (or one part) without any text.
Inputs: title (required), date, part. Returns: result
compare_versionsA
Show how a citation's text differs between two dates, as a diff.
Use what_changed first to find amendment dates worth comparing; pass the day before an amendment as date_a and the amendment date as date_b to see exactly what that rule changed. Both dates must be 2017-01-03 or later.
Inputs: date_a (required), citation (required), date_b, max_chars. Returns: result
list_agenciesA
List federal agencies and the CFR titles/chapters they administer.
Use this to turn a name like "EPA" into the right CFR title before searching.
Inputs: filter. Returns: result
lookup_citationA
Retrieve the text of a specific CFR citation.
Large parts return an outline of their sections instead of full text; follow up with a specific section citation to read it.
Inputs: citation (required), date, max_chars. Returns: result
search_regulationsA
Full-text search across the CFR.
Returns citations, headings and short snippets only — never full text. Follow up with lookup_citation to read anything.
Inputs: query (required), date, limit, title, +1 more. Returns: result
what_changedA
List amendment dates for a citation, plus any published corrections.
Each amendment is cross-linked to the Federal Register rule that caused it, with a URL to the rulemaking (whose preamble explains the why). Follow up with compare_versions to see exactly what text changed.
Inputs: citation (required), since. Returns: result
where_does_term_appearA
Show which titles/chapters/parts contain a term, with hit counts.
Cheap orientation tool: fetches no regulation text at all. Use this before searching when you don't know which part of the CFR governs a topic.
Inputs: query (required), date. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool occupies a distinct niche: search returns snippets, where_does_term_appear gives only hit counts, lookup_citation retrieves full text, browse_structure shows hierarchy, what_changed lists dates, compare_versions shows diffs, and list_agencies maps agencies to titles. The descriptions explicitly cross-reference each other to guide the correct choice.
Most tools follow a clear verb_noun pattern (lookup_citation, search_regulations, browse_structure, compare_versions, list_agencies), but two tools use interrogative phrases (where_does_term_appear, what_changed). This is a minor deviation that remains readable and predictable, but it is not perfectly uniform.
Seven tools is well within the ideal range for a focused legal-research server. Each tool serves a distinct and necessary function for navigating, searching, and analyzing the CFR without redundancy or bloat.
The tool set covers the full research workflow: orientation (list_agencies, where_does_term_appear), discovery (search_regulations, browse_structure), retrieval (lookup_citation), and historical analysis (what_changed, compare_versions). There are no obvious dead ends; each tool refers to others for follow-up, creating a coherent end-to-end experience.
Maintenance
Related MCP Connectors
Read a CFR or eCFR section, or search US federal regulations and the Federal Register.
Search and read US federal regulations with legal and inline citations linking to ecfr.io.
Search and trace US federal rules across the Federal Register, eCFR, and Regulations.gov.
Source-linked US federal regulations: CFR provision history, obligations, rules, comments.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to search and retrieve executive orders, presidential documents, rules, and agency information from the Federal Register API through natural language queries.12MIT
- FlicenseNot gradedqualityBmaintenanceEnables LLM-friendly access to the CourtListener legal database and eCFR for searching legal opinions, court cases, judges, documents, and federal regulations.15-
- AlicenseAqualityBmaintenanceEnables AI agents to search and track US federal regulations, documents, and executive orders from the Federal Register, with no API keys required.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access US FDA regulations (21 CFR) through natural language queries, providing tools for retrieving regulatory information.64 npmMIT