Skip to main content
Glama

far-mcp

MCP server for US federal acquisition regulations: dated, cited access to FAR and DFARS text, plus how the Revolutionary FAR Overhaul (RFO) changes it.

Every result carries its source URL and effective date. The server does not answer from memory: far_mcp.provenance raises instead of returning a result that lacks provenance, so a sourced answer is enforced in code rather than requested in a prompt.

This is not legal advice. far-mcp reproduces published regulation text from official sources and labels its own plain-English summaries as summaries. It does not assess your facts, your contract, or your agency's deviation. Confirm against the cited source and talk to counsel.

Tools

Tool

What it does

get_clause(id, as_of_date?, include_deviations?, regulation?)

Clause text as of a date, plus RFO/agency deviation text when asked

search(query, regulation?, part?, as_of_date?, limit?)

Keyword search over clause and section text

get_section(citation, regulation?)

Full section by cite, e.g. 9.104-1

list_reps_certs(regulation?)

The FAR 52.204-8 / 52.212-3 representations set; summary is null until a reviewer authors one

applicable_clauses(contract_type, value?, commercial?, agency?)

Applicability by contract type from the official Smart Matrix

diff(id, from_date, to_date, regulation?)

Change between two dates, including FAR vs RFO deviation text

whats_new(since_date)

Federal Register rules, eCFR amendments, RFO part updates

cite(id, regulation?)

Formatted citation with URL and effective date

Plain-English summaries

list_reps_certs may return a plain-English summary and a note on what an answer commits you to. These are curated by human review, stored in the summary table, and never written by the ingest job. Until a reviewer authors one the tool returns summary: null with summary_kind: "none_authored" — it does not synthesise prose, because a plausible-sounding summary of a representation is exactly the kind of text that must not be invented.

Every non-null summary is labelled summary_kind: "plain_english_summary" and summary_is_not_legal_text: true, so a consumer cannot mistake it for regulation text.

Related MCP server: cfr-mcp

Setup

Requires Python 3.12+.

git clone https://github.com/SureForgeTech/sureforge-far-mcp.git
cd sureforge-far-mcp
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"

Build the local store

The tools read a local SQLite store; they do not call the network at query time. Ingest it first (about 2–4 minutes, then a few minutes for agency deviation PDFs):

.venv/bin/python -m far_mcp.ingest.runner            # all phases
.venv/bin/python -m far_mcp.ingest.runner --phase matrix   # one phase
.venv/bin/python -m far_mcp.ingest.runner --force          # ignore checkpoints

Phases run in order — freshness, versions, clauses, historical_text, matrix, rfo, deviations, federal_register, finalize — and each checkpoints into ingest_run, so an interrupted run resumes where it stopped instead of re-fetching. The store lands at data/far-mcp.db (gitignored: it is derived data).

Querying an empty store raises rather than returning empty, authoritative-looking answers: far-mcp answers from the store, never from memory or the network.

MCP config for Claude

Claude Desktop (claude_desktop_config.json) and Claude Code (claude mcp add):

{
  "mcpServers": {
    "far-mcp": {
      "command": "/absolute/path/to/sureforge-far-mcp/.venv/bin/python",
      "args": ["-m", "far_mcp.server"],
      "env": {
        "FAR_MCP_DB": "/absolute/path/to/sureforge-far-mcp/data/far-mcp.db"
      }
    }
  }
}

Or from a shell:

claude mcp add far-mcp --env FAR_MCP_DB=$PWD/data/far-mcp.db -- \
  /absolute/path/to/sureforge-far-mcp/.venv/bin/python -m far_mcp.server

FAR_MCP_DB defaults to data/far-mcp.db relative to the working directory, so setting it explicitly avoids surprises when the client launches from a different cwd.

Data freshness

Freshness is measured, not asserted. The store records the source's own markers and exposes them through source_freshness():

Marker

Meaning

ecfr_up_to_date_as_of

Date through which eCFR text is current (2026-12-01 at last ingest)

ecfr_latest_amendment_date

Most recent amendment to Title 48 (2026-11-19 at last ingest)

last_ingest_at

When this store was last refreshed

