Lets an AI client read and search Electronic Code of Federal Regulations text, including FAR, DFARS, and agency supplements.
Also known as 1102tools-dev/federal-contracting-mcps, ecfr-mcp
- Stars
- 32
- Tools
- 13
- Downloads, 30 days
- 822
- Latest version
- 1.1.15
- Last commit
- Nov 5, 2026
- License
- MIT
What is eCFR MCP?
eCFR lets an AI client read and search Electronic Code of Federal Regulations text, including FAR, DFARS, and agency supplements. It exposes 13 tools, such as compare_versions, find_far_definition, find_recent_changes.
Summary generated from the project's README
About eCFR MCP server
Accessing the Electronic Code of Federal Regulations from within an AI client allows federal contracting professionals to retrieve precise regulatory text instantly. This server connects to the public eCFR API to provide detailed information on the FAR, DFARS, and various agency supplements without requiring any API keys or registration. It works both locally on desktop applications and as a hosted service for web-based AI platforms.
The server provides thirteen specialized tools to navigate complex acquisition workflows. Users can perform full-text searches, retrieve hierarchical tables of contents, and examine amendment histories. It includes specific optimizations for common tasks, such as the find_far_definition tool which parses the large FAR 2.101 section to return only relevant paragraphs. By parsing raw XML into clean text before it reaches the model, the server helps manage context limits while ensuring accuracy through automatic date resolution for the latest available regulatory versions.
What you can do with it
- 1Retrieve specific clause textAsk the AI to find the current text of a specific FAR or DFARS clause.
- 2Compare regulatory versionsRequest a side-by-side comparison of a regulation between two different dates to see what changed.
- 3Search for definitionsFind the official definition of a specific term within the FAR 2.101 section.
- 4Track recent amendmentsIdentify which sections of the regulations have been modified recently.
Written from the project's README. Every use case is checked against a quote from it.
How to install eCFR MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall eCFR MCP in Claude Code
$ claude mcp add ecfr-mcp -- uvx ecfr-mcpInstall eCFR MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"ecfr-mcp": {
"command": "uvx",
"args": [
"ecfr-mcp"
]
}
}
}Install eCFR MCP in VS Code
.vscode/mcp.json
{
"servers": {
"ecfr-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"ecfr-mcp"
]
}
}
}Install eCFR MCP in VS Code CLI
$ code --add-mcp '{"name":"ecfr-mcp","type":"stdio","command":"uvx","args":["ecfr-mcp"]}'Install eCFR MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"ecfr-mcp": {
"command": "uvx",
"args": [
"ecfr-mcp"
]
}
}
}Install eCFR MCP in Codex
$ codex mcp add ecfr-mcp -- uvx ecfr-mcpInstall eCFR MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.ecfr-mcp] command = "uvx" args = ["ecfr-mcp"]
Install eCFR MCP in Gemini CLI
$ gemini mcp add -s user ecfr-mcp uvx -- ecfr-mcpInstall eCFR MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"ecfr-mcp": {
"command": "uvx",
"args": [
"ecfr-mcp"
]
}
}
}eCFR MCP tools 13
Read from the server with tools/listcompare_versionsRead-onlyCompare the text of a CFR section at two different dates. Useful for understanding what changed in a regulatory amendment. Returns 'changes' (each paragraph that was added, removed or changed, with its before and after text; also heading, table and pending-amendment-link changes), 'identical' when nothing differs, and the parsed text at both dates side by side. When both texts together are too long to send, the full texts are left out (texts_omitted) and 'changes' is kept. changes_only=True leaves the full texts out every time: the short answer to "what changed". Dates must be in YYYY-MM-DD format. Historical snapshot availability varies by title and section, including some dates before 2017. Use get_version_history to discover dates. Both dates must not exceed the title's up_to_date_as_of value. This tool always returns the section-level XML parsed -- pass a small section_id like '15.305', not a whole part. Whole-part comparisons can exceed 100 KB per side.
find_far_definitionRead-onlyFind a term's definition in FAR 2.101, the FAR's main definitions section. Returns each matching definition whole (the defining paragraph and every sub-paragraph under it), first, marked kind='definition'. Matching ignores case, hyphens, spacing, plurals, a trailing "means", and the acronym 2.101 puts in a name, so 'service-disabled veteran-owned small business concern', 'SDVOSB concern', 'COTS', 'commercial services' and 'contract means' all find their definitions. Other 2.101 paragraphs that use the term (whole words only) follow as kind='mention', each naming the definition it sits in. When 2.101 doesn't define the term, the tool searches the rest of the FAR (chapter 1), then the DFARS (chapter 2), for "<term>" means and returns where it is defined, with the definition text, under defined_elsewhere (for example 19.001 and 52.219-14 for 'similarly situated entity'; 204.7301 for 'covered defense information'), plus did_you_mean suggestions from 2.101. term must be at least 3 characters. max_matches caps the number of matches returned (default 20, max 100); definitions are never cut, and truncated says whether mentions were left out.
find_recent_changesRead-onlyFind CFR sections changed since a given date, removals included. Built on eCFR's version history: every version issued on or after since_date, newest first. Each change says whether the section was amended, removed (change='removed'), or re-issued with no text change (substantive=false). 'summary' counts each kind. A section changed twice appears twice. since_date must be in YYYY-MM-DD format. Filter with title (default 48), chapter (Title 48: 1 = FAR, 2 = DFARS, 99 = CAS) or part. per_page (default 100, max 5000) and page step through long lists; total_pages says how many pages there are. Common pattern: find FAR changes since a specific date to check for regulatory updates that might affect ongoing acquisitions.
get_ancestryRead-onlyGet the breadcrumb hierarchy path for a section, part, or appendix. Returns ancestors from title down to the target node: title > chapter > subchapter > part > subpart > section. Useful for understanding where a section sits in the CFR hierarchy and what regulation it belongs to. part/subpart/section/appendix accept int or string. The answer says which date it describes.
get_cfr_contentRead-onlyGet the full text of a CFR section, subpart, part, or appendix. Returns parsed clean text by default: heading, paragraphs and citations, plus tables, notes, examples, images, pending_amendments and editorial_notes when present. Tables, notes and examples are numbered, and a marker like "[See table 1: ...]" sits in the paragraphs where each appears. [fn N] marks a footnote reference. pending_amendments means eCFR links a published amendment that may not be in effect yet. A subpart, part or appendix request returns one object per section under 'sections', each with its own section number and heading. Set raw_xml=True to get the original XML instead. Answers longer than about 60,000 characters come in pages: the reply says page and total_pages, and page=2 (and so on) returns the rest. Specify the narrowest scope possible to keep responses manageable: - section='15.305' for a single FAR section - subpart='15.3' for a subpart - part='15' for an entire part (can be large) - chapter='1' for an entire chapter (often >1 MB, avoid) - appendix='Appendix A to Chapter 2' (with chapter='2') for a DFARS appendix Date auto-resolves to the latest available if not provided. Do NOT use today's date directly -- eCFR lags 1-2 business days and today often 404s. Title 48 = FAR/DFARS. Chapter 1 = FAR (Parts 1-99), Chapter 2 = DFARS (Parts 200-299). Other chapters = agency FAR supplements (GSAR, VAAR, HSAR, etc.). For DFARS clauses, use chapter='2' (e.g., section='252.227-7014'). part/subpart/section accept int or string. Common prefix mistakes like section='FAR 15.305' or '48 CFR 15.305' are stripped automatically, and trailing paragraph cites like section='15.305(a)(2)' resolve to the base section '15.305'.
get_cfr_structureRead-onlyGet the hierarchical table of contents for a CFR title or subset. Returns a nested tree of titles, chapters, parts, subparts, and sections with identifiers, descriptions, and byte sizes, plus the date it describes. IMPORTANT: Does NOT support section-level filtering (returns 400). Use part or subpart, then walk the children to find sections. Common patterns: - part='15' for FAR Part 15 structure - subpart='15.3' for just that subpart's sections - chapter='1', depth=2 for the FAR's subchapters and parts only - appendix='Appendix A to Part 200' with part='200' (title 2) for one appendix depth keeps that many levels below the node asked for (part='19', depth=1 gives Part 19's subparts); deeper levels are replaced by 'children_omitted' (how many there were). For the sections of one part, list_sections_in_part is shorter. A tree too large to send at once (a whole chapter is about 1 MB) is cut to the deepest depth that fits, and 'note' says so. subchapter needs chapter in Title 48 (each chapter has its own subchapter A, B, ...). part/subpart/chapter/appendix accept int or string.
get_correctionsRead-onlyGet editorial corrections for a CFR title, newest first. Returns corrections with CFR references, corrective actions, error dates, and FR citations, sorted by the date the error was corrected, newest first. Useful for checking whether a section's current text has been corrected since its last amendment. section (e.g. '52.204-21'), part (e.g. '52') or chapter (e.g. '2' for the DFARS) keeps only corrections that touch it. since_year keeps corrections with year >= since_year. limit caps how many are returned (default 50, max 1000); truncated says whether older ones were left out. Title 48 has ~280 corrections since 2005.
get_latest_dateRead-onlyGet the most recent available date for a CFR title. CRITICAL: eCFR lags 1-2 business days behind the Federal Register. Using today's date on versioner endpoints causes 404 errors. Call this first to get the safe date, then pass it to other tools. Default title 48 = Federal Acquisition Regulations System (FAR, DFARS, and all agency supplements). Other common titles: 2 (Grants/Agreements), 5 (Administrative Personnel), 29 (Labor), 41 (Public Contracts). Raises ValueError for titles 1-50 that are reserved (no content).
get_version_historyRead-onlyGet the version history of a CFR section, subpart, or part. Returns content_versions (each with date, amendment_date, issue_date, identifier, name, substantive and removed), every version eCFR lists: all of eCFR's pages are read, so Part 52's 2,264 versions are all there. Versions are grouped by section, oldest first. since_date/until_date (YYYY-MM-DD) keep versions dated in that range. per_page (default 200, max 1000) and page step through long histories; total_count and total_pages say how many there are. 'substantive' is eCFR's flag: true when the version's text differs from the one before, including editorial edits such as citation fixes and the "Link to an amendment published at ..." notice eCFR adds when a rule is published; false when re-issued with no text change. To see what actually changed, use compare_versions on the dates. 'removed' true means the section was removed on that date. Version metadata and text snapshots may include dates before 2017. Availability varies by title and section. Use the returned history dates for reads or comparisons; a missing old snapshot produces an availability error. A 2017-01-01 baseline often means unchanged since before 2017. part/subpart/section accept int or string.
list_agenciesRead-onlyList all agencies with their CFR title and chapter references. Returns agency names, slugs, and which CFR titles/chapters they own. Useful for finding which chapter corresponds to an agency's FAR supplement. summary_only (default True) strips the `children` and most of `cfr_references` to keep the response compact (~20 KB vs ~100 KB). References owned by child agencies are merged into the parent row, so chapter lookups like DFARS (chapter 2, on a DoD child agency) still work in summary mode. Set False for the full raw payload including children.
list_sections_in_partRead-onlyList all sections and appendices in a CFR part with their headings. Returns 'sections' in order, each {identifier, heading}, with type='appendix' on appendices (2 CFR 200's Appendix I-XII, for example) and reserved=true on reserved sections, plus 'subparts' (each with its heading, section_count and first and last section). Useful for seeing the scope of a part before reading specific sections. The part number alone is enough: chapter is optional (Title 48 parts are unique: 52 = FAR, 252 = DFARS, 552 = GSAR) and the answer reports the chapter the part is in. subpart (e.g. '52.2') lists one subpart. A list too long to send at once (FAR Part 52 has 680 entries) comes in pages: page and total_pages say where you are; page=2 gets the rest. detail=True adds eCFR's label, size and received_on for each entry (received_on is when eCFR processed the text, not when it was amended; get_version_history has amendment dates). part_number accepts int or string.
lookup_far_clauseRead-onlyConvenience tool: look up the current text of a FAR, DFARS or FAR supplement section or clause. Pass a section identifier like '15.305', '52.212-4', '2.101', 'DFARS 252.204-7012' or '552.238-81'. The chapter comes from the number (52.x = FAR, 252.x = DFARS, 552.x = GSAR, 852.x = VAAR, 1852.x = NFS, 3052.x = HSAR), so chapter is optional. Prefixes like 'FAR', 'DFARS', '§' and '48 CFR', en dashes, and trailing paragraph cites such as '(d)(11)(xviii)' are handled. Auto-resolves the latest available date. Returns parsed clean text with heading, paragraphs and citations, plus tables, notes (such as drafting notes, which are not clause text), examples, images and pending_amendments when present; see get_cfr_content. A clause longer than about 60,000 characters comes in pages: use page=2 and so on. Common FAR sections: 2.101 (Definitions), 9.104-1 (Responsibility), 15.305 (Proposal Evaluation), 19.502-2 (Small Business Set-Asides), 52.212-4 (Commercial Terms), 52.212-5 (Required Commercial Terms).
| compare_versions | Compare the text of a CFR section at two different dates. Useful for understanding what changed in a regulatory amendment. Returns 'changes' (each paragraph that was added, removed or changed, with its before and after text; also heading, table and pending-amendment-link changes), 'identical' when nothing differs, and the parsed text at both dates side by side. When both texts together are too long to send, the full texts are left out (texts_omitted) and 'changes' is kept. changes_only=True leaves the full texts out every time: the short answer to "what changed". Dates must be in YYYY-MM-DD format. Historical snapshot availability varies by title and section, including some dates before 2017. Use get_version_history to discover dates. Both dates must not exceed the title's up_to_date_as_of value. This tool always returns the section-level XML parsed -- pass a small section_id like '15.305', not a whole part. Whole-part comparisons can exceed 100 KB per side. | Read-only |
| find_far_definition | Find a term's definition in FAR 2.101, the FAR's main definitions section. Returns each matching definition whole (the defining paragraph and every sub-paragraph under it), first, marked kind='definition'. Matching ignores case, hyphens, spacing, plurals, a trailing "means", and the acronym 2.101 puts in a name, so 'service-disabled veteran-owned small business concern', 'SDVOSB concern', 'COTS', 'commercial services' and 'contract means' all find their definitions. Other 2.101 paragraphs that use the term (whole words only) follow as kind='mention', each naming the definition it sits in. When 2.101 doesn't define the term, the tool searches the rest of the FAR (chapter 1), then the DFARS (chapter 2), for "<term>" means and returns where it is defined, with the definition text, under defined_elsewhere (for example 19.001 and 52.219-14 for 'similarly situated entity'; 204.7301 for 'covered defense information'), plus did_you_mean suggestions from 2.101. term must be at least 3 characters. max_matches caps the number of matches returned (default 20, max 100); definitions are never cut, and truncated says whether mentions were left out. | Read-only |
| find_recent_changes | Find CFR sections changed since a given date, removals included. Built on eCFR's version history: every version issued on or after since_date, newest first. Each change says whether the section was amended, removed (change='removed'), or re-issued with no text change (substantive=false). 'summary' counts each kind. A section changed twice appears twice. since_date must be in YYYY-MM-DD format. Filter with title (default 48), chapter (Title 48: 1 = FAR, 2 = DFARS, 99 = CAS) or part. per_page (default 100, max 5000) and page step through long lists; total_pages says how many pages there are. Common pattern: find FAR changes since a specific date to check for regulatory updates that might affect ongoing acquisitions. | Read-only |
| get_ancestry | Get the breadcrumb hierarchy path for a section, part, or appendix. Returns ancestors from title down to the target node: title > chapter > subchapter > part > subpart > section. Useful for understanding where a section sits in the CFR hierarchy and what regulation it belongs to. part/subpart/section/appendix accept int or string. The answer says which date it describes. | Read-only |
| get_cfr_content | Get the full text of a CFR section, subpart, part, or appendix. Returns parsed clean text by default: heading, paragraphs and citations, plus tables, notes, examples, images, pending_amendments and editorial_notes when present. Tables, notes and examples are numbered, and a marker like "[See table 1: ...]" sits in the paragraphs where each appears. [fn N] marks a footnote reference. pending_amendments means eCFR links a published amendment that may not be in effect yet. A subpart, part or appendix request returns one object per section under 'sections', each with its own section number and heading. Set raw_xml=True to get the original XML instead. Answers longer than about 60,000 characters come in pages: the reply says page and total_pages, and page=2 (and so on) returns the rest. Specify the narrowest scope possible to keep responses manageable: - section='15.305' for a single FAR section - subpart='15.3' for a subpart - part='15' for an entire part (can be large) - chapter='1' for an entire chapter (often >1 MB, avoid) - appendix='Appendix A to Chapter 2' (with chapter='2') for a DFARS appendix Date auto-resolves to the latest available if not provided. Do NOT use today's date directly -- eCFR lags 1-2 business days and today often 404s. Title 48 = FAR/DFARS. Chapter 1 = FAR (Parts 1-99), Chapter 2 = DFARS (Parts 200-299). Other chapters = agency FAR supplements (GSAR, VAAR, HSAR, etc.). For DFARS clauses, use chapter='2' (e.g., section='252.227-7014'). part/subpart/section accept int or string. Common prefix mistakes like section='FAR 15.305' or '48 CFR 15.305' are stripped automatically, and trailing paragraph cites like section='15.305(a)(2)' resolve to the base section '15.305'. | Read-only |
| get_cfr_structure | Get the hierarchical table of contents for a CFR title or subset. Returns a nested tree of titles, chapters, parts, subparts, and sections with identifiers, descriptions, and byte sizes, plus the date it describes. IMPORTANT: Does NOT support section-level filtering (returns 400). Use part or subpart, then walk the children to find sections. Common patterns: - part='15' for FAR Part 15 structure - subpart='15.3' for just that subpart's sections - chapter='1', depth=2 for the FAR's subchapters and parts only - appendix='Appendix A to Part 200' with part='200' (title 2) for one appendix depth keeps that many levels below the node asked for (part='19', depth=1 gives Part 19's subparts); deeper levels are replaced by 'children_omitted' (how many there were). For the sections of one part, list_sections_in_part is shorter. A tree too large to send at once (a whole chapter is about 1 MB) is cut to the deepest depth that fits, and 'note' says so. subchapter needs chapter in Title 48 (each chapter has its own subchapter A, B, ...). part/subpart/chapter/appendix accept int or string. | Read-only |
| get_corrections | Get editorial corrections for a CFR title, newest first. Returns corrections with CFR references, corrective actions, error dates, and FR citations, sorted by the date the error was corrected, newest first. Useful for checking whether a section's current text has been corrected since its last amendment. section (e.g. '52.204-21'), part (e.g. '52') or chapter (e.g. '2' for the DFARS) keeps only corrections that touch it. since_year keeps corrections with year >= since_year. limit caps how many are returned (default 50, max 1000); truncated says whether older ones were left out. Title 48 has ~280 corrections since 2005. | Read-only |
| get_latest_date | Get the most recent available date for a CFR title. CRITICAL: eCFR lags 1-2 business days behind the Federal Register. Using today's date on versioner endpoints causes 404 errors. Call this first to get the safe date, then pass it to other tools. Default title 48 = Federal Acquisition Regulations System (FAR, DFARS, and all agency supplements). Other common titles: 2 (Grants/Agreements), 5 (Administrative Personnel), 29 (Labor), 41 (Public Contracts). Raises ValueError for titles 1-50 that are reserved (no content). | Read-only |
| get_version_history | Get the version history of a CFR section, subpart, or part. Returns content_versions (each with date, amendment_date, issue_date, identifier, name, substantive and removed), every version eCFR lists: all of eCFR's pages are read, so Part 52's 2,264 versions are all there. Versions are grouped by section, oldest first. since_date/until_date (YYYY-MM-DD) keep versions dated in that range. per_page (default 200, max 1000) and page step through long histories; total_count and total_pages say how many there are. 'substantive' is eCFR's flag: true when the version's text differs from the one before, including editorial edits such as citation fixes and the "Link to an amendment published at ..." notice eCFR adds when a rule is published; false when re-issued with no text change. To see what actually changed, use compare_versions on the dates. 'removed' true means the section was removed on that date. Version metadata and text snapshots may include dates before 2017. Availability varies by title and section. Use the returned history dates for reads or comparisons; a missing old snapshot produces an availability error. A 2017-01-01 baseline often means unchanged since before 2017. part/subpart/section accept int or string. | Read-only |
| list_agencies | List all agencies with their CFR title and chapter references. Returns agency names, slugs, and which CFR titles/chapters they own. Useful for finding which chapter corresponds to an agency's FAR supplement. summary_only (default True) strips the `children` and most of `cfr_references` to keep the response compact (~20 KB vs ~100 KB). References owned by child agencies are merged into the parent row, so chapter lookups like DFARS (chapter 2, on a DoD child agency) still work in summary mode. Set False for the full raw payload including children. | Read-only |
| list_sections_in_part | List all sections and appendices in a CFR part with their headings. Returns 'sections' in order, each {identifier, heading}, with type='appendix' on appendices (2 CFR 200's Appendix I-XII, for example) and reserved=true on reserved sections, plus 'subparts' (each with its heading, section_count and first and last section). Useful for seeing the scope of a part before reading specific sections. The part number alone is enough: chapter is optional (Title 48 parts are unique: 52 = FAR, 252 = DFARS, 552 = GSAR) and the answer reports the chapter the part is in. subpart (e.g. '52.2') lists one subpart. A list too long to send at once (FAR Part 52 has 680 entries) comes in pages: page and total_pages say where you are; page=2 gets the rest. detail=True adds eCFR's label, size and received_on for each entry (received_on is when eCFR processed the text, not when it was amended; get_version_history has amendment dates). part_number accepts int or string. | Read-only |
| lookup_far_clause | Convenience tool: look up the current text of a FAR, DFARS or FAR supplement section or clause. Pass a section identifier like '15.305', '52.212-4', '2.101', 'DFARS 252.204-7012' or '552.238-81'. The chapter comes from the number (52.x = FAR, 252.x = DFARS, 552.x = GSAR, 852.x = VAAR, 1852.x = NFS, 3052.x = HSAR), so chapter is optional. Prefixes like 'FAR', 'DFARS', '§' and '48 CFR', en dashes, and trailing paragraph cites such as '(d)(11)(xviii)' are handled. Auto-resolves the latest available date. Returns parsed clean text with heading, paragraphs and citations, plus tables, notes (such as drafting notes, which are not clause text), examples, images and pending_amendments when present; see get_cfr_content. A clause longer than about 60,000 characters comes in pages: use page=2 and so on. Common FAR sections: 2.101 (Definitions), 9.104-1 (Responsibility), 15.305 (Proposal Evaluation), 19.502-2 (Small Business Set-Asides), 52.212-4 (Commercial Terms), 52.212-5 (Required Commercial Terms). | Read-only |
Show all 13 toolsShow fewer tools
search_cfrRead-onlyFull-text search across the Code of Federal Regulations. Returns matching sections with excerpts, headings, scores, and hierarchy. current_only=True (default) returns only text in effect now. eCFR's own "current" index still lists some superseded and removed versions, so each hit is checked against the section's version history: older copies of a section are dropped, and hits whose text has since been replaced or removed are dropped and listed under current_check ('superseded' with the current version's date, 'removed' with the removal date). Up to 10 parts per page are checked; any hit not checked is marked. current_only=False returns every historical version, so a section amended 5 times appears 5 times. Search caps at 10,000 total results. Use hierarchy filters (title, chapter, part) to narrow if you hit the cap. chapter/part/subpart/section filters need a title; without one, title 48 is assumed (title_assumed says so). Labels like 'FAR Part 15', 'Subpart 15.3' or '§ 52.212-5' are read as 15, 15.3 and 52.212-5. Most titles other than 48 number chapters in Roman numerals (2 CFR chapter 'II'). order controls result ordering: 'relevance' (default), 'newest_first', 'oldest_first', 'hierarchy', or 'citations'. agency_slugs filters to one or more agencies (single slug string or a list, e.g. 'defense-acquisition-regulations-system'). Use list_agencies() to find slugs. last_modified_after/before use YYYY-MM-DD format and filter by the date sections were last amended. Useful for finding recent regulatory changes. per_page accepts 1 to 5000 (default 20); paginate with page for more.
| search_cfr | Full-text search across the Code of Federal Regulations. Returns matching sections with excerpts, headings, scores, and hierarchy. current_only=True (default) returns only text in effect now. eCFR's own "current" index still lists some superseded and removed versions, so each hit is checked against the section's version history: older copies of a section are dropped, and hits whose text has since been replaced or removed are dropped and listed under current_check ('superseded' with the current version's date, 'removed' with the removal date). Up to 10 parts per page are checked; any hit not checked is marked. current_only=False returns every historical version, so a section amended 5 times appears 5 times. Search caps at 10,000 total results. Use hierarchy filters (title, chapter, part) to narrow if you hit the cap. chapter/part/subpart/section filters need a title; without one, title 48 is assumed (title_assumed says so). Labels like 'FAR Part 15', 'Subpart 15.3' or '§ 52.212-5' are read as 15, 15.3 and 52.212-5. Most titles other than 48 number chapters in Roman numerals (2 CFR chapter 'II'). order controls result ordering: 'relevance' (default), 'newest_first', 'oldest_first', 'hierarchy', or 'citations'. agency_slugs filters to one or more agencies (single slug string or a list, e.g. 'defense-acquisition-regulations-system'). Use list_agencies() to find slugs. last_modified_after/before use YYYY-MM-DD format and filter by the date sections were last amended. Useful for finding recent regulatory changes. per_page accepts 1 to 5000 (default 20); paginate with page for more. | Read-only |
Automated checks
Ran Nov 16, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachable1102tools-dev/federal-contracting-mcps is public and reachablegithub.com/1102tools-dev/federal-contracting-mcps ↗Pass
- Package names this repository as its sourceecfr-mcp names 1102tools-dev/federal-contracting-mcps as sourcepypi.org/project/ecfr-mcp/ ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for ecfr-mcppypi.org/project/ecfr-mcp/ ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-05github.com/1102tools-dev/federal-contracting-mcps ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from ecfr-mcpPass
- No critical advisory in the package or its dependencies34 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model13 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeinitialize answered with protocol 2025-11-25 in 18 ms; tools/list returned 13 toolsPass
README
View on GitHubecfr-mcp
Free, open-source MCP server for the eCFR (Electronic Code of Federal Regulations) API. Read FAR, DFARS, and all agency FAR supplement text with no authentication required.
Overview, demo video and hosted setup: https://1102tools.com/mcp/ecfr
No API key required, locally or hosted. See Local or hosted.
Regression tests, including live checks against the eCFR API and a check that every piece of text in ten saved eCFR responses comes out exactly once and in order. The October 2026 releases were also checked with realistic contracting questions (clause lookups, FAR definitions, version history, recent changes). See testing.md.
Local or hosted
| Local (desktop) | Claude (hosted) | ChatGPT (hosted) |
|---|---|---|
| Local setup | Install | Install |
- Local runs it on your computer, inside the Claude or ChatGPT desktop app or another AI app. You get your own full rate limits, and it relies only on the government service. It doesn't update itself, so ask your AI to update it. You don't have to set it up by hand: give your AI this page's link and ask it to set it up or walk you through it.
- Hosted is always up to date, needs no setup or keys, and works in Claude or ChatGPT anywhere.
Compare local and hosted · Matching prompts
What it does
Exposes the eCFR API as 13 MCP tools covering regulatory text, structure, search, version history, and common acquisition workflows:
Core endpoints
get_latest_date- Get the most recent available date for a CFR title (call before other tools)get_cfr_content- Get parsed regulatory text for a section, subpart, or partget_cfr_structure- Hierarchical table of contentsget_version_history- Amendment history for a section or partget_ancestry- Breadcrumb hierarchy pathsearch_cfr- Full-text search with hierarchy filterslist_agencies- All agencies with their CFR referencesget_corrections- Editorial corrections for a title
Workflow convenience
lookup_far_clause- One-call FAR/DFARS clause text lookup (auto-resolves date)compare_versions- Side-by-side text comparison at two dateslist_sections_in_part- All sections in a FAR/DFARS partfind_far_definition- Search FAR 2.101 for a term definitionfind_recent_changes- Sections modified since a given date
No authentication required
The eCFR API is fully public. No API key, no registration, no auth headers. Just install and use.
Installation
Via uvx (recommended)
uvx --refresh-package ecfr-mcp --from ecfr-mcp ecfr-mcp
Via pip
pip install ecfr-mcp
From source
git clone https://github.com/1102tools-dev/federal-contracting-mcps.git
cd federal-contracting-mcps/servers/ecfr-mcp
pip install -e .
Configuration
Use the configuration below as the server definition and adapt its placement to your compatible MCP client. For practical requests using this source, see the prompt library.
{
"mcpServers": {
"ecfr": {
"command": "uvx",
"args": ["--refresh-package", "ecfr-mcp", "--from", "ecfr-mcp", "ecfr-mcp"]
}
}
}
The --refresh-package flag tells uv to check PyPI for a newer release each time your client launches the server, so fixes arrive automatically; without it, uv keeps serving whatever version it first cached. It adds a moment of network time at startup, so raise your platform's MCP startup timeout if it enforces a short one.
Restart the client. The ecfr server appears with 13 tools.
Example prompts
- "Pull the current text of FAR 15.305 (Proposal Evaluation) and summarize what it requires."
- "List all sections in FAR Part 19 (Small Business Programs)."
- "Look up the FAR definition of 'commercial product' in 2.101."
- "What FAR sections were amended in the last 6 months?"
- "Compare FAR 52.212-4 between 2024-01-01 and 2025-01-01 and show me what changed."
- "Get the current text of DFARS 252.227-7014 (Rights in Noncommercial Computer Software)."
- "Search Title 48 for 'organizational conflict of interest' and show me the relevant sections."
- "Which agency owns Chapter 8 in Title 48? Get their FAR supplement structure."
Design notes
- XML parsed server-side. The eCFR content endpoint returns raw XML. This server parses it into clean text (headings, paragraphs, citations) before returning to the model, saving significant context tokens.
- Automatic date resolution. eCFR lags 1-2 business days behind the Federal Register. Using today's date on versioner endpoints causes 404 errors. All content tools auto-resolve to the latest available date unless you specify one.
- Search defaults to current text. Without
date=current, eCFR search returns ALL historical versions including superseded. Defaultcurrent_only=Trueprevents duplicate results. - Structure endpoint limitation. The eCFR structure endpoint does not support section-level filtering (returns 400).
list_sections_in_partworks around this by fetching the part structure and walking the tree. - FAR 2.101 optimization. The definitions section is ~109KB of XML.
find_far_definitionparses the full section server-side and returns only matching paragraphs with context.
CFR Title 48 quick reference
| Chapter | Regulation | Parts |
|---|---|---|
| 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 |
Data source
All data from ecfr.gov, the continuously updated online Code of Federal Regulations maintained by the Office of the Federal Register. Updated daily, typically 1-2 business days after Federal Register publication. Not an official legal edition; for official citations reference the annual CFR from GPO.
Part of
federal-contracting-mcps: monorepo of 9 MCP servers for federal contracting data. Pair these sources with the MCP prompt library.
License
MIT
eCFR MCP questions
How do I add eCFR MCP to Claude Code?
Run claude mcp add ecfr-mcp -- uvx ecfr-mcp in your terminal. Add --scope user to make it available in every project.
How do I add eCFR MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does eCFR MCP provide?
It exposes 13 tools, including compare_versions, find_far_definition, find_recent_changes, get_ancestry, get_cfr_content.
Does the eCFR MCP server require an API key?
No. The eCFR API is public and the server needs no key, registration, or auth headers.
What can I look up with the eCFR MCP server?
It exposes 13 tools for regulatory text, structure, full-text search, version history, and acquisition workflows like FAR clause and definition lookups.
How do I look up a FAR or DFARS clause in one call?
Use the lookup_far_clause tool, which auto-resolves the date and returns the clause text.
Which regulation is in Chapter 2 of CFR Title 48?
DFARS, covering parts 200-299. Chapter 1 is the FAR (parts 1-99).
How current is the eCFR data?
It updates daily from ecfr.gov, typically 1-2 business days after Federal Register publication, and is not an official legal edition.