Keyless-first MCP: 153 tools for US federal + state/local (SLED) contracting, spending & regulation
@cliwant/mcp-sam-gov
The io.github.cliwant/mcp-sam-gov MCP server provides keyless-first access to public U.S. federal and state/local (SLED) data for contracting, spending, regulation, and partner vetting. It exposes 150 tools spanning 52 data sources so AI agents can retrieve information in a model-context-protocol workflow.
π οΈ Key Features
Model Context Protocol (MCP) server
150 tools across 52 data sources
Keyless-first approach: only 4 sources require a free key
Keyless sources include 48 that need no key
π Use Cases
US federal and state/local (SLED) contracting
Spending and regulation research
Partner vetting for govcon workflows
β‘ Developer Benefits
Works βtoday, in any AI agentβ
Designed for model-context-protocol tool use
NPM installation via npm install
β οΈ Limitations
Only 4 data sources require keys; the remainder are keyless, per the documented sourcing model
Tool coverage is limited to the stated procurement/spending/regulation and partner vetting domain data sources (52 total)
$4 trillion of public federal data, one npm install away.
The most comprehensive keyless-first MCP server for US federal and state/local (SLED) contracting + spending + regulation + partner vetting. 153 tools across 54 data sources β keyless-first: only 4 sources (Census business-patterns, FRED, BEA, and DOL's data endpoint) need a free key; the other 50 need none. Works today, in any AI agent.
Independent project β not affiliated with, endorsed by, or sponsored by SAM.gov, the U.S. General Services Administration (GSA), or any government agency.
The federal data this wraps is public domain. There is no good reason it should cost a five-figure subscription to query.
What this gives Claude (and other AI agents)
Domain
What you can ask
Sources
π Opportunities & solicitations
"Find SAM.gov solicitations under NAICS 541512 closing this month" β read the SOW, POCs, attachments
SAM.gov, Grants.gov
π° Spending, awards & competition
"Show me Booz Allen wins at VA last fiscal year; top 10 PSC categories at DoD"
USAspending, FPDS, GAO
π΅οΈ Entity & partner vetting
"Screen this firm: OFAC sanctions, SAM exclusions, single-audit findings, bank health, EPA compliance + toxics-release"
OFAC, SAM, FAC, FDIC, EPA ECHO, EPA Envirofacts
π Product safety & recalls
"Any FDA/NHTSA/CPSC recalls or enforcement against this supplier's products?"
openFDA, NHTSA, CPSC
βοΈ Litigation & courts
"Any Court of Federal Claims bid protests or Federal Circuit opinions involving this contractor?"
CourtListener (Free Law Project)
π’ Nonprofit vendors
"Pull this nonprofit's IRS-990 financials before we subcontract to it"
IRS 990 (via ProPublica)
π₯ Healthcare providers & facilities
"Medicare utilization & payments for this provider; hospital quality ratings; is this provider on the revocation list?"
CMS (data.cms.gov)
π Financial disclosure (SEC)
"Pull this public company's revenue trend and latest 10-K filings"
SEC EDGAR
βοΈ Regulatory & legislative
"What VA cybersecurity rules were published this quarter? Any open Regulations.gov dockets?"
Federal Register, Regulations.gov, eCFR, FAR/DFARS, Congress.gov, GovInfo
π² Pricing, labor & fiscal
"GSA CALC labor-rate band for a systems analyst; SCA wage determination for this county; CPI escalation; per-diem cap for a trip; regional GDP by industry; DOL wage-hour enforcement history"
GSA CALC, SAM WDs, BLS, US Census CBP, FRED, BEA, US Treasury, GSA per-diem, US DOL
π Lobbying & influence
"Who lobbies the VA on cybersecurity, and how much do they spend?"
US Senate LDA
π₯ Health & research funding
"NIH/NSF grants on this topic; recruiting clinical trials; industry payments to this physician"
NIH RePORTER, NSF, ClinicalTrials.gov, CMS Open Payments, NPPES
π‘ Cyber compliance
"Is this CVE on the CISA KEV must-patch list?"
NVD, CISA KEV
π Trade, geo & disaster
"HTS tariff for this product; Census tract for this address; FEMA declarations in this state"
USITC HTS, US Census, FEMA, Socrata, CKAN
π State/local procurement bids (SLED)
"What's open on this city's/county's procurement portal right now? Their checkbook, awarded contracts, vendor payments; state DOT bid/award registers"
OpenGov Procurement (525+ govs), Bonfire, ArcGIS (feature + Hub), Socrata (54 hosts), one Tableau Server Guest view (Montana), one Socrata Open Expenditures checkbook (South Dakota)
π Grants & datasets
"Cybersecurity grants posted in the last 30 days; discover federal open datasets"
Grants.gov, data.gov
153 tools across 54 data sources β keyless-first: only 4 sources (Census business-patterns, FRED, BEA, and DOL's data endpoint) need a free key; the other 50 need none. (An earlier 52-tool build measured roughly p50 ~0.25s / p95 ~0.8s against production federal APIs; latency varies by source and upstream load β treat it as fast, not a benchmarked guarantee.)
How do I install it? Pick the path that matches you.
π’ Path 1 β Claude Desktop, one-click (no terminal needed)
Best for non-developers. Just download a file and double-click.
No global install? Every host config below also has an npx variant (npx -y @cliwant/mcp-sam-gov) that skips the clone and npm install -g. It only needs Node.js.
βͺ Path 4 β Direct path (zero install, just point at the file)
Skip installation entirely:
bash
gh repo clone cliwant/mcp-sam-gov
cd mcp-sam-gov
npm install --omit=dev # only runtime deps; dist/ is pre-built
Each host below shows two variants. Use one of them:
Global install: "command": "mcp-sam-gov". This works only after npm install -g (Path 3) has put the mcp-sam-gov binary on your PATH.
No global install (npx): "command": "npx", "args": ["-y", "@cliwant/mcp-sam-gov"]. This needs only Node.js. npx downloads the package from npm on first run and caches it.
Package name: the npm package is scoped: @cliwant/mcp-sam-gov. mcp-sam-gov is only the name of the binary that a global install puts on your PATH. No unscoped mcp-sam-gov package exists on npm, so npx -y mcp-sam-gov fails with a 404. Use npx -y @cliwant/mcp-sam-gov.
Claude Desktop
%APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
Or use the one-click badge at the top of this page to install directly from your browser.
Kiro
Use the one-click badge at the top of this page to add the server. Kiro opens an install dialog pre-filled with the npx command.
Anything else
If your host speaks MCP over stdio, point it at mcp-sam-gov (global install) or at npx -y @cliwant/mcp-sam-gov (no global install). No host-specific code.
What questions can I ask?
Once installed, you can ask in natural language. The agent picks the right tool sequence automatically.
"Find active SAM.gov solicitations under NAICS 541512, MD only, closing in 30 days"
"What's the canonical NAICS code for 'computer systems design'?"
RFP analysis
"Pull noticeId 5ef3db5daeb54099a96d487783a38bd0 β give me the SOW, contracting officer, and attachments"
"Show me the full RFP body for that notice"
Competitive landscape
"Top 5 recipients of VA contracts in NAICS 541519 last fiscal year"
"Show me Booz Allen's individual awards at DISA"
"Who are the sub-contractors on Leidos' VA contracts?"
"What's CMS in USAspending? (resolve the abbreviation)"
Trends & aggregation
"How has VA 541512 spending trended over the last 5 fiscal years?"
"Top 10 states by federal contracting spend in 541512"
"Top PSC categories at DoD by spending"
"Federal grant programs in cybersecurity by total $"
Agency intelligence (capture brief)
"Give me a capture brief on VA: mission, FY26 budget breakdown, top sub-agencies"
"What's VA's transaction volume for FY25?"
Recompete radar
"VA 541512 contracts expiring in next 12 months over $1M"
"Pull period of performance for award CONT_AWD_..."
Regulatory & legislative
"Find FAR sections about SDVOSB set-aside requirements"
"Turn this RFP's cited FAR/DFARS clause list into a Section L/M compliance matrix"
"What new VA cybersecurity rules were published this quarter?"
"Any Federal Register documents on the public-inspection desk from DoD today?"
"Search Regulations.gov dockets on 'contractor cybersecurity' and pull the public comments"
"Discover federal open datasets about 'wildfire' on data.gov"
"Is there a Federal Register doc number 2026-08333? Pull the citation."
Partner & entity vetting
"Screen 'Acme Defense LLC' against the OFAC sanctions list and SAM exclusions"
"Look up NPI 1234567890 in NPPES β is this provider active?"
"Does this subcontractor have adverse Single Audit findings in the Federal Audit Clearinghouse?"
"How healthy is the bank on cert #3510 β risk ratios and quarterly financials?"
"Pull this public company's revenue trend and latest 10-K from SEC EDGAR"
"Any EPA compliance/enforcement flags for this facility?"
Compliance & eligibility
"What's the SBA small-business size standard for NAICS 541512?"
"Search the eCFR for the exact text of a rule"
"What's the US import duty rate (HTS) for lithium-ion batteries?"
Pricing, labor & fiscal
"GSA CALC ceiling-rate band for a senior systems analyst"
"Find the SCA wage determination for Baltimore County, MD and give me the fringe rates"
"How much has CPI-U risen over the last 3 years for an escalation clause?"
"What's the current total US public debt (Debt to the Penny)?"
Cyber
"Is CVE-2021-44228 (Log4Shell) on the CISA KEV must-patch list, and what's the due date?"
Health & research funding
"NIH RePORTER projects on mRNA vaccines funded last year"
"Recruiting clinical trials for diabetes sponsored by industry"
"Industry payments to physicians in CA from the CMS Open Payments Research dataset"
Grants
"Cybersecurity grants posted in the last 30 days"
"Pull grant id 361238"
Optional β higher rate limits + archives
The MCP server runs keyless by default. For higher SAM.gov rate limits + the full archive (notices older than ~12 months), set SAM_GOV_API_KEY in your host's env block:
DATA_GOV_API_KEY β the api.data.gov / api.gsa.gov family
A handful of sources ride the shared api.data.gov gateway β Congress.gov, GovInfo, Regulations.gov, FAC, GSA per-diem, and the data.gov v4 dataset catalog. They work keyless out of the box via the public DEMO_KEY (a low shared hourly quota). Set DATA_GOV_API_KEY to raise those limits substantially:
Get one free (instant, no wait) at api.data.gov/signup. The same key is accepted across all api.data.gov / api.gsa.gov sources. Like the SAM key, it is sent only on the wire (never logged); unset simply means DEMO_KEY. BLS sources similarly accept an optional free BLS_API_KEY to lift their daily quota.
Keys & higher limits β the full inventory
Most tools are keyless. Four sources require a free key β Census (census_business_patterns), FRED (fred_search_series, fred_series_observations), BEA (bea_regional_data), and DOL's data endpoint (dol_get_dataset) β those sources have no keyless tier, so the tool throws without one. (DOL's catalog dol_list_datasets is keyless.) The other keys are optional: they only raise a rate limit or unlock a single filter. Every key below is free.
Env var
Required?
What it unlocks
Free signup
CENSUS_API_KEY
Required
census_business_patterns (no keyless tier β throws without it)
higher limits on all api.data.gov sources (Regulations.gov, Congress.gov, GovInfo, FAC, data.gov catalog, GSA per-diem) β lifts the shared DEMO_KEY cap
The server auto-loads .env at startup. A real environment variable always wins over .env (standard precedence), and .env is git-ignored so your keys never get committed.
Ask the server which keys it needs. The keyless api_key_status tool lists every key, whether it's required or optional, the free signup URL + what it unlocks, and whether each is currently configured (a boolean β the key value is never shown). Creating the account at the signup URL is your one manual step; the server automates discovery (api_key_status) and configuration (.env). To confirm a key actually works, call that source's own tool.
Choosing toolsets (smaller context)
By default all 153 tools load β about 74k tokens per session. Clients that pay the full context cost (Claude Desktop, Cursor, raw API) can cut that significantly by loading only the toolsets relevant to the task.
Set the MCP_SAM_GOV_TOOLSETS environment variable to a comma-separated list of toolset names (case-insensitive). Leave it blank (or set it to all) to restore all tools.
Token counts are approximate, measured as the compact JSON character count of each tools/list entry divided by 4.
feedback and api_key_status are always loaded in every profile (they help agents report problems and check key health regardless of which toolset is active).
claude mcp add sam-gov -e MCP_SAM_GOV_TOOLSETS=core,sled -- npx -y @cliwant/mcp-sam-gov
Claude Desktop bundle (.mcpb / manifest user_config): set the Toolsets field in the extension settings dialog (blank = all).
If you call a tool that belongs to an unloaded toolset, the server returns a structured tool_not_loaded error naming the toolset and the exact env var to set. The suggested value is the union of your current loaded sets plus the needed set (e.g. MCP_SAM_GOV_TOOLSETS=core,vetting when you have core loaded and call a vetting tool) so your existing profile is not silently dropped. It never silently returns an empty result.
Staying up to date
npm doesn't notify installed users of new versions, so the server does β minimally. On startup it makes one anonymous request to the public npm registry for its own latest version and, only if a newer one exists, prints a single line to stderr (e.g. a newer version is available: 1.7.0 β 1.8.0). It sends no usage data (a version check, not telemetry), never touches the protocol's stdout, is non-blocking, and stays silent when you're current.
Update:npm i -g @cliwant/mcp-sam-gov@latest β or just restart if your config uses npx @cliwant/mcp-sam-gov@latest.
Opt out: set MCP_SAM_GOV_NO_UPDATE_CHECK=1 (or NO_UPDATE_NOTIFIER=1).
Found a bug? Want a feature? Report it in one step
This server is built to improve from real usage. Because an AI agent (not a human) calls the tools, the feedback path runs through the agent:
On the two "something may be broken" errors β schema_drift (a federal API changed shape) and upstream_unavailable (an outage) β the error envelope carries a report field: a prefilled GitHub issue link your agent can offer you.
Or just tell your agent "report a bug" / "this result looks wrong" / "I wish it could do X" β it calls the feedback tool, which returns a prefilled issue link for you to open and submit.
Nothing is ever posted automatically. The server has no token and no account β it only builds the link; you open and submit it. Prefilled links carry only the tool name, error kind, and server version β never your query values. The repo is public, so redact anything sensitive first.
You can also open one directly: New issue β bug / feature / wrong-output templates.
Tool catalog (153 tools)
Grouped by workflow. Keyless-first β most tools need no key; Census business-patterns, FRED, BEA, and DOL's data endpoint require a free key, and a handful of others gain higher limits from an optional free key (noted above). Descriptions are condensed β each tool's own inputSchema carries the full contract and honesty caveats.
usas_naics_hierarchy β navigate the NAICS tree (2β4β6) + active-contract count per code
usas_glossary β 151 federal-spending terms
usas_list_disaster_codes β list Disaster Emergency Fund Codes (DEFC): COVID-19, IIJA/infrastructure, and other emergency-appropriation tags
usas_disaster_spending β disaster/emergency-fund spending BY GEOGRAPHY for given DEFCs (which state/county/district captured COVID/IIJA relief money)
fpds_search_awards β FPDS-NG federal contract award actions (the authoritative award-action feed)
gao_protest_lookup β recent GAO bid-protest decisions from the public Legal-Products RSS feed (recent window only)
Entity & partner vetting β OFAC Β· SAM Β· FAC Β· FDIC Β· EPA (15 tools)
courtlistener_search_opinions β US federal court opinions (COFC contract claims / bid protests, Federal Circuit); party param for actual-party cases β data via CourtListener / Free Law Project (disclosed)
courtlistener_search_dockets β RECAP dockets (type=r) for FCA / False Claims Act / qui tam matters that rarely produce opinions; suitNature fielded filter β data via CourtListener / Free Law Project (disclosed)
Nonprofit vendors β IRS 990 via ProPublica (2 tools)
nonprofit_search β IRS-990 nonprofit search by name / state / NTEE β via ProPublica Nonprofit Explorer (disclosed)
nonprofit_financials β IRS-990 nonprofit financials by EIN β via ProPublica Nonprofit Explorer (disclosed)
Financial disclosure β SEC EDGAR (8 tools)
edgar_lookup_cik β resolve a company ticker or name to its 10-digit SEC CIK
edgar_company_filings β a company's SEC filings
edgar_company_facts β curated XBRL financial facts for a filer
edgar_company_concept β one filer Γ one XBRL concept Γ the complete reported time-series
edgar_xbrl_frames β cross-filer XBRL cross-section (one concept across all filers for a period)
edgar_full_text_search β full-text search across EDGAR filings, 2001βpresent
edgar_filing_index β bulk cross-filer filing index for a quarter
edgar_daily_filing_index β per-day cross-filer filing index
Regulatory & legislative β Federal Register Β· Regulations.gov Β· eCFR Β· FAR Β· Congress Β· GovInfo (19 tools)
fed_register_search_documents β search Federal Register documents by query / agency / type / date
fed_register_get_document β full detail for a document by number (citation, body URL, CFR refs)
fed_register_public_inspection β the Federal Register public-inspection desk (pre-publication)
fed_register_list_agencies β Federal Register agency slugs reference
hts_lookup β US import-tariff classification + duty rates from the USITC Harmonized Tariff Schedule
cbp_border_wait_times β live CBP land-border commercial-vehicle wait times (Canadian + Mexican ports; freight/logistics)
Geo, disaster & state/local open data β Census Β· FEMA Β· NWS Β· Socrata Β· CKAN (10 tools)
census_geocode_address β resolve a one-line US address β matched address + Census geographies (tract, CD, place)
census_geographies_by_coordinates β resolve a longitude/latitude point β Census geographies
fema_disaster_declarations β FEMA disaster / emergency declarations by state, type, incident, year
fema_search_public_assistance β FEMA Public Assistance funded projects
fema_search_hazard_mitigation β FEMA Hazard Mitigation Assistance projects (HMGP/FMA/PDM/BRIC mitigation grants to state/local/tribal subrecipients; disaster-resilience, distinct from Public Assistance recovery)
nws_active_alerts β currently-active NWS weather alerts (watches/warnings/advisories; disaster/climate readiness, pairs with the FEMA tools)
socrata_discover_datasets β find Socrata dataset 4x4 ids by keyword
socrata_query β query rows from an allowlisted Socrata/SODA open-data portal (54 curated state/county/city + federal hosts β checkbook, contracts, vendor payments, live solicitations across the SLED tier)
ckan_discover_datasets β find CKAN datastore resource ids by keyword
ckan_query β query rows from an allowlisted CKAN datastore resource (state/city spend/checkbook)
opengov_list_governments β directory of 525+ US state/local governments on OpenGov Procurement (filter by state/query)
opengov_search_solicitations β a government's live public solicitations (title, status [open = accepting], deadline, portal link) β keyless anonymous endpoints
bonfire_list_organizations β curated live-verified 187-org US seed directory of governments on Bonfire (Euna)
bonfire_search_opportunities β an org's currently-open opportunities via keyless RSS (referenceNumber, name, closeDate, link); the RSS is the complete open set (exact total)
arcgis_hub_discover_datasets β discover ArcGIS Hub datasets by keyword (the SLED GIS/infrastructure/permits/procurement layer Socrata & CKAN don't cover; a discovery aid with publisher surfaced for vetting)
arcgis_feature_query β query rows from a curated allowlist of 29 US-gov ArcGIS REST feature layers: DC OCP PASS live solicitations; local-gov checkbooks/contracts; county CIP pipelines (Hennepin County MN, Charlotte-Mecklenburg NC β capital-project pipelines, not solicitation registers); state DOT bid/award registers (TX / AK / IA / OK); 4 North Dakota DOT federal flex-funding award layers (NDDOT funding awards to local public agencies such as counties, townships and cities, not vendor contracts or winning bids; a proxy because ND's statewide checkbook and procurement portal aren't keyless-reachable)
tableau_view_csv β fetch a curated US-gov Tableau Server Guest view's complete CSV export (keyless) and page over it; one view today: Montana DOA Contracts Awarded (~4,554 award records; freshness is set by the publisher and can lag)
open_checkbook_search β row-level vendor-payment search over a curated Socrata Open Expenditures checkbook portal (keyless; exact-match year/vendor/department/expense-category filters); two portals today: South Dakota (~740,980 payments, only the ~3 most recent fiscal years) and Alaska (41,751 payments, FY2026 only β any other year returns count:0, meaning "not published", not zero spending); freshness is set by the publisher and can lag, so sort by payment_date desc to see the newest date)
State open-data map β also available as an MCP resource (samgov://data-map/state-local, readable by any MCP client via resources/read) and in skills/sam-gov/SKILL.md. Largest verified keyless datasets: Texas DIR cooperative purchase lines 10.7M rows + TxDOT live lettings 412 projects (socrata_query data.texas.gov), Massachusetts CTHRU vendor payments ~49M rows, Virginia eVA PO line items 1.69M rows (ckan_query data.virginia.gov), New Jersey YourMoney 660k rows, Washington contracts + master-contract-sales 325k rows combined. These are state open-data mirrors, not the states' live bid portals (TX TxDOT lettings being the first live solicitation feed). CA, OH, NC, MI, and non-TxDOT TX portals are login/WAF-gated; FL and GA have no state open-data portals (NXDOMAIN); PA's portal carries no procurement datasets.
lda_search_filings β Senate lobbying filings: who lobbies which agency, on what issue, for how much (keyless)
Server utilities β key discovery Β· feedback (2 tools)
api_key_status β list which API keys the server can use, required vs optional, signup URLs, and whether each is currently set (value never shown)
feedback β returns a prefilled GitHub issue link for a bug report or feature request; you open and submit it yourself (the tool never posts anything)
Reliability & offline snapshots
This server is built around one rule: honest failure over confident fabrication. Everything below is about availability of public data β none of it bypasses access controls.
Keyless-first, and a down source throws. 50 of the 54 sources (148 of the 153 tools) work with no API key; Census business-patterns, FRED, BEA and DOL's data endpoint need a free one. When a source is rate-limited, blocked, or down, the tool returns a typed error (rate_limited / upstream_unavailable / schema_drift / β¦) β it never invents rows and never reports a DOWN service as "0 results" or "not found". A genuine empty result and an outage are always distinguishable.
Offline snapshots (on by default). Some reference data changes slowly β the toptier-agency list, the top-level NAICS tree, the USAspending glossary, SBA size standards, the latest Treasury "Debt to the Penny." By default, when a live federal source is briefly unreachable from your egress, the server falls back to a public, weekly-refreshed snapshot of that slow-changing reference data, hosted at raw.githubusercontent.com/cliwant/mcp-sam-gov/snapshots. It only fetches on a live hard-failure (an outage / IP-reputation block), never during normal operation β public data, no telemetry. A served snapshot is never presented as live β the response carries _meta.dataPath: "snapshot" plus an asOf timestamp, and complete is forced off, so an AI agent (and you) always see the staleness. A rate limit (429) is always honored, never routed around onto the mirror.
Disable it (pure live-only): set SAMGOV_SNAPSHOT_BASE_URL=off. Then no snapshot path is ever added and behavior is byte-for-byte identical to a live-only client.
Point at your own mirror: set SAMGOV_SNAPSHOT_BASE_URL to your base URL to host the snapshots yourself instead of using the public default.
Build the snapshots: run node scripts/build-snapshots.mjs from any clean, non-blocked egress (a laptop / home / clean CI runner). It self-diagnoses per-source reachability, prints a reachability table, and writes a manifest.json. On partial coverage it refreshes only the sources it can reach and leaves the last-good file in place for the rest (stale-but-honest, never blanked). It exits non-zero only when zero sources were reachable (a fully blocked egress β the signal to re-run from a cleaner one).
The honest boundary. This covers public-data availability only. The snapshot builder ingests only public, redistributable (public-domain / CC0) data, and the reader refuses to serve any envelope not marked accessLevel: "public". It honors rate limits (a 429 is never routed around), uses no proxies, no IP rotation, no auth/paywall/CAPTCHA bypass, and refuses off-host redirects. If a source is blocked, the honest remedy is to build from a cleaner egress β not to evade the block.
Troubleshooting
Symptom
Fix
Claude Desktop π¨ menu doesn't show sam-gov
Fully quit Claude Desktop (system tray on Windows / Quit menu on macOS) and reopen. Check %APPDATA%\Claude\logs\mcp*.log
command not found: mcp-sam-gov
Confirm npm install -g . succeeded; check that npm's global bin is on PATH (npm config get prefix)
spawn npx ENOENT (Windows, npx config)
The host started npx without a shell, so Windows can't find npx.cmd. Use "command": "cmd", "args": ["/c", "npx", "-y", "@cliwant/mcp-sam-gov"].
MODULE_NOT_FOUND ...dist/server.js after npm install -g github:...
npm bug with git-dep symlinks on Windows. Use the clone + npm install -g . recipe (Path 3) instead.
EPERM: operation not permitted, rmdir during install
Previous failed install left dangling files. Run rmdir /s /q "%APPDATA%\npm\node_modules\@cliwant" (or @govicon if you installed an early version) then retry.
npm install fails with "private repo" / 404
The repo is now public β should not happen. If it does, try git clone https://github.com/cliwant/mcp-sam-gov.git directly.
Tools return empty results
SAM.gov rate-limits aggressive callers. Wait 1 minute. Or set SAM_GOV_API_KEY for the higher-rate authenticated path.
"Tool error: USAspending POST returned 400"
Usually means a field has a wrong type (e.g. fiscal year as string). Check the tool input schema in your host's tool browser.
Use as a TypeScript / JavaScript library (no MCP)
Beyond the MCP server, this package also exports the underlying federal-data
clients as importable modules. Useful if you're building your own SaaS, AI
agent, or CLI and want programmatic access without spawning an MCP server.
bash
npm install @cliwant/mcp-sam-gov
ts
// SAM.gov clientimport { SamGovClient } from"@cliwant/mcp-sam-gov/sam-gov";
const sam = newSamGovClient(); // keylessconst result = await sam.searchOpportunities({ ncode: "541512", limit: 5 });
const opp = await sam.getOpportunity("5ef3db5daeb54099a96d487783a38bd0");
ts
// USAspending wrappersimport * as usas from"@cliwant/mcp-sam-gov/usaspending";
const recompete = await usas.searchExpiringContracts({
agency: "Department of Veterans Affairs",
naics: "541512",
monthsUntilExpiry: 12,
});
const recipient = await usas.getRecipientProfile("ed02855e-60d7-2540-...-P");
ts
// Federal Register / eCFR / Grants.govimport * as fedreg from"@cliwant/mcp-sam-gov/federal-register";
import * as ecfr from"@cliwant/mcp-sam-gov/ecfr";
import * as grants from"@cliwant/mcp-sam-gov/grants";
const farResults = await ecfr.search({ query: "SDVOSB", titleNumber: 48 });
This is the canonical home for the Cliwant federal-data libraries β there
is no separate library package. Two earlier repos (govicon-sam-gov and
govicon-mcp-sam-gov) have been archived and consolidated here. All
client code lives in src/sam-gov/, src/usaspending.ts,
src/federal-register.ts, src/ecfr.ts, src/grants.ts.
Privacy Policy
This server runs locally and collects nothing β no telemetry, no analytics, no accounts. Your prompts and results are processed in memory on your machine and are never sent to Cliwant. Each tool calls the relevant official government API directly over HTTPS; optional API keys stay in your local environment and are sent only to that source. See the full Privacy Policy (contact: seungdo.keum@cliwant.com).
This is an independent open-source project. It is not affiliated with, endorsed by, or sponsored by the General Services Administration, SAM.gov, USAspending.gov, the Office of the Federal Register, the National Archives, Grants.gov, or any federal, state, or local government agency. It uses only publicly available government open-data endpoints; federal procurement, spending, and regulation data is in the public domain.
Install
Configuration
Environment variables
SAM_GOV_API_KEYsecret
Optional. SAM.gov key for higher rate limits + archives older than 12 months. Keyless by default.
CENSUS_API_KEYsecret
Required only for census_business_patterns (the Census Data API has no keyless tier); every other tool works without it.
FRED_API_KEYsecret
Required only for fred_search_series and fred_series_observations (FRED has no keyless tier); every other tool works without it.
BEA_API_KEYsecret
Required only for bea_regional_data (the BEA Data API has no keyless tier); every other tool works without it.
BLS_API_KEYsecret
Optional free key for BLS labor-statistics tools (raises rate limits).
DOL_API_KEYsecret
Required only for dol_get_dataset (DOL's data endpoint has no keyless tier; dol_list_datasets works without it).
DATA_GOV_API_KEYsecret
Optional free api.data.gov key; raises DEMO_KEY limits for Regulations.gov, Congress.gov, GovInfo, FAC, the data.gov catalog and GSA per-diem.