as_of_date queries past ecfr_up_to_date_as_of are rejected rather than answered with newer text, so a historical question can never be silently answered with today's regulation.

Refresh daily with the same command. It stays cheap because each phase probes the source first and only does the expensive work when the probe shows a change:

  • freshness always runs — one request to titles.json. It is the probe that tells the downstream phases whether eCFR moved; keying it on its own stored marker would freeze the whole refresh.

  • matrix, rfo and federal_register hash one cheap response (baseline Smart Matrix page, RFO deviation guide, newest Federal Register document) and skip their full pull when it is unchanged.

  • versions, clauses, historical_text and finalize re-run only when the eCFR coverage marker advances.

  • historical_text fills any version span still missing point-in-time text, so as_of_date returns the wording actually in force rather than an empty string.

The Federal Register slice records last_fr_run for whats_new.

Sources

Source

Used for

eCFR API

Title 48 text (Ch. 1 FAR, Ch. 2 DFARS), point-in-time versions, hierarchy, keyword search

acquisition.gov

Smart Matrix, RFO part pages, agency deviation PDFs

Federal Register API

Proposed/final FAR and DFARS rules by FAR Case

govinfo.gov

Official PDF of record — reached via the Federal Register's pdf_url

Not used: SAM.gov is never scraped, and no entity registration answers are stored. Those are CUI. This project holds only published regulation text.

Known limitations

These are properties of the official sources, not TODOs to work around:

  1. No dollar thresholds. FAR 52.301 states the matrix "is not carried in the CFR" and defers to acquisition.gov/smart-matrix, whose table has only clause, effective date, prescribed-in, P/C. applicable_clauses(value=…) therefore reports value as unapplied with the reason, rather than inventing numbers. Contract type is honoured exactly, via the matrix's own R/A/O filters.

  2. No commercial flag, no agency rows in the matrix. Same reason; both are reported under unsupported_parameters.

  3. RFO model text has no clause-level date. It prints a (Deviation Date) placeholder, so RFO version spans use the part issuance date as effective_from.

  4. Agency deviation text is PDF-only. There is no HTML or XML alternative; text comes from PDF extraction and may vary in fidelity by agency.

  5. No separate RFO matrix. The RFO pages link back to the same Smart Matrix.

  6. No DFARS matrix. Only clause-matrix-far-view (FAR) is published.

  7. No acquisition.gov API. HTML parsing is required and may break if the site is redesigned.

  8. Search is keyword-only (FTS5). Vector search is a later, optional extension.

  9. FAR Case numbers are not a first-class Federal Register field. They are parsed from docket_ids; conditions[docket_id] is a loose substring and is deliberately not used as a filter (it returns unrelated filings).

  10. 46 of 2,741 version spans have no usable source text. eCFR's versions feed lists an identifier for a date on which its full endpoint returns only a placeholder — for 52.224-3 at 2017-01-01 the section is present but its body is just a cross-reference to a later amendment, with no operative text. get_clause refuses these with an explanatory error rather than returning an empty string, because "the clause was empty" is a false statement an agent would repeat. Counted as spans_without_source_text in source_freshness().

  11. Point-in-time fetches use issue_date, not the amendment date. eCFR's full endpoint 404s on some amendment dates — 252.203-7001 is amended 2016-12-22 but only served from 2017-01-01 — so historical text is fetched on issue_date, the first date the source actually serves that version. This differs from effective_from for 1,093 of 2,741 spans.

RFO reserves clauses that are live in the current FAR — 52.204-26, 52.212-3 and 52.204-8 are [Reserved] under RFO. diff returns both texts and says which is which; that difference is the point of the tool, not an edge case.

Tests

.venv/bin/python -m pytest                  # offline unit tests (default)
.venv/bin/python -m pytest -m network       # live government endpoints (opt-in)

Golden fixtures cover ten clauses and assert text, date and URL — including 52.204-26, 52.209-5, 52.212-3, 52.219-1, 252.204-7012 and 252.204-7016. tests/test_provenance.py fails if any tool result lacks a source.

License

Apache License 2.0 — see LICENSE and NOTICE.

Available Tools

8 tools
applicable_clausesA

Clauses applicable to a contract type, from the official Smart Matrix. contract_type uses the matrix's own labels (FP SUP, CR SUP, FP R&D, CR R&D, FP SVC, CR SVC, FP CON, CR CON, T&M LH, LMV, COM SVC, DDR, A&E, FAC, IND DEL, TRN, SAP, UTL SVC, FSS, STOCK, LEASE) with applicability R|required, A|allowed, O|optional. value, commercial and agency are accepted for compatibility but are NOT applied: no official source publishes dollar thresholds, a commercial flag, or agency rows. The response reports each under unsupported_parameters with the reason.

Inputs: contract_type (required), value, agency, commercial. Returns: object

citeB

A formatted citation for a clause: CFR form, short form, and full form, each with the source URL and effective date. Use this to cite in an answer.

Inputs: id (required), regulation. Returns: object

diffB

Compare a clause between two dates, including FAR text versus RFO deviation text. Reports line changes, whether the clause became [Reserved], and which agencies filed a deviation for its part.

Inputs: id (required), to_date (required), from_date (required), regulation. Returns: object

get_clauseA

Return one clause's text as of an optional date, with source URL and effective date. Set include_deviations=true to also return the RFO model deviation text and any agency deviation filings for its part.

Inputs: id (required), as_of_date, regulation, include_deviations. Returns: object

get_sectionA

Return a full section by citation, e.g. get_section('9.104-1'). Use get_clause for Part 52/252 clauses; use this for substantive sections.

Inputs: citation (required), regulation. Returns: object

list_reps_certsB

List the representations and certifications set (the FAR 52.204-8 / 52.212-3 family). Each entry may carry a plain-English summary and a note on what an answer commits you to. Summaries are always labelled plain_english_summary and are never regulation text; entries without an authored summary return summary=null rather than invented prose.

Inputs: regulation. Returns: object

whats_newB

What changed since a date, from the Federal Register (FAR case rules), eCFR clause amendments, and RFO part update notices. Each item carries its own source and effective date.

Inputs: since_date (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools are clearly separated by resource and intent: cite (formatting), get_clause/get_section (text retrieval), search (keyword index), diff (per-clause comparison), whats_new (global change feed), list_reps_certs and applicable_clauses (curated datasets). The main soft spot is the retrieval trio (search vs get_clause vs get_section) and the change trio (diff vs whats_new), which an agent must read carefully to pick correctly, though the descriptions do resolve the boundaries.

    Naming Consistency3/5

    There is a partial verb_noun convention (get_clause, get_section, list_reps_certs) but it is mixed with bare verbs (cite, diff, search) and noun phrases (whats_new, applicable_clauses). Each name is readable and domain-meaningful, but the set does not follow one predictable pattern.

    Tool Count5/5

    Eight tools is well within the sweet spot, and each maps to a distinct capability (citation, text lookup, search, comparison, change tracking, reps/certs, applicability matrix). No tool feels redundant or filler.

    Completeness4/5

    The surface covers the core regulatory lifecycle: find (search), retrieve (get_clause/get_section), cite, compare across dates, track amendments, and derive applicability. Gaps are minor but real — no cross-reference/definition lookup (e.g. 'what clauses does this clause reference' or defined-term resolution) and no structural navigation of parts/subparts, which agents would otherwise need.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search federal contracts, analyze agency spending, track competitor wins, and monitor small business set-aside opportunities using SAM.gov, USASpending.gov, and FPDS data.
      1
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to retrieve, search, and track changes to US Code of Federal Regulations sections via the eCFR API, returning actual regulation text with citations and point-in-time date support.
      7
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to search and retrieve US government contracts, look up NAICS codes, list indexed states, and score contract fit for a business profile. Provides access to live state and local procurement data through natural language without raw HTTP.
      7
      47 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides AI clients with deterministic lookup and cross-walk tools for 1,460+ public-sector contracting references, covering FAR/DFARS, SBA set-asides, NAICS/PSC/NIGP codes, procurement portals, glossary terms, and capture playbooks.
      83 npm
      MIT