@cliwant/mcp-sam-gov 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/LICENSE +21 -21
  2. package/README.ja.md +240 -231
  3. package/README.ko.md +240 -231
  4. package/README.md +725 -706
  5. package/dist/cbp-border.d.ts +51 -0
  6. package/dist/cbp-border.d.ts.map +1 -0
  7. package/dist/cbp-border.js +123 -0
  8. package/dist/cbp-border.js.map +1 -0
  9. package/dist/datagov-catalog.d.ts.map +1 -1
  10. package/dist/datagov-catalog.js +16 -2
  11. package/dist/datagov-catalog.js.map +1 -1
  12. package/dist/ecfr.d.ts +2 -2
  13. package/dist/ecfr.d.ts.map +1 -1
  14. package/dist/ecfr.js +24 -10
  15. package/dist/ecfr.js.map +1 -1
  16. package/dist/edgar.d.ts.map +1 -1
  17. package/dist/edgar.js +26 -6
  18. package/dist/edgar.js.map +1 -1
  19. package/dist/epa-envirofacts.d.ts.map +1 -1
  20. package/dist/epa-envirofacts.js +14 -1
  21. package/dist/epa-envirofacts.js.map +1 -1
  22. package/dist/errors.d.ts +10 -0
  23. package/dist/errors.d.ts.map +1 -1
  24. package/dist/errors.js +11 -0
  25. package/dist/errors.js.map +1 -1
  26. package/dist/far.d.ts.map +1 -1
  27. package/dist/far.js +3 -1
  28. package/dist/far.js.map +1 -1
  29. package/dist/federal-register.d.ts +2 -2
  30. package/dist/federal-register.d.ts.map +1 -1
  31. package/dist/federal-register.js +26 -10
  32. package/dist/federal-register.js.map +1 -1
  33. package/dist/feedback.d.ts +64 -0
  34. package/dist/feedback.d.ts.map +1 -0
  35. package/dist/feedback.js +131 -0
  36. package/dist/feedback.js.map +1 -0
  37. package/dist/fema.d.ts +36 -0
  38. package/dist/fema.d.ts.map +1 -1
  39. package/dist/fema.js +124 -0
  40. package/dist/fema.js.map +1 -1
  41. package/dist/gov-domains.d.ts +66 -0
  42. package/dist/gov-domains.d.ts.map +1 -0
  43. package/dist/gov-domains.js +211 -0
  44. package/dist/gov-domains.js.map +1 -0
  45. package/dist/nist-controls.d.ts +48 -0
  46. package/dist/nist-controls.d.ts.map +1 -0
  47. package/dist/nist-controls.js +174 -0
  48. package/dist/nist-controls.js.map +1 -0
  49. package/dist/nws-weather.d.ts +57 -0
  50. package/dist/nws-weather.d.ts.map +1 -0
  51. package/dist/nws-weather.js +131 -0
  52. package/dist/nws-weather.js.map +1 -0
  53. package/dist/openfda-drugsfda.d.ts +72 -0
  54. package/dist/openfda-drugsfda.d.ts.map +1 -0
  55. package/dist/openfda-drugsfda.js +230 -0
  56. package/dist/openfda-drugsfda.js.map +1 -0
  57. package/dist/openfda.d.ts.map +1 -1
  58. package/dist/openfda.js +31 -8
  59. package/dist/openfda.js.map +1 -1
  60. package/dist/server.d.ts.map +1 -1
  61. package/dist/server.js +374 -11
  62. package/dist/server.js.map +1 -1
  63. package/dist/treasury.d.ts +2 -0
  64. package/dist/treasury.d.ts.map +1 -1
  65. package/dist/treasury.js +7 -0
  66. package/dist/treasury.js.map +1 -1
  67. package/dist/usaspending.d.ts +32 -1
  68. package/dist/usaspending.d.ts.map +1 -1
  69. package/dist/usaspending.js +143 -16
  70. package/dist/usaspending.js.map +1 -1
  71. package/package.json +111 -111
  72. package/src/attachments.ts +652 -652
  73. package/src/bea.ts +372 -372
  74. package/src/bls.ts +1943 -1943
  75. package/src/cache.ts +73 -73
  76. package/src/cbp-border.ts +177 -0
  77. package/src/census-economic.ts +431 -431
  78. package/src/census.ts +735 -735
  79. package/src/ckan.ts +495 -495
  80. package/src/clinicaltrials.ts +923 -923
  81. package/src/cms-facility.ts +379 -379
  82. package/src/cms-hospital.ts +344 -344
  83. package/src/cms-supplier.ts +527 -527
  84. package/src/cms-utilization.ts +389 -389
  85. package/src/cms.ts +634 -634
  86. package/src/coerce.ts +47 -47
  87. package/src/courtlistener.ts +465 -465
  88. package/src/cpsc.ts +333 -333
  89. package/src/datagov-catalog.ts +312 -296
  90. package/src/datagov.ts +907 -907
  91. package/src/datagovKey.ts +68 -68
  92. package/src/datasource.ts +721 -721
  93. package/src/disclosure.ts +61 -61
  94. package/src/dol.ts +515 -515
  95. package/src/ecfr.ts +248 -231
  96. package/src/echo.ts +496 -496
  97. package/src/edgar.ts +3046 -3014
  98. package/src/epa-envirofacts.ts +358 -342
  99. package/src/errors.ts +324 -303
  100. package/src/fac.ts +529 -529
  101. package/src/far.ts +1009 -1007
  102. package/src/fdic.ts +2052 -2052
  103. package/src/federal-register.ts +725 -706
  104. package/src/feedback.ts +160 -0
  105. package/src/fema.ts +680 -541
  106. package/src/fpds.ts +620 -620
  107. package/src/fred.ts +464 -464
  108. package/src/gao.ts +744 -744
  109. package/src/gov-domains.ts +237 -0
  110. package/src/govinfo.ts +497 -497
  111. package/src/grants.ts +290 -290
  112. package/src/gsa-csv.ts +992 -992
  113. package/src/gsa-perdiem.ts +361 -361
  114. package/src/integrity.ts +928 -928
  115. package/src/keys.ts +268 -268
  116. package/src/lda.ts +385 -385
  117. package/src/meta.ts +292 -292
  118. package/src/nhtsa.ts +352 -352
  119. package/src/nih.ts +375 -375
  120. package/src/nist-controls.ts +219 -0
  121. package/src/nonprofit.ts +460 -460
  122. package/src/nppes.ts +834 -834
  123. package/src/nsf.ts +706 -706
  124. package/src/nvd.ts +1124 -1124
  125. package/src/nws-weather.ts +167 -0
  126. package/src/ofac.ts +1166 -1166
  127. package/src/openfda-device.ts +356 -356
  128. package/src/openfda-drugsfda.ts +313 -0
  129. package/src/openfda.ts +518 -495
  130. package/src/pricing.ts +1075 -1075
  131. package/src/sam-gov/client.ts +774 -774
  132. package/src/sam-gov/index.ts +32 -32
  133. package/src/sam-gov/types.ts +152 -152
  134. package/src/sba.ts +357 -357
  135. package/src/server.ts +6688 -6297
  136. package/src/snapshot.ts +223 -223
  137. package/src/socrata.ts +532 -532
  138. package/src/treasury.ts +582 -575
  139. package/src/usaspending.ts +2852 -2680
  140. package/src/usitc.ts +420 -420
package/README.md CHANGED
@@ -1,706 +1,725 @@
1
- <div align="center">
2
-
3
- # @cliwant/mcp-sam-gov
4
-
5
- ### **$4 trillion of public federal data, one `npm install` away.**
6
-
7
- The most comprehensive **keyless-first** MCP server for US federal contracting + spending + regulation + partner vetting. **134 tools across 44 federal data sources** — keyless-first: only 4 sources (Census business-patterns, FRED, BEA, and DOL's data endpoint) need a free key; the other 40 sources need none. Works today, in any AI agent.
8
-
9
- [![npm](https://img.shields.io/npm/v/@cliwant/mcp-sam-gov?color=cb3837&label=%40cliwant%2Fmcp-sam-gov&logo=npm)](https://www.npmjs.com/package/@cliwant/mcp-sam-gov)
10
- [![mcp-registry](https://img.shields.io/badge/MCP%20Registry-active-2ea44f?logo=anthropic)](https://registry.modelcontextprotocol.io/v0/servers?search=cliwant)
11
- [![Glama score](https://glama.ai/mcp/servers/cliwant/mcp-sam-gov/badges/score.svg)](https://glama.ai/mcp/servers/cliwant/mcp-sam-gov)
12
- [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
13
- [![Daily smoke](https://github.com/cliwant/mcp-sam-gov/actions/workflows/daily-smoke.yml/badge.svg)](https://github.com/cliwant/mcp-sam-gov/actions/workflows/daily-smoke.yml)
14
-
15
- [English](./README.md) · [한국어](./README.ko.md) · [日本語](./README.ja.md)
16
-
17
- </div>
18
-
19
- ---
20
-
21
- ## See it in action
22
-
23
- ```text
24
- 👤 user Find active SAM.gov solicitations under NAICS 541512 closing this month
25
-
26
- 🤖 Claude → sam_search_opportunities { ncode: "541512", limit: 5 }
27
- ✓ 47,478 active opportunities indexed
28
-
29
- • 5ef3db5d… VA Bulk Oxygen Tank Rental closes 2026-05-15 ($1.05M)
30
- • a000339c… Articulating Boom Lifts closes 2026-05-30 ($310K)
31
- • be9c24ef… CMOP Hazardous Waste Removal closes 2026-06-12 ($2.7M)
32
-
33
- 👤 user Pull the SOW + contracting officer for the first one
34
-
35
- 🤖 Claude → sam_get_opportunity { noticeId: "5ef3db5d…" }
36
- ✓ Department of Veterans Affairs · Combined Synopsis/Solicitation
37
- POC: Rebecca Gobble <rebecca.gobble@va.gov> +1-410-642-2411
38
- Set-aside: Total Small Business
39
- Attachments: 1 ↓ 36C24526Q0460_1.docx (172 KB)
40
- SOW preview: "RFQ# 36C24526Q0460 — Bulk Oxygen Tank Rental, Fill, Telemetry…"
41
- ```
42
-
43
- **Zero API key. Zero registration. Zero signup.** Just plug it in and ask.
44
-
45
- ---
46
-
47
- ## Why this exists
48
-
49
- | Status quo | With this MCP |
50
- |---|---|
51
- | GovWin: $30K-$100K/yr per seat | Free, MIT license |
52
- | API key registration → wait 24h → quota tier shopping | `npm install` → working in 60s |
53
- | 5+ separate vendor APIs / scrapers | 1 unified surface, 134 tools across 44 sources |
54
- | LLMs hallucinate NAICS codes / agency names | Anti-hallucination autocomplete guards built-in |
55
- | Brittle scraping breaks weekly | Daily live smoke test ([badge above](#)) |
56
- | Procurement officer → IT ticket → 3-week wait | Claude Desktop double-click install |
57
-
58
- The federal data this wraps is **public domain**. There is no good reason it should cost a five-figure subscription to query.
59
-
60
- ---
61
-
62
- ## What this gives Claude (and other AI agents)
63
-
64
- | Domain | What you can ask | Sources |
65
- |---|---|---|
66
- | 🔍 **Opportunities & solicitations** | "Find SAM.gov solicitations under NAICS 541512 closing this month" — read the SOW, POCs, attachments | SAM.gov, Grants.gov |
67
- | 💰 **Spending, awards & competition** | "Show me Booz Allen wins at VA last fiscal year; top 10 PSC categories at DoD" | USAspending, FPDS, GAO |
68
- | 🕵️ **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 |
69
- | 🛒 **Product safety & recalls** | "Any FDA/NHTSA/CPSC recalls or enforcement against this supplier's products?" | openFDA, NHTSA, CPSC |
70
- | ⚖️ **Litigation & courts** | "Any Court of Federal Claims bid protests or Federal Circuit opinions involving this contractor?" | CourtListener (Free Law Project) |
71
- | 🏢 **Nonprofit vendors** | "Pull this nonprofit's IRS-990 financials before we subcontract to it" | IRS 990 (via ProPublica) |
72
- | 🏥 **Healthcare providers & facilities** | "Medicare utilization & payments for this provider; hospital quality ratings; is this provider on the revocation list?" | CMS (data.cms.gov) |
73
- | 📈 **Financial disclosure (SEC)** | "Pull this public company's revenue trend and latest 10-K filings" | SEC EDGAR |
74
- | ⚖️ **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 |
75
- | 💲 **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 |
76
- | 🏛 **Lobbying & influence** | "Who lobbies the VA on cybersecurity, and how much do they spend?" | US Senate LDA |
77
- | 🏥 **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 |
78
- | 🛡 **Cyber compliance** | "Is this CVE on the CISA KEV must-patch list?" | NVD, CISA KEV |
79
- | 🌐 **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 |
80
- | 🎓 **Grants & datasets** | "Cybersecurity grants posted in the last 30 days; discover federal open datasets" | Grants.gov, data.gov |
81
-
82
- **134 tools across 44 federal data sources — keyless-first: only 4 sources (Census business-patterns, FRED, BEA, and DOL's data endpoint) need a free key; the other 40 sources 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.)
83
-
84
- ---
85
-
86
- ## How do I install it? Pick the path that matches you.
87
-
88
- ### 🟢 Path 1 — Claude Desktop, one-click (no terminal needed)
89
-
90
- Best for non-developers. Just download a file and double-click.
91
-
92
- 1. Download **`mcp-sam-gov.mcpb`** from the [latest release](https://github.com/cliwant/mcp-sam-gov/releases/latest).
93
- 2. Double-click the file. Claude Desktop opens with an "Install Extension" dialog.
94
- 3. Click **Install**.
95
- 4. Done. Start a new conversation and ask "Find active SAM.gov opportunities under NAICS 541512".
96
-
97
- That's it. No PowerShell, no `npm`, nothing.
98
-
99
- > Requires Claude Desktop ≥ 1.0 (which ships its own Node.js runtime).
100
-
101
- ### 🟡 Path 2 — Claude Code, one command
102
-
103
- If you already use Claude Code (the CLI):
104
-
105
- ```bash
106
- /plugin install cliwant/mcp-sam-gov
107
- ```
108
-
109
- This installs the MCP server **plus** a [SKILL.md](./skills/sam-gov/SKILL.md) workflow guide that teaches Claude when + how to use each of the 134 tools.
110
-
111
- ### 🔵 Path 3 — Manual install for any MCP host (Codex, Cursor, Continue, Gemini)
112
-
113
- For Codex CLI / Cursor / Continue / Gemini CLI / anything that speaks MCP:
114
-
115
- ```bash
116
- gh repo clone cliwant/mcp-sam-gov
117
- cd mcp-sam-gov
118
- npm install --omit=dev
119
- npm install -g .
120
- ```
121
-
122
- After install, the binary `mcp-sam-gov` is on your PATH. Add this to your host config:
123
-
124
- ```json
125
- {
126
- "mcpServers": {
127
- "sam-gov": {
128
- "command": "mcp-sam-gov"
129
- }
130
- }
131
- }
132
- ```
133
-
134
- Specific config locations per host: see [Host configurations](#host-configurations) below.
135
-
136
- ### ⚪ Path 4 — Direct path (zero install, just point at the file)
137
-
138
- Skip installation entirely:
139
-
140
- ```bash
141
- gh repo clone cliwant/mcp-sam-gov
142
- cd mcp-sam-gov
143
- npm install --omit=dev # only runtime deps; dist/ is pre-built
144
- ```
145
-
146
- Then point your host config at the absolute path:
147
-
148
- ```jsonc
149
- {
150
- "mcpServers": {
151
- "sam-gov": {
152
- "command": "node",
153
- "args": ["C:\\Users\\you\\mcp-sam-gov\\dist\\server.js"]
154
- }
155
- }
156
- }
157
- ```
158
-
159
- ---
160
-
161
- ## Host configurations
162
-
163
- ### Claude Desktop
164
-
165
- `%APPDATA%\Claude\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
166
-
167
- ```json
168
- {
169
- "mcpServers": {
170
- "sam-gov": { "command": "mcp-sam-gov" }
171
- }
172
- }
173
- ```
174
-
175
- (Or skip this entirely — use Path 1's `.mcpb` and it auto-configures.)
176
-
177
- Restart Claude Desktop fully (system tray quit on Windows / Quit menu on macOS), then look for the 🔨 icon. You should see "sam-gov (134 tools)".
178
-
179
- ### Claude Code
180
-
181
- Per-project `.mcp.json`:
182
-
183
- ```json
184
- { "mcpServers": { "sam-gov": { "command": "mcp-sam-gov" } } }
185
- ```
186
-
187
- Or globally:
188
-
189
- ```bash
190
- claude mcp add sam-gov mcp-sam-gov
191
- ```
192
-
193
- ### Codex CLI
194
-
195
- `~/.codex/config.toml`:
196
-
197
- ```toml
198
- [mcp_servers.sam-gov]
199
- command = "mcp-sam-gov"
200
- args = []
201
- ```
202
-
203
- ### Cursor
204
-
205
- Settings → MCP → Add new MCP server:
206
-
207
- ```json
208
- { "mcpServers": { "sam-gov": { "command": "mcp-sam-gov" } } }
209
- ```
210
-
211
- ### Continue
212
-
213
- `~/.continue/config.json`:
214
-
215
- ```json
216
- {
217
- "experimental": {
218
- "modelContextProtocolServer": {
219
- "transport": { "type": "stdio", "command": "mcp-sam-gov" }
220
- }
221
- }
222
- }
223
- ```
224
-
225
- ### Gemini CLI
226
-
227
- `~/.gemini/settings.json`:
228
-
229
- ```json
230
- { "mcpServers": { "sam-gov": { "command": "mcp-sam-gov" } } }
231
- ```
232
-
233
- ### Anything else
234
-
235
- If your host speaks MCP over stdio, point it at `mcp-sam-gov`. No host-specific code.
236
-
237
- ---
238
-
239
- ## What questions can I ask?
240
-
241
- Once installed, you can ask in natural language. The agent picks the right tool sequence automatically.
242
-
243
- ### Discovery
244
- - "NAICS 541512 의 메릴랜드 입찰 중 30일 안에 마감되는 것 찾아줘"
245
- - "Find active SAM.gov solicitations under NAICS 541512, MD only, closing in 30 days"
246
- - "What's the canonical NAICS code for 'computer systems design'?"
247
-
248
- ### RFP analysis
249
- - "Pull noticeId 5ef3db5daeb54099a96d487783a38bd0 — give me the SOW, contracting officer, and attachments"
250
- - "Show me the full RFP body for that notice"
251
-
252
- ### Competitive landscape
253
- - "Top 5 recipients of VA contracts in NAICS 541519 last fiscal year"
254
- - "Show me Booz Allen's individual awards at DISA"
255
- - "Who are the sub-contractors on Leidos' VA contracts?"
256
- - "What's CMS in USAspending? (resolve the abbreviation)"
257
-
258
- ### Trends & aggregation
259
- - "How has VA 541512 spending trended over the last 5 fiscal years?"
260
- - "Top 10 states by federal contracting spend in 541512"
261
- - "Top PSC categories at DoD by spending"
262
- - "Federal grant programs in cybersecurity by total $"
263
-
264
- ### Agency intelligence (capture brief)
265
- - "Give me a capture brief on VA: mission, FY26 budget breakdown, top sub-agencies"
266
- - "What's VA's transaction volume for FY25?"
267
-
268
- ### Recompete radar
269
- - "VA 541512 contracts expiring in next 12 months over $1M"
270
- - "Pull period of performance for award CONT_AWD_..."
271
-
272
- ### Regulatory & legislative
273
- - "Find FAR sections about SDVOSB set-aside requirements"
274
- - "Turn this RFP's cited FAR/DFARS clause list into a Section L/M compliance matrix"
275
- - "What new VA cybersecurity rules were published this quarter?"
276
- - "Any Federal Register documents on the public-inspection desk from DoD today?"
277
- - "Search Regulations.gov dockets on 'contractor cybersecurity' and pull the public comments"
278
- - "Discover federal open datasets about 'wildfire' on data.gov"
279
- - "Is there a Federal Register doc number 2026-08333? Pull the citation."
280
-
281
- ### Partner & entity vetting
282
- - "Screen 'Acme Defense LLC' against the OFAC sanctions list and SAM exclusions"
283
- - "Look up NPI 1234567890 in NPPES — is this provider active?"
284
- - "Does this subcontractor have adverse Single Audit findings in the Federal Audit Clearinghouse?"
285
- - "How healthy is the bank on cert #3510 — risk ratios and quarterly financials?"
286
- - "Pull this public company's revenue trend and latest 10-K from SEC EDGAR"
287
- - "Any EPA compliance/enforcement flags for this facility?"
288
-
289
- ### Compliance & eligibility
290
- - "What's the SBA small-business size standard for NAICS 541512?"
291
- - "Search the eCFR for the exact text of a rule"
292
- - "What's the US import duty rate (HTS) for lithium-ion batteries?"
293
-
294
- ### Pricing, labor & fiscal
295
- - "GSA CALC ceiling-rate band for a senior systems analyst"
296
- - "Find the SCA wage determination for Baltimore County, MD and give me the fringe rates"
297
- - "How much has CPI-U risen over the last 3 years for an escalation clause?"
298
- - "What's the current total US public debt (Debt to the Penny)?"
299
-
300
- ### Cyber
301
- - "Is CVE-2021-44228 (Log4Shell) on the CISA KEV must-patch list, and what's the due date?"
302
-
303
- ### Health & research funding
304
- - "NIH RePORTER projects on mRNA vaccines funded last year"
305
- - "Recruiting clinical trials for diabetes sponsored by industry"
306
- - "Industry payments to physicians in CA from the CMS Open Payments Research dataset"
307
-
308
- ### Grants
309
- - "Cybersecurity grants posted in the last 30 days"
310
- - "Pull grant id 361238"
311
-
312
- ---
313
-
314
- ## Optional — higher rate limits + archives
315
-
316
- 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:
317
-
318
- ```json
319
- {
320
- "mcpServers": {
321
- "sam-gov": {
322
- "command": "mcp-sam-gov",
323
- "env": { "SAM_GOV_API_KEY": "your-key-here" }
324
- }
325
- }
326
- }
327
- ```
328
-
329
- Get a free key at [sam.gov/SAM/pages/public/searchKeyData.jsf](https://sam.gov/SAM/pages/public/searchKeyData.jsf). The agent doesn't need to know — the key path is transparent.
330
-
331
- ### `DATA_GOV_API_KEY` — the api.data.gov / api.gsa.gov family
332
-
333
- A handful of sources ride the shared **api.data.gov** gateway — Congress.gov, GovInfo, Regulations.gov, FAC, NPPES, 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:
334
-
335
- ```json
336
- {
337
- "mcpServers": {
338
- "sam-gov": {
339
- "command": "mcp-sam-gov",
340
- "env": { "DATA_GOV_API_KEY": "your-key-here" }
341
- }
342
- }
343
- }
344
- ```
345
-
346
- Get one free (instant, no wait) at [api.data.gov/signup](https://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.
347
-
348
- ### Keys & higher limits — the full inventory
349
-
350
- **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.**
351
-
352
- | Env var | Required? | What it unlocks | Free signup |
353
- |---|---|---|---|
354
- | `CENSUS_API_KEY` | **Required** | `census_business_patterns` (no keyless tier — throws without it) | [api.census.gov/data/key_signup.html](https://api.census.gov/data/key_signup.html) |
355
- | `FRED_API_KEY` | **Required** | the 2 FRED tools (no keyless tier — throw without it) | [fred.stlouisfed.org/docs/api/api_key.html](https://fred.stlouisfed.org/docs/api/api_key.html) |
356
- | `BEA_API_KEY` | **Required** | `bea_regional_data` (BEA Regional; no keyless tier — throws without it) | [apps.bea.gov/API/signup](https://apps.bea.gov/API/signup/) |
357
- | `DOL_API_KEY` | **Required for data** | `dol_get_dataset` (DOL enforcement records via `X-API-KEY`; the `dol_list_datasets` catalog is keyless) | [dol.gov/developer](https://dol.gov/developer) |
358
- | `DATA_GOV_API_KEY` | Optional | higher limits on all api.data.gov sources (Regulations.gov, FAC, NPPES, CMS, data.gov catalog, GSA per-diem) — lifts the shared `DEMO_KEY` cap | [api.data.gov/signup](https://api.data.gov/signup/) |
359
- | `SAM_GOV_API_KEY` | Optional | authenticated SAM.gov v2 search + the organization-name filter | [open.gsa.gov/api/get-opportunities-public-api](https://open.gsa.gov/api/get-opportunities-public-api/) |
360
- | `LDA_API_KEY` | Optional | higher rate limit on `lda_search_filings` (Senate LDA lobbying; keyless by default) | [lda.senate.gov/api/register](https://lda.senate.gov/api/register/) |
361
- | `BLS_API_KEY` | Optional | the BLS v2 tier (~500 queries/day vs keyless ~25/day) | [data.bls.gov/registrationEngine](https://data.bls.gov/registrationEngine/) |
362
- | `NVD_API_KEY` | Optional | a higher NVD rate limit (`cve_lookup`) | [nvd.nist.gov/developers/request-an-api-key](https://nvd.nist.gov/developers/request-an-api-key) |
363
- | `OPENFDA_API_KEY` | Optional | higher openFDA rate limit (`openfda_enforcement`, `openfda_device_clearances`; both work keyless) | [open.fda.gov/apis/authentication](https://open.fda.gov/apis/authentication/) |
364
- | `COURTLISTENER_API_TOKEN` | Optional | higher CourtListener rate limit (`courtlistener_search_opinions`; works keyless) | [courtlistener.com/help/api/rest](https://www.courtlistener.com/help/api/rest/) |
365
- | `SOCRATA_APP_TOKEN` | Optional | higher Socrata throttling limits | [evergreen.data.socrata.com/signup](https://evergreen.data.socrata.com/signup) |
366
-
367
- **Two ways to set any key** — pick one:
368
-
369
- 1. **Host env block** — the `"env": { … }` object shown in the examples above.
370
- 2. **A `.env` file** in the server's working directory — configure your keys **once**:
371
- ```
372
- CENSUS_API_KEY=your-key-here
373
- FRED_API_KEY=your-key-here
374
- # optional — raise limits / unlock filters
375
- SAM_GOV_API_KEY=your-key-here
376
- ```
377
- 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.
378
-
379
- **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.
380
-
381
- ---
382
-
383
- ## Tool catalog (134 tools)
384
-
385
- 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.
386
-
387
- <details>
388
- <summary><b>Opportunities & solicitationsSAM.gov + Grants.gov (10 tools)</b></summary>
389
-
390
- - `sam_search_opportunities`keyless HAL search of active SAM.gov contracting opportunities
391
- - `sam_search_shaping` — pre-solicitation radar (Sources Sought / Presol / Special Notices before the RFP exists)
392
- - `sam_get_opportunity` full detail by 32-char hex noticeId (POCs + attachments + body)
393
- - `sam_fetch_description` — full RFP body as plain text
394
- - `sam_fetch_attachment_text` extract attachment text (RFP / SOW / Q&A / wage tables) from PDF + DOCX + text/HTML
395
- - `sam_attachment_url` — build the public download URL for an attachment resourceId
396
- - `sam_lookup_organization` federal-organization id canonical fullParentPathName
397
- - `sam_lookup_notice_fields` — batch-fill nulled naics/set-aside/PoP/deadline for 1–100 noticeIds from the opt-in GSA daily CSV
398
- - `grants_search` — Grants.gov federal grant opportunities (financial assistance, distinct from SAM contracts)
399
- - `grants_get_opportunity`full detail for a single grant opportunity by id
400
- </details>
401
-
402
- <details>
403
- <summary><b>Spending, awards & competition USAspending + FPDS + GAO (29 tools)</b></summary>
404
-
405
- - `usas_search_awards` — aggregate share-of-wallet at agency × NAICS
406
- - `usas_search_individual_awards` — line-item federal contracts (returns generatedInternalId)
407
- - `usas_get_award_detail` — full award detail: period of performance, options, set-aside, competition
408
- - `usas_search_awards_by_recipient` — every contract a recipient won in an agency × NAICS slice
409
- - `usas_search_subawards` — enumerate subcontracts on prime awards (supply chain / teaming)
410
- - `usas_search_recompetes` — recompete radar (PoP ending in a window, soonest-first, no silent drops)
411
- - `usas_search_expiring_contracts` — **deprecated** alias of `usas_search_recompetes` (legacy shape)
412
- - `usas_analyze_incumbent` — per-award incumbent + public recompete-pressure hints (labels, not a score)
413
- - `usas_search_teaming_partners` — small-business teaming discovery by cert × NAICS × agency, exclusion-screened
414
- - `usas_spending_over_time`contract-spending time series (fiscal_year / quarter / month)
415
- - `usas_search_agency_spending` — spending broken down by awarding agency
416
- - `usas_search_subagency_spending` — break a parent agency down by sub-agency / office
417
- - `usas_search_psc_spending` — spending by Product Service Code (PSC)
418
- - `usas_search_cfda_spending` — spending by CFDA grant-program code
419
- - `usas_search_state_spending` — spending by state / territory
420
- - `usas_search_federal_account_spending` — spending by federal account / Treasury Account Symbol (TAS)
421
- - `usas_search_recipients` — recipient list with parent/child hierarchy
422
- - `usas_get_recipient_profile` — full recipient detail (UEI, alternate names, totals)
423
- - `usas_get_agency_profile` — agency profile by toptier code (mission, abbreviation, website)
424
- - `usas_get_agency_awards_summary` — award activity for a fiscal year (transaction count + obligations)
425
- - `usas_get_agency_budget_function` — budget-function breakdown for an agency × fiscal year
426
- - `usas_list_toptier_agencies` — all toptier agencies + current-FY obligations
427
- - `usas_lookup_agency` — resolve 'VA' / 'DHS' canonical toptier name + 4-digit code
428
- - `usas_autocomplete_naics` — anti-hallucination NAICS guard
429
- - `usas_autocomplete_recipient` — anti-hallucination recipient guard
430
- - `usas_naics_hierarchy` — navigate the NAICS tree (2→4→6) + active-contract count per code
431
- - `usas_glossary` — 151 federal-spending terms
432
- - `fpds_search_awards` — FPDS-NG federal contract award actions (the authoritative award-action feed)
433
- - `gao_protest_lookup` — recent GAO bid-protest decisions from the public Legal-Products RSS feed (recent window only)
434
- </details>
435
-
436
- <details>
437
- <summary><b>Entity & partner vetting OFAC · SAM · FAC · FDIC · EPA (15 tools)</b></summary>
438
-
439
- - `ofac_screen_entity` — keyless OFAC denied-party / sanctions screening
440
- - `sam_check_exclusions` — keyless SAM debarment/exclusion screening by name and/or UEI/CAGE
441
- - `sam_integrity_lookup` — one-call integrity screen (exclusion verdict + honest FAPIIS pointer)
442
- - `fac_search_audits` — Single Audit summaries from the Federal Audit Clearinghouse
443
- - `fac_get_findings` — drill into the audit-RISK findings for an entity
444
- - `fdic_search_institutions` — search the FDIC-insured-institution directory
445
- - `fdic_institution_financials` — quarterly financial time-series for one institution (by cert #)
446
- - `fdic_risk_ratios` — counterparty risk ratios for one institution
447
- - `fdic_institution_history` — structural-change event log (mergers, charter changes)
448
- - `fdic_branch_deposits` — branch-deposit footprint
449
- - `fdic_bank_failures` — historical bank failures & assistance transactions
450
- - `fdic_industry_summary`industry & state banking-sector annual aggregates
451
- - `echo_search_facilities` — search EPA-regulated facilities by state with compliance/enforcement screening
452
- - `echo_facility_report` — EPA ECHO Detailed Facility Report for one facility (by FRS RegistryID)
453
- - `epa_tri_facilities` — EPA Envirofacts TRI (Toxics Release Inventory) facilities by state/industry (environmental / ESG vetting)
454
- </details>
455
-
456
- <details>
457
- <summary><b>Product safety & recalls openFDA · NHTSA · CPSC (5 tools)</b></summary>
458
-
459
- - `openfda_enforcement` — FDA drug / device / food recalls & enforcement actions (product-safety supplier vetting)
460
- - `openfda_device_clearances` — FDA 510(k) medical-device clearances (device-maker capability check)
461
- - `nhtsa_recalls` — NHTSA vehicle recalls by make / model / year
462
- - `nhtsa_complaints` — NHTSA vehicle safety complaints by make / model / year
463
- - `cpsc_recalls` — CPSC consumer-product recalls (product supplier vetting)
464
- </details>
465
-
466
- <details>
467
- <summary><b>Litigation & courts — CourtListener (1 tool)</b></summary>
468
-
469
- - `courtlistener_search_opinions` — US federal court opinions (COFC contract claims / bid protests, Federal Circuit) — data via CourtListener / Free Law Project (disclosed)
470
- </details>
471
-
472
- <details>
473
- <summary><b>Nonprofit vendorsIRS 990 via ProPublica (2 tools)</b></summary>
474
-
475
- - `nonprofit_search` — IRS-990 nonprofit search by name / state / NTEE — via ProPublica Nonprofit Explorer (disclosed)
476
- - `nonprofit_financials` — IRS-990 nonprofit financials by EIN via ProPublica Nonprofit Explorer (disclosed)
477
- </details>
478
-
479
- <details>
480
- <summary><b>Financial disclosure — SEC EDGAR (8 tools)</b></summary>
481
-
482
- - `edgar_lookup_cik` — resolve a company ticker or name to its 10-digit SEC CIK
483
- - `edgar_company_filings` — a company's SEC filings
484
- - `edgar_company_facts` — curated XBRL financial facts for a filer
485
- - `edgar_company_concept` — one filer × one XBRL concept × the complete reported time-series
486
- - `edgar_xbrl_frames` — cross-filer XBRL cross-section (one concept across all filers for a period)
487
- - `edgar_full_text_search`full-text search across EDGAR filings, 2001–present
488
- - `edgar_filing_index` — bulk cross-filer filing index for a quarter
489
- - `edgar_daily_filing_index` — per-day cross-filer filing index
490
- </details>
491
-
492
- <details>
493
- <summary><b>Regulatory & legislative — Federal Register · Regulations.gov · eCFR · FAR · Congress · GovInfo (18 tools)</b></summary>
494
-
495
- - `fed_register_search_documents` — search Federal Register documents by query / agency / type / date
496
- - `fed_register_get_document` — full detail for a document by number (citation, body URL, CFR refs)
497
- - `fed_register_public_inspection` — the Federal Register public-inspection desk (pre-publication)
498
- - `fed_register_list_agencies` — Federal Register agency slugs reference
499
- - `regulations_search_dockets` — search Regulations.gov rulemaking dockets
500
- - `regulations_search_documents` — search Regulations.gov rulemaking documents (rules, proposed rules, notices)
501
- - `regulations_search_comments` — search public comments on rulemakings
502
- - `regulations_get_docket` — fetch one Regulations.gov docket by id
503
- - `ecfr_search` — full-text search across the entire CFR (titleNumber=48 for FAR)
504
- - `ecfr_list_titles` — all 50 CFR titles + last-amended dates
505
- - `far_clause_lookup` — authoritative FAR/DFARS clause text + its prescription (exact clause number)
506
- - `far_search` — FAR/DFARS-scoped search (excludes GSAM, collapses to current in-force version)
507
- - `far_compliance_matrix`cited-clause list proposal-ready Section L/M compliance matrix (eligibility gates flagged)
508
- - `congress_search_bills` — search Congress.gov bills / legislation
509
- - `congress_get_bill` — one bill by congress / type / number
510
- - `govinfo_search_packages` — search GovInfo (GPO-authoritative) packages in a collection
511
- - `govinfo_get_package` — one GovInfo package summary + download links (txt/xml/pdf/mods)
512
- - `govinfo_list_collections` — the GovInfo collection catalog
513
- </details>
514
-
515
- <details>
516
- <summary><b>Pricing, labor & fiscal GSA CALC · SAM WDs · BLS · Census CBP · FRED · BEA · US Treasury · GSA per-diem (15 tools)</b></summary>
517
-
518
- - `gsa_benchmark_labor_rates` — GSA CALC awarded ceiling-rate market band for a labor category (a distribution, not one price)
519
- - `sam_search_wage_determinations` — find SCA / Davis-Bacon wage determinations for a locality
520
- - `sam_get_wage_rates` — prevailing-wage + fringe / H&W rate table parsed from a WD, plus the EO minimum-wage floor
521
- - `bls_timeseries` — BLS time series (CPI-U / ECI escalation, PPI, employment) — the pricing/escalation layer
522
- - `bls_oews_wages` — benchmark occupational wages & employment (BLS OEWS) by area × occupation
523
- - `bls_qcew` — county × NAICS market size / wages / location quotient (competition density)
524
- - `treasury_debt_to_penny` — daily total US public debt outstanding (Treasury Fiscal Data)
525
- - `treasury_avg_interest_rates` — average interest rate the Treasury pays by security type
526
- - `treasury_monthly_statement` — Monthly Treasury Statement: receipts, outlays, deficit/surplus by month
527
- - `treasury_query_dataset` — escape-hatch query over 5 confirmed Treasury Fiscal Data datasets
528
- - `bea_regional_data` — GDP / personal income by industry × geography (BEA Regional; requires free BEA_API_KEY)
529
- - `census_business_patterns` — establishments / employment / annual payroll by NAICS × geography (Census CBP; requires free CENSUS_API_KEY)
530
- - `fred_search_series`search the FRED macroeconomic series catalog (GDP/CPI/rates/unemployment; requires free FRED_API_KEY)
531
- - `fred_series_observations` — time-series observations for a FRED series (missing values → null; requires free FRED_API_KEY)
532
- - `gsa_perdiem_rates` — federal travel per-diem: monthly lodging + M&IE meals caps by city+state or zip (keyless via DEMO_KEY)
533
- </details>
534
-
535
- <details>
536
- <summary><b>Health & research funding NIH · NSF · ClinicalTrials · CMS · NPPES (9 tools)</b></summary>
537
-
538
- - `nih_reporter_search_projects` — awarded NIH RePORTER research-grant projects
539
- - `nsf_search_awards` — awarded NSF research-grant awards
540
- - `nsf_get_award` — one NSF award by its numeric award id
541
- - `clinicaltrials_search_studies` — federally-registered clinical studies with sponsor/funder enrichment
542
- - `clinicaltrials_get_study` — one clinical study by NCT id (incl. brief summary)
543
- - `clinicaltrials_facet_counts` — exact per-value study-count distribution over the whole registry
544
- - `cms_search_datasets` — discover CMS Open Payments (Sunshine Act) datasets
545
- - `cms_query_dataset` — query a CMS Open Payments datastore distribution (industryphysician payments)
546
- - `nppes_lookup_provider` — CMS/HHS NPPES NPI Registry provider lookup
547
- </details>
548
-
549
- <details>
550
- <summary><b>Healthcare providers & facilities — CMS (5 tools)</b></summary>
551
-
552
- - `cms_medicare_provider_services` — Medicare provider utilization & payments (healthcare market sizing)
553
- - `cms_hospital_compare` — CMS Hospital Compare quality ratings
554
- - `cms_facility_directory` — CMS nursing-home / home-health / hospice / dialysis facility directories
555
- - `cms_dmepos_suppliers` — CMS DMEPOS (durable medical equipment) supplier directory + Medicare spend
556
- - `cms_revoked_providers` — CMS Medicare revocation / exclusion list (provider compliance vetting)
557
- </details>
558
-
559
- <details>
560
- <summary><b>Cyber complianceNVD + CISA KEV (2 tools)</b></summary>
561
-
562
- - `cve_lookup` — look up NIST NVD CVE records
563
- - `cisa_kev_lookup` — filter the CISA Known Exploited Vulnerabilities catalog (binding BOD 22-01 remediation due-dates)
564
- </details>
565
-
566
- <details>
567
- <summary><b>Trade & tariffs USITC (1 tool)</b></summary>
568
-
569
- - `hts_lookup` — US import-tariff classification + duty rates from the USITC Harmonized Tariff Schedule
570
- </details>
571
-
572
- <details>
573
- <summary><b>Geo, disaster & state/local open data — Census · FEMA · Socrata · CKAN (8 tools)</b></summary>
574
-
575
- - `census_geocode_address` — resolve a one-line US address → matched address + Census geographies (tract, CD, place)
576
- - `census_geographies_by_coordinates` — resolve a longitude/latitude point Census geographies
577
- - `fema_disaster_declarations` — FEMA disaster / emergency declarations by state, type, incident, year
578
- - `fema_search_public_assistance` — FEMA Public Assistance funded projects
579
- - `socrata_discover_datasets` — find Socrata dataset 4x4 ids by keyword
580
- - `socrata_query` — query rows from an allowlisted Socrata/SODA open-data portal
581
- - `ckan_discover_datasets` — find CKAN datastore resource ids by keyword
582
- - `ckan_query` query rows from an allowlisted CKAN datastore resource (state/city spend/checkbook)
583
- </details>
584
-
585
- <details>
586
- <summary><b>Dataset discovery — data.gov (1 tool)</b></summary>
587
-
588
- - `datagov_search_datasets` — search the data.gov v4 catalog for federal open datasets across all publishing agencies
589
- </details>
590
-
591
- <details>
592
- <summary><b>Small businessSBA (1 tool)</b></summary>
593
-
594
- - `sba_size_standard` — SBA small-business size standard for a 6-digit NAICS (set-aside eligibility gate)
595
- </details>
596
-
597
- <details>
598
- <summary><b>Labor complianceUS DOL (2 tools)</b></summary>
599
-
600
- - `dol_list_datasets` — browse DOL enforcement/compliance datasets (WHD, OFCCP, …) keyless catalog
601
- - `dol_get_dataset` — fetch DOL enforcement records (WHD wage-hour / OFCCP; requires free DOL_API_KEY)
602
- </details>
603
-
604
- <details>
605
- <summary><b>Lobbying & influence — US Senate LDA (1 tool)</b></summary>
606
-
607
- - `lda_search_filings` — Senate lobbying filings: who lobbies which agency, on what issue, for how much (keyless)
608
- </details>
609
-
610
- <details>
611
- <summary><b>Server utilitieskey discovery (1 tool)</b></summary>
612
-
613
- - `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)
614
- </details>
615
-
616
- ---
617
-
618
- ## Reliability & offline snapshots
619
-
620
- 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.
621
-
622
- **Keyless-first, and a down source *throws*.** Every source works with no API key. 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.
623
-
624
- **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.
625
-
626
- - **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.
627
- - **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.
628
-
629
- ```json
630
- { "mcpServers": { "sam-gov": { "command": "mcp-sam-gov",
631
- "env": { "SAMGOV_SNAPSHOT_BASE_URL": "off" } } } }
632
- ```
633
-
634
- - **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).
635
-
636
- - **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.
637
-
638
- ---
639
-
640
- ## Troubleshooting
641
-
642
- | Symptom | Fix |
643
- |---|---|
644
- | 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` |
645
- | `command not found: mcp-sam-gov` | Confirm `npm install -g .` succeeded; check that npm's global bin is on PATH (`npm config get prefix`) |
646
- | `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. |
647
- | `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. |
648
- | `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. |
649
- | 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. |
650
- | "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. |
651
-
652
- ---
653
-
654
- ## Use as a TypeScript / JavaScript library (no MCP)
655
-
656
- Beyond the MCP server, this package also exports the underlying federal-data
657
- clients as importable modules. Useful if you're building your own SaaS, AI
658
- agent, or CLI and want programmatic access without spawning an MCP server.
659
-
660
- ```bash
661
- npm install @cliwant/mcp-sam-gov
662
- ```
663
-
664
- ```ts
665
- // SAM.gov client
666
- import { SamGovClient } from "@cliwant/mcp-sam-gov/sam-gov";
667
-
668
- const sam = new SamGovClient(); // keyless
669
- const result = await sam.searchOpportunities({ ncode: "541512", limit: 5 });
670
- const opp = await sam.getOpportunity("5ef3db5daeb54099a96d487783a38bd0");
671
- ```
672
-
673
- ```ts
674
- // USAspending wrappers
675
- import * as usas from "@cliwant/mcp-sam-gov/usaspending";
676
-
677
- const recompete = await usas.searchExpiringContracts({
678
- agency: "Department of Veterans Affairs",
679
- naics: "541512",
680
- monthsUntilExpiry: 12,
681
- });
682
- const recipient = await usas.getRecipientProfile("ed02855e-60d7-2540-...-P");
683
- ```
684
-
685
- ```ts
686
- // Federal Register / eCFR / Grants.gov
687
- import * as fedreg from "@cliwant/mcp-sam-gov/federal-register";
688
- import * as ecfr from "@cliwant/mcp-sam-gov/ecfr";
689
- import * as grants from "@cliwant/mcp-sam-gov/grants";
690
-
691
- const farResults = await ecfr.search({ query: "SDVOSB", titleNumber: 48 });
692
- ```
693
-
694
- This is the canonical home for the Cliwant federal-data libraries — there
695
- is no separate library package. Two earlier repos (`govicon-sam-gov` and
696
- `govicon-mcp-sam-gov`) have been archived and consolidated here. All
697
- client code lives in `src/sam-gov/`, `src/usaspending.ts`,
698
- `src/federal-register.ts`, `src/ecfr.ts`, `src/grants.ts`.
699
-
700
- ## License
701
-
702
- MIT — see [LICENSE](./LICENSE).
703
-
704
- ## Disclaimer
705
-
706
- This server uses **publicly available** federal API endpoints. It is not affiliated with the General Services Administration, SAM.gov, USAspending.gov, the Office of the Federal Register, the National Archives, Grants.gov, or any federal agency. Federal procurement, spending, and regulation data is in the public domain.
1
+ <div align="center">
2
+
3
+ # @cliwant/mcp-sam-gov
4
+
5
+ ### **$4 trillion of public federal data, one `npm install` away.**
6
+
7
+ The most comprehensive **keyless-first** MCP server for US federal contracting + spending + regulation + partner vetting. **143 tools across 48 federal data sources** — keyless-first: only 4 sources (Census business-patterns, FRED, BEA, and DOL's data endpoint) need a free key; the other 44 need none. Works today, in any AI agent.
8
+
9
+ [![npm](https://img.shields.io/npm/v/@cliwant/mcp-sam-gov?color=cb3837&label=%40cliwant%2Fmcp-sam-gov&logo=npm)](https://www.npmjs.com/package/@cliwant/mcp-sam-gov)
10
+ [![mcp-registry](https://img.shields.io/badge/MCP%20Registry-active-2ea44f?logo=anthropic)](https://registry.modelcontextprotocol.io/v0/servers?search=cliwant)
11
+ [![Glama score](https://glama.ai/mcp/servers/cliwant/mcp-sam-gov/badges/score.svg)](https://glama.ai/mcp/servers/cliwant/mcp-sam-gov)
12
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
13
+ [![Daily smoke](https://github.com/cliwant/mcp-sam-gov/actions/workflows/daily-smoke.yml/badge.svg)](https://github.com/cliwant/mcp-sam-gov/actions/workflows/daily-smoke.yml)
14
+
15
+ [English](./README.md) · [한국어](./README.ko.md) · [日本語](./README.ja.md)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## See it in action
22
+
23
+ ```text
24
+ 👤 user Find active SAM.gov solicitations under NAICS 541512 closing this month
25
+
26
+ 🤖 Claude → sam_search_opportunities { ncode: "541512", limit: 5 }
27
+ ✓ 47,478 active opportunities indexed
28
+
29
+ • 5ef3db5d… VA Bulk Oxygen Tank Rental closes 2026-05-15 ($1.05M)
30
+ • a000339c… Articulating Boom Lifts closes 2026-05-30 ($310K)
31
+ • be9c24ef… CMOP Hazardous Waste Removal closes 2026-06-12 ($2.7M)
32
+
33
+ 👤 user Pull the SOW + contracting officer for the first one
34
+
35
+ 🤖 Claude → sam_get_opportunity { noticeId: "5ef3db5d…" }
36
+ ✓ Department of Veterans Affairs · Combined Synopsis/Solicitation
37
+ POC: Rebecca Gobble <rebecca.gobble@va.gov> +1-410-642-2411
38
+ Set-aside: Total Small Business
39
+ Attachments: 1 ↓ 36C24526Q0460_1.docx (172 KB)
40
+ SOW preview: "RFQ# 36C24526Q0460 — Bulk Oxygen Tank Rental, Fill, Telemetry…"
41
+ ```
42
+
43
+ **Zero API key. Zero registration. Zero signup.** Just plug it in and ask.
44
+
45
+ ---
46
+
47
+ ## Why this exists
48
+
49
+ | Status quo | With this MCP |
50
+ |---|---|
51
+ | GovWin: $30K-$100K/yr per seat | Free, MIT license |
52
+ | API key registration → wait 24h → quota tier shopping | `npm install` → working in 60s |
53
+ | 5+ separate vendor APIs / scrapers | 1 unified surface, 143 tools across 48 sources |
54
+ | LLMs hallucinate NAICS codes / agency names | Anti-hallucination autocomplete guards built-in |
55
+ | Brittle scraping breaks weekly | Daily live smoke test ([badge above](#)) |
56
+ | Procurement officer → IT ticket → 3-week wait | Claude Desktop double-click install |
57
+
58
+ The federal data this wraps is **public domain**. There is no good reason it should cost a five-figure subscription to query.
59
+
60
+ ---
61
+
62
+ ## What this gives Claude (and other AI agents)
63
+
64
+ | Domain | What you can ask | Sources |
65
+ |---|---|---|
66
+ | 🔍 **Opportunities & solicitations** | "Find SAM.gov solicitations under NAICS 541512 closing this month" — read the SOW, POCs, attachments | SAM.gov, Grants.gov |
67
+ | 💰 **Spending, awards & competition** | "Show me Booz Allen wins at VA last fiscal year; top 10 PSC categories at DoD" | USAspending, FPDS, GAO |
68
+ | 🕵️ **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 |
69
+ | 🛒 **Product safety & recalls** | "Any FDA/NHTSA/CPSC recalls or enforcement against this supplier's products?" | openFDA, NHTSA, CPSC |
70
+ | ⚖️ **Litigation & courts** | "Any Court of Federal Claims bid protests or Federal Circuit opinions involving this contractor?" | CourtListener (Free Law Project) |
71
+ | 🏢 **Nonprofit vendors** | "Pull this nonprofit's IRS-990 financials before we subcontract to it" | IRS 990 (via ProPublica) |
72
+ | 🏥 **Healthcare providers & facilities** | "Medicare utilization & payments for this provider; hospital quality ratings; is this provider on the revocation list?" | CMS (data.cms.gov) |
73
+ | 📈 **Financial disclosure (SEC)** | "Pull this public company's revenue trend and latest 10-K filings" | SEC EDGAR |
74
+ | ⚖️ **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 |
75
+ | 💲 **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 |
76
+ | 🏛 **Lobbying & influence** | "Who lobbies the VA on cybersecurity, and how much do they spend?" | US Senate LDA |
77
+ | 🏥 **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 |
78
+ | 🛡 **Cyber compliance** | "Is this CVE on the CISA KEV must-patch list?" | NVD, CISA KEV |
79
+ | 🌐 **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 |
80
+ | 🎓 **Grants & datasets** | "Cybersecurity grants posted in the last 30 days; discover federal open datasets" | Grants.gov, data.gov |
81
+
82
+ **143 tools across 48 federal data sources — keyless-first: only 4 sources (Census business-patterns, FRED, BEA, and DOL's data endpoint) need a free key; the other 44 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.)
83
+
84
+ ---
85
+
86
+ ## How do I install it? Pick the path that matches you.
87
+
88
+ ### 🟢 Path 1 — Claude Desktop, one-click (no terminal needed)
89
+
90
+ Best for non-developers. Just download a file and double-click.
91
+
92
+ 1. Download **`mcp-sam-gov.mcpb`** from the [latest release](https://github.com/cliwant/mcp-sam-gov/releases/latest).
93
+ 2. Double-click the file. Claude Desktop opens with an "Install Extension" dialog.
94
+ 3. Click **Install**.
95
+ 4. Done. Start a new conversation and ask "Find active SAM.gov opportunities under NAICS 541512".
96
+
97
+ That's it. No PowerShell, no `npm`, nothing.
98
+
99
+ > Requires Claude Desktop ≥ 1.0 (which ships its own Node.js runtime).
100
+
101
+ ### 🟡 Path 2 — Claude Code, one command
102
+
103
+ If you already use Claude Code (the CLI):
104
+
105
+ ```bash
106
+ /plugin install cliwant/mcp-sam-gov
107
+ ```
108
+
109
+ This installs the MCP server **plus** a [SKILL.md](./skills/sam-gov/SKILL.md) workflow guide that teaches Claude when + how to use each of the 143 tools.
110
+
111
+ ### 🔵 Path 3 — Manual install for any MCP host (Codex, Cursor, Continue, Gemini)
112
+
113
+ For Codex CLI / Cursor / Continue / Gemini CLI / anything that speaks MCP:
114
+
115
+ ```bash
116
+ gh repo clone cliwant/mcp-sam-gov
117
+ cd mcp-sam-gov
118
+ npm install --omit=dev
119
+ npm install -g .
120
+ ```
121
+
122
+ After install, the binary `mcp-sam-gov` is on your PATH. Add this to your host config:
123
+
124
+ ```json
125
+ {
126
+ "mcpServers": {
127
+ "sam-gov": {
128
+ "command": "mcp-sam-gov"
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ Specific config locations per host: see [Host configurations](#host-configurations) below.
135
+
136
+ ### ⚪ Path 4 — Direct path (zero install, just point at the file)
137
+
138
+ Skip installation entirely:
139
+
140
+ ```bash
141
+ gh repo clone cliwant/mcp-sam-gov
142
+ cd mcp-sam-gov
143
+ npm install --omit=dev # only runtime deps; dist/ is pre-built
144
+ ```
145
+
146
+ Then point your host config at the absolute path:
147
+
148
+ ```jsonc
149
+ {
150
+ "mcpServers": {
151
+ "sam-gov": {
152
+ "command": "node",
153
+ "args": ["C:\\Users\\you\\mcp-sam-gov\\dist\\server.js"]
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Host configurations
162
+
163
+ ### Claude Desktop
164
+
165
+ `%APPDATA%\Claude\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
166
+
167
+ ```json
168
+ {
169
+ "mcpServers": {
170
+ "sam-gov": { "command": "mcp-sam-gov" }
171
+ }
172
+ }
173
+ ```
174
+
175
+ (Or skip this entirely — use Path 1's `.mcpb` and it auto-configures.)
176
+
177
+ Restart Claude Desktop fully (system tray quit on Windows / Quit menu on macOS), then look for the 🔨 icon. You should see "sam-gov (143 tools)".
178
+
179
+ ### Claude Code
180
+
181
+ Per-project `.mcp.json`:
182
+
183
+ ```json
184
+ { "mcpServers": { "sam-gov": { "command": "mcp-sam-gov" } } }
185
+ ```
186
+
187
+ Or globally:
188
+
189
+ ```bash
190
+ claude mcp add sam-gov mcp-sam-gov
191
+ ```
192
+
193
+ ### Codex CLI
194
+
195
+ `~/.codex/config.toml`:
196
+
197
+ ```toml
198
+ [mcp_servers.sam-gov]
199
+ command = "mcp-sam-gov"
200
+ args = []
201
+ ```
202
+
203
+ ### Cursor
204
+
205
+ Settings → MCP → Add new MCP server:
206
+
207
+ ```json
208
+ { "mcpServers": { "sam-gov": { "command": "mcp-sam-gov" } } }
209
+ ```
210
+
211
+ ### Continue
212
+
213
+ `~/.continue/config.json`:
214
+
215
+ ```json
216
+ {
217
+ "experimental": {
218
+ "modelContextProtocolServer": {
219
+ "transport": { "type": "stdio", "command": "mcp-sam-gov" }
220
+ }
221
+ }
222
+ }
223
+ ```
224
+
225
+ ### Gemini CLI
226
+
227
+ `~/.gemini/settings.json`:
228
+
229
+ ```json
230
+ { "mcpServers": { "sam-gov": { "command": "mcp-sam-gov" } } }
231
+ ```
232
+
233
+ ### Anything else
234
+
235
+ If your host speaks MCP over stdio, point it at `mcp-sam-gov`. No host-specific code.
236
+
237
+ ---
238
+
239
+ ## What questions can I ask?
240
+
241
+ Once installed, you can ask in natural language. The agent picks the right tool sequence automatically.
242
+
243
+ ### Discovery
244
+ - "NAICS 541512 의 메릴랜드 입찰 중 30일 안에 마감되는 것 찾아줘"
245
+ - "Find active SAM.gov solicitations under NAICS 541512, MD only, closing in 30 days"
246
+ - "What's the canonical NAICS code for 'computer systems design'?"
247
+
248
+ ### RFP analysis
249
+ - "Pull noticeId 5ef3db5daeb54099a96d487783a38bd0 — give me the SOW, contracting officer, and attachments"
250
+ - "Show me the full RFP body for that notice"
251
+
252
+ ### Competitive landscape
253
+ - "Top 5 recipients of VA contracts in NAICS 541519 last fiscal year"
254
+ - "Show me Booz Allen's individual awards at DISA"
255
+ - "Who are the sub-contractors on Leidos' VA contracts?"
256
+ - "What's CMS in USAspending? (resolve the abbreviation)"
257
+
258
+ ### Trends & aggregation
259
+ - "How has VA 541512 spending trended over the last 5 fiscal years?"
260
+ - "Top 10 states by federal contracting spend in 541512"
261
+ - "Top PSC categories at DoD by spending"
262
+ - "Federal grant programs in cybersecurity by total $"
263
+
264
+ ### Agency intelligence (capture brief)
265
+ - "Give me a capture brief on VA: mission, FY26 budget breakdown, top sub-agencies"
266
+ - "What's VA's transaction volume for FY25?"
267
+
268
+ ### Recompete radar
269
+ - "VA 541512 contracts expiring in next 12 months over $1M"
270
+ - "Pull period of performance for award CONT_AWD_..."
271
+
272
+ ### Regulatory & legislative
273
+ - "Find FAR sections about SDVOSB set-aside requirements"
274
+ - "Turn this RFP's cited FAR/DFARS clause list into a Section L/M compliance matrix"
275
+ - "What new VA cybersecurity rules were published this quarter?"
276
+ - "Any Federal Register documents on the public-inspection desk from DoD today?"
277
+ - "Search Regulations.gov dockets on 'contractor cybersecurity' and pull the public comments"
278
+ - "Discover federal open datasets about 'wildfire' on data.gov"
279
+ - "Is there a Federal Register doc number 2026-08333? Pull the citation."
280
+
281
+ ### Partner & entity vetting
282
+ - "Screen 'Acme Defense LLC' against the OFAC sanctions list and SAM exclusions"
283
+ - "Look up NPI 1234567890 in NPPES — is this provider active?"
284
+ - "Does this subcontractor have adverse Single Audit findings in the Federal Audit Clearinghouse?"
285
+ - "How healthy is the bank on cert #3510 — risk ratios and quarterly financials?"
286
+ - "Pull this public company's revenue trend and latest 10-K from SEC EDGAR"
287
+ - "Any EPA compliance/enforcement flags for this facility?"
288
+
289
+ ### Compliance & eligibility
290
+ - "What's the SBA small-business size standard for NAICS 541512?"
291
+ - "Search the eCFR for the exact text of a rule"
292
+ - "What's the US import duty rate (HTS) for lithium-ion batteries?"
293
+
294
+ ### Pricing, labor & fiscal
295
+ - "GSA CALC ceiling-rate band for a senior systems analyst"
296
+ - "Find the SCA wage determination for Baltimore County, MD and give me the fringe rates"
297
+ - "How much has CPI-U risen over the last 3 years for an escalation clause?"
298
+ - "What's the current total US public debt (Debt to the Penny)?"
299
+
300
+ ### Cyber
301
+ - "Is CVE-2021-44228 (Log4Shell) on the CISA KEV must-patch list, and what's the due date?"
302
+
303
+ ### Health & research funding
304
+ - "NIH RePORTER projects on mRNA vaccines funded last year"
305
+ - "Recruiting clinical trials for diabetes sponsored by industry"
306
+ - "Industry payments to physicians in CA from the CMS Open Payments Research dataset"
307
+
308
+ ### Grants
309
+ - "Cybersecurity grants posted in the last 30 days"
310
+ - "Pull grant id 361238"
311
+
312
+ ---
313
+
314
+ ## Optional — higher rate limits + archives
315
+
316
+ 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:
317
+
318
+ ```json
319
+ {
320
+ "mcpServers": {
321
+ "sam-gov": {
322
+ "command": "mcp-sam-gov",
323
+ "env": { "SAM_GOV_API_KEY": "your-key-here" }
324
+ }
325
+ }
326
+ }
327
+ ```
328
+
329
+ Get a free key at [sam.gov/SAM/pages/public/searchKeyData.jsf](https://sam.gov/SAM/pages/public/searchKeyData.jsf). The agent doesn't need to know — the key path is transparent.
330
+
331
+ ### `DATA_GOV_API_KEY` — the api.data.gov / api.gsa.gov family
332
+
333
+ A handful of sources ride the shared **api.data.gov** gateway — Congress.gov, GovInfo, Regulations.gov, FAC, NPPES, 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:
334
+
335
+ ```json
336
+ {
337
+ "mcpServers": {
338
+ "sam-gov": {
339
+ "command": "mcp-sam-gov",
340
+ "env": { "DATA_GOV_API_KEY": "your-key-here" }
341
+ }
342
+ }
343
+ }
344
+ ```
345
+
346
+ Get one free (instant, no wait) at [api.data.gov/signup](https://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.
347
+
348
+ ### Keys & higher limits — the full inventory
349
+
350
+ **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.**
351
+
352
+ | Env var | Required? | What it unlocks | Free signup |
353
+ |---|---|---|---|
354
+ | `CENSUS_API_KEY` | **Required** | `census_business_patterns` (no keyless tier — throws without it) | [api.census.gov/data/key_signup.html](https://api.census.gov/data/key_signup.html) |
355
+ | `FRED_API_KEY` | **Required** | the 2 FRED tools (no keyless tier — throw without it) | [fred.stlouisfed.org/docs/api/api_key.html](https://fred.stlouisfed.org/docs/api/api_key.html) |
356
+ | `BEA_API_KEY` | **Required** | `bea_regional_data` (BEA Regional; no keyless tier — throws without it) | [apps.bea.gov/API/signup](https://apps.bea.gov/API/signup/) |
357
+ | `DOL_API_KEY` | **Required for data** | `dol_get_dataset` (DOL enforcement records via `X-API-KEY`; the `dol_list_datasets` catalog is keyless) | [dol.gov/developer](https://dol.gov/developer) |
358
+ | `DATA_GOV_API_KEY` | Optional | higher limits on all api.data.gov sources (Regulations.gov, FAC, NPPES, CMS, data.gov catalog, GSA per-diem) — lifts the shared `DEMO_KEY` cap | [api.data.gov/signup](https://api.data.gov/signup/) |
359
+ | `SAM_GOV_API_KEY` | Optional | authenticated SAM.gov v2 search + the organization-name filter | [open.gsa.gov/api/get-opportunities-public-api](https://open.gsa.gov/api/get-opportunities-public-api/) |
360
+ | `LDA_API_KEY` | Optional | higher rate limit on `lda_search_filings` (Senate LDA lobbying; keyless by default) | [lda.senate.gov/api/register](https://lda.senate.gov/api/register/) |
361
+ | `BLS_API_KEY` | Optional | the BLS v2 tier (~500 queries/day vs keyless ~25/day) | [data.bls.gov/registrationEngine](https://data.bls.gov/registrationEngine/) |
362
+ | `NVD_API_KEY` | Optional | a higher NVD rate limit (`cve_lookup`) | [nvd.nist.gov/developers/request-an-api-key](https://nvd.nist.gov/developers/request-an-api-key) |
363
+ | `OPENFDA_API_KEY` | Optional | higher openFDA rate limit (`openfda_enforcement`, `openfda_device_clearances`; both work keyless) | [open.fda.gov/apis/authentication](https://open.fda.gov/apis/authentication/) |
364
+ | `COURTLISTENER_API_TOKEN` | Optional | higher CourtListener rate limit (`courtlistener_search_opinions`; works keyless) | [courtlistener.com/help/api/rest](https://www.courtlistener.com/help/api/rest/) |
365
+ | `SOCRATA_APP_TOKEN` | Optional | higher Socrata throttling limits | [evergreen.data.socrata.com/signup](https://evergreen.data.socrata.com/signup) |
366
+
367
+ **Two ways to set any key** — pick one:
368
+
369
+ 1. **Host env block** — the `"env": { … }` object shown in the examples above.
370
+ 2. **A `.env` file** in the server's working directory — configure your keys **once**:
371
+ ```
372
+ CENSUS_API_KEY=your-key-here
373
+ FRED_API_KEY=your-key-here
374
+ # optional — raise limits / unlock filters
375
+ SAM_GOV_API_KEY=your-key-here
376
+ ```
377
+ 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.
378
+
379
+ **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.
380
+
381
+ ---
382
+
383
+ ## Found a bug? Want a feature? Report it in one step
384
+
385
+ 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**:
386
+
387
+ - 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.
388
+ - 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.
389
+
390
+ **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.
391
+
392
+ You can also open one directly: [**New issue**](https://github.com/cliwant/mcp-sam-gov/issues/new/choose) bug / feature / wrong-output templates.
393
+
394
+ ## Tool catalog (143 tools)
395
+
396
+ 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.
397
+
398
+ <details>
399
+ <summary><b>Opportunities & solicitations SAM.gov + Grants.gov (10 tools)</b></summary>
400
+
401
+ - `sam_search_opportunities` — keyless HAL search of active SAM.gov contracting opportunities
402
+ - `sam_search_shaping` — pre-solicitation radar (Sources Sought / Presol / Special Notices before the RFP exists)
403
+ - `sam_get_opportunity` full detail by 32-char hex noticeId (POCs + attachments + body)
404
+ - `sam_fetch_description` — full RFP body as plain text
405
+ - `sam_fetch_attachment_text` — extract attachment text (RFP / SOW / Q&A / wage tables) from PDF + DOCX + text/HTML
406
+ - `sam_attachment_url` — build the public download URL for an attachment resourceId
407
+ - `sam_lookup_organization` — federal-organization id canonical fullParentPathName
408
+ - `sam_lookup_notice_fields` — batch-fill nulled naics/set-aside/PoP/deadline for 1–100 noticeIds from the opt-in GSA daily CSV
409
+ - `grants_search` — Grants.gov federal grant opportunities (financial assistance, distinct from SAM contracts)
410
+ - `grants_get_opportunity` — full detail for a single grant opportunity by id
411
+ </details>
412
+
413
+ <details>
414
+ <summary><b>Spending, awards & competition USAspending + FPDS + GAO (31 tools)</b></summary>
415
+
416
+ - `usas_search_awards` — aggregate share-of-wallet at agency × NAICS
417
+ - `usas_search_individual_awards` — line-item federal contracts (returns generatedInternalId)
418
+ - `usas_get_award_detail` — full award detail: period of performance, options, set-aside, competition
419
+ - `usas_search_awards_by_recipient` — every contract a recipient won in an agency × NAICS slice
420
+ - `usas_search_subawards` — enumerate subcontracts on prime awards (supply chain / teaming)
421
+ - `usas_search_recompetes` — recompete radar (PoP ending in a window, soonest-first, no silent drops)
422
+ - `usas_search_expiring_contracts` — **deprecated** alias of `usas_search_recompetes` (legacy shape)
423
+ - `usas_analyze_incumbent` — per-award incumbent + public recompete-pressure hints (labels, not a score)
424
+ - `usas_search_teaming_partners` — small-business teaming discovery by cert × NAICS × agency, exclusion-screened
425
+ - `usas_spending_over_time` — contract-spending time series (fiscal_year / quarter / month)
426
+ - `usas_search_agency_spending` — spending broken down by awarding agency
427
+ - `usas_search_subagency_spending` — break a parent agency down by sub-agency / office
428
+ - `usas_search_psc_spending` — spending by Product Service Code (PSC)
429
+ - `usas_search_cfda_spending` — spending by CFDA grant-program code
430
+ - `usas_search_state_spending` — spending by state / territory
431
+ - `usas_search_federal_account_spending` — spending by federal account / Treasury Account Symbol (TAS)
432
+ - `usas_search_recipients` — recipient list with parent/child hierarchy
433
+ - `usas_get_recipient_profile` — full recipient detail (UEI, alternate names, totals)
434
+ - `usas_get_agency_profile` — agency profile by toptier code (mission, abbreviation, website)
435
+ - `usas_get_agency_awards_summary` — award activity for a fiscal year (transaction count + obligations)
436
+ - `usas_get_agency_budget_function` — budget-function breakdown for an agency × fiscal year
437
+ - `usas_list_toptier_agencies`all toptier agencies + current-FY obligations
438
+ - `usas_lookup_agency` — resolve 'VA' / 'DHS' → canonical toptier name + 4-digit code
439
+ - `usas_autocomplete_naics` — anti-hallucination NAICS guard
440
+ - `usas_autocomplete_recipient` — anti-hallucination recipient guard
441
+ - `usas_naics_hierarchy` — navigate the NAICS tree (2→4→6) + active-contract count per code
442
+ - `usas_glossary` — 151 federal-spending terms
443
+ - `usas_list_disaster_codes` — list Disaster Emergency Fund Codes (DEFC): COVID-19, IIJA/infrastructure, and other emergency-appropriation tags
444
+ - `usas_disaster_spending` — disaster/emergency-fund spending BY GEOGRAPHY for given DEFCs (which state/county/district captured COVID/IIJA relief money)
445
+ - `fpds_search_awards` — FPDS-NG federal contract award actions (the authoritative award-action feed)
446
+ - `gao_protest_lookup` — recent GAO bid-protest decisions from the public Legal-Products RSS feed (recent window only)
447
+ </details>
448
+
449
+ <details>
450
+ <summary><b>Entity & partner vetting OFAC · SAM · FAC · FDIC · EPA (15 tools)</b></summary>
451
+
452
+ - `ofac_screen_entity` — keyless OFAC denied-party / sanctions screening
453
+ - `sam_check_exclusions` — keyless SAM debarment/exclusion screening by name and/or UEI/CAGE
454
+ - `sam_integrity_lookup` — one-call integrity screen (exclusion verdict + honest FAPIIS pointer)
455
+ - `fac_search_audits` — Single Audit summaries from the Federal Audit Clearinghouse
456
+ - `fac_get_findings` — drill into the audit-RISK findings for an entity
457
+ - `fdic_search_institutions`search the FDIC-insured-institution directory
458
+ - `fdic_institution_financials` — quarterly financial time-series for one institution (by cert #)
459
+ - `fdic_risk_ratios` — counterparty risk ratios for one institution
460
+ - `fdic_institution_history` — structural-change event log (mergers, charter changes)
461
+ - `fdic_branch_deposits` — branch-deposit footprint
462
+ - `fdic_bank_failures` — historical bank failures & assistance transactions
463
+ - `fdic_industry_summary` — industry & state banking-sector annual aggregates
464
+ - `echo_search_facilities` — search EPA-regulated facilities by state with compliance/enforcement screening
465
+ - `echo_facility_report` — EPA ECHO Detailed Facility Report for one facility (by FRS RegistryID)
466
+ - `epa_tri_facilities` — EPA Envirofacts TRI (Toxics Release Inventory) facilities by state/industry (environmental / ESG vetting)
467
+ </details>
468
+
469
+ <details>
470
+ <summary><b>Product safety & recalls — openFDA · NHTSA · CPSC (6 tools)</b></summary>
471
+
472
+ - `openfda_enforcement` — FDA drug / device / food recalls & enforcement actions (product-safety supplier vetting)
473
+ - `openfda_device_clearances`FDA 510(k) medical-device clearances (device-maker capability check)
474
+ - `openfda_drug_approvals` — openFDA Drugs@FDA drug-approval applications (sponsor, approved products, submission/approval history)
475
+ - `nhtsa_recalls` — NHTSA vehicle recalls by make / model / year
476
+ - `nhtsa_complaints` — NHTSA vehicle safety complaints by make / model / year
477
+ - `cpsc_recalls` — CPSC consumer-product recalls (product supplier vetting)
478
+ </details>
479
+
480
+ <details>
481
+ <summary><b>Litigation & courts — CourtListener (1 tool)</b></summary>
482
+
483
+ - `courtlistener_search_opinions` — US federal court opinions (COFC contract claims / bid protests, Federal Circuit) — data via CourtListener / Free Law Project (disclosed)
484
+ </details>
485
+
486
+ <details>
487
+ <summary><b>Nonprofit vendorsIRS 990 via ProPublica (2 tools)</b></summary>
488
+
489
+ - `nonprofit_search` — IRS-990 nonprofit search by name / state / NTEE — via ProPublica Nonprofit Explorer (disclosed)
490
+ - `nonprofit_financials` — IRS-990 nonprofit financials by EIN — via ProPublica Nonprofit Explorer (disclosed)
491
+ </details>
492
+
493
+ <details>
494
+ <summary><b>Financial disclosure — SEC EDGAR (8 tools)</b></summary>
495
+
496
+ - `edgar_lookup_cik` — resolve a company ticker or name to its 10-digit SEC CIK
497
+ - `edgar_company_filings` — a company's SEC filings
498
+ - `edgar_company_facts` — curated XBRL financial facts for a filer
499
+ - `edgar_company_concept` — one filer × one XBRL concept × the complete reported time-series
500
+ - `edgar_xbrl_frames` — cross-filer XBRL cross-section (one concept across all filers for a period)
501
+ - `edgar_full_text_search` — full-text search across EDGAR filings, 2001–present
502
+ - `edgar_filing_index` — bulk cross-filer filing index for a quarter
503
+ - `edgar_daily_filing_index` — per-day cross-filer filing index
504
+ </details>
505
+
506
+ <details>
507
+ <summary><b>Regulatory & legislative Federal Register · Regulations.gov · eCFR · FAR · Congress · GovInfo (18 tools)</b></summary>
508
+
509
+ - `fed_register_search_documents` — search Federal Register documents by query / agency / type / date
510
+ - `fed_register_get_document` — full detail for a document by number (citation, body URL, CFR refs)
511
+ - `fed_register_public_inspection` — the Federal Register public-inspection desk (pre-publication)
512
+ - `fed_register_list_agencies` — Federal Register agency slugs reference
513
+ - `regulations_search_dockets` — search Regulations.gov rulemaking dockets
514
+ - `regulations_search_documents` — search Regulations.gov rulemaking documents (rules, proposed rules, notices)
515
+ - `regulations_search_comments` — search public comments on rulemakings
516
+ - `regulations_get_docket`fetch one Regulations.gov docket by id
517
+ - `ecfr_search` — full-text search across the entire CFR (titleNumber=48 for FAR)
518
+ - `ecfr_list_titles` — all 50 CFR titles + last-amended dates
519
+ - `far_clause_lookup` — authoritative FAR/DFARS clause text + its prescription (exact clause number)
520
+ - `far_search` — FAR/DFARS-scoped search (excludes GSAM, collapses to current in-force version)
521
+ - `far_compliance_matrix` — cited-clause list proposal-ready Section L/M compliance matrix (eligibility gates flagged)
522
+ - `congress_search_bills` — search Congress.gov bills / legislation
523
+ - `congress_get_bill` — one bill by congress / type / number
524
+ - `govinfo_search_packages` — search GovInfo (GPO-authoritative) packages in a collection
525
+ - `govinfo_get_package` — one GovInfo package summary + download links (txt/xml/pdf/mods)
526
+ - `govinfo_list_collections` — the GovInfo collection catalog
527
+ </details>
528
+
529
+ <details>
530
+ <summary><b>Pricing, labor & fiscal GSA CALC · SAM WDs · BLS · Census CBP · FRED · BEA · US Treasury · GSA per-diem (15 tools)</b></summary>
531
+
532
+ - `gsa_benchmark_labor_rates` — GSA CALC awarded ceiling-rate market band for a labor category (a distribution, not one price)
533
+ - `sam_search_wage_determinations` — find SCA / Davis-Bacon wage determinations for a locality
534
+ - `sam_get_wage_rates` — prevailing-wage + fringe / H&W rate table parsed from a WD, plus the EO minimum-wage floor
535
+ - `bls_timeseries` — BLS time series (CPI-U / ECI escalation, PPI, employment) — the pricing/escalation layer
536
+ - `bls_oews_wages`benchmark occupational wages & employment (BLS OEWS) by area × occupation
537
+ - `bls_qcew` — county × NAICS market size / wages / location quotient (competition density)
538
+ - `treasury_debt_to_penny` — daily total US public debt outstanding (Treasury Fiscal Data)
539
+ - `treasury_avg_interest_rates` — average interest rate the Treasury pays by security type
540
+ - `treasury_monthly_statement` — Monthly Treasury Statement: receipts, outlays, deficit/surplus by month
541
+ - `treasury_query_dataset` — escape-hatch query over 7 confirmed Treasury Fiscal Data datasets
542
+ - `bea_regional_data` — GDP / personal income by industry × geography (BEA Regional; requires free BEA_API_KEY)
543
+ - `census_business_patterns` — establishments / employment / annual payroll by NAICS × geography (Census CBP; requires free CENSUS_API_KEY)
544
+ - `fred_search_series` — search the FRED macroeconomic series catalog (GDP/CPI/rates/unemployment; requires free FRED_API_KEY)
545
+ - `fred_series_observations` — time-series observations for a FRED series (missing valuesnull; requires free FRED_API_KEY)
546
+ - `gsa_perdiem_rates` — federal travel per-diem: monthly lodging + M&IE meals caps by city+state or zip (keyless via DEMO_KEY)
547
+ </details>
548
+
549
+ <details>
550
+ <summary><b>Health & research funding NIH · NSF · ClinicalTrials · CMS · NPPES (9 tools)</b></summary>
551
+
552
+ - `nih_reporter_search_projects` — awarded NIH RePORTER research-grant projects
553
+ - `nsf_search_awards` — awarded NSF research-grant awards
554
+ - `nsf_get_award` — one NSF award by its numeric award id
555
+ - `clinicaltrials_search_studies` — federally-registered clinical studies with sponsor/funder enrichment
556
+ - `clinicaltrials_get_study` — one clinical study by NCT id (incl. brief summary)
557
+ - `clinicaltrials_facet_counts` — exact per-value study-count distribution over the whole registry
558
+ - `cms_search_datasets` — discover CMS Open Payments (Sunshine Act) datasets
559
+ - `cms_query_dataset` — query a CMS Open Payments datastore distribution (industry→physician payments)
560
+ - `nppes_lookup_provider`CMS/HHS NPPES NPI Registry provider lookup
561
+ </details>
562
+
563
+ <details>
564
+ <summary><b>Healthcare providers & facilities — CMS (5 tools)</b></summary>
565
+
566
+ - `cms_medicare_provider_services` — Medicare provider utilization & payments (healthcare market sizing)
567
+ - `cms_hospital_compare`CMS Hospital Compare quality ratings
568
+ - `cms_facility_directory` — CMS nursing-home / home-health / hospice / dialysis facility directories
569
+ - `cms_dmepos_suppliers` — CMS DMEPOS (durable medical equipment) supplier directory + Medicare spend
570
+ - `cms_revoked_providers` — CMS Medicare revocation / exclusion list (provider compliance vetting)
571
+ </details>
572
+
573
+ <details>
574
+ <summary><b>Cyber compliance — NVD + CISA KEV + NIST 800-53 (3 tools)</b></summary>
575
+
576
+ - `cve_lookup` — look up NIST NVD CVE records
577
+ - `cisa_kev_lookup` — filter the CISA Known Exploited Vulnerabilities catalog (binding BOD 22-01 remediation due-dates)
578
+ - `nist_800_53_controls` — NIST SP 800-53 Rev 5 security & privacy controls lookup (FedRAMP/CMMC/RMF requirement text by controlId/family/keyword)
579
+ </details>
580
+
581
+ <details>
582
+ <summary><b>Trade, tariffs & logistics USITC · CBP (2 tools)</b></summary>
583
+
584
+ - `hts_lookup` — US import-tariff classification + duty rates from the USITC Harmonized Tariff Schedule
585
+ - `cbp_border_wait_times` — live CBP land-border commercial-vehicle wait times (Canadian + Mexican ports; freight/logistics)
586
+ </details>
587
+
588
+ <details>
589
+ <summary><b>Geo, disaster & state/local open data — Census · FEMA · NWS · Socrata · CKAN (10 tools)</b></summary>
590
+
591
+ - `census_geocode_address` — resolve a one-line US address → matched address + Census geographies (tract, CD, place)
592
+ - `census_geographies_by_coordinates`resolve a longitude/latitude point → Census geographies
593
+ - `fema_disaster_declarations` — FEMA disaster / emergency declarations by state, type, incident, year
594
+ - `fema_search_public_assistance` — FEMA Public Assistance funded projects
595
+ - `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)
596
+ - `nws_active_alerts` — currently-active NWS weather alerts (watches/warnings/advisories; disaster/climate readiness, pairs with the FEMA tools)
597
+ - `socrata_discover_datasets` — find Socrata dataset 4x4 ids by keyword
598
+ - `socrata_query`query rows from an allowlisted Socrata/SODA open-data portal
599
+ - `ckan_discover_datasets` — find CKAN datastore resource ids by keyword
600
+ - `ckan_query` — query rows from an allowlisted CKAN datastore resource (state/city spend/checkbook)
601
+ </details>
602
+
603
+ <details>
604
+ <summary><b>Dataset & registry discovery — data.gov · get.gov (2 tools)</b></summary>
605
+
606
+ - `datagov_search_datasets` — search the data.gov v4 catalog for federal open datasets across all publishing agencies
607
+ - `search_gov_domains` — CISA get.gov authoritative .gov domain registry (resolve which org owns a .gov domain; enumerate federal agencies + map SLED entities)
608
+ </details>
609
+
610
+ <details>
611
+ <summary><b>Small businessSBA (1 tool)</b></summary>
612
+
613
+ - `sba_size_standard` — SBA small-business size standard for a 6-digit NAICS (set-aside eligibility gate)
614
+ </details>
615
+
616
+ <details>
617
+ <summary><b>Labor compliance — US DOL (2 tools)</b></summary>
618
+
619
+ - `dol_list_datasets` — browse DOL enforcement/compliance datasets (WHD, OFCCP, …) — keyless catalog
620
+ - `dol_get_dataset` fetch DOL enforcement records (WHD wage-hour / OFCCP; requires free DOL_API_KEY)
621
+ </details>
622
+
623
+ <details>
624
+ <summary><b>Lobbying & influenceUS Senate LDA (1 tool)</b></summary>
625
+
626
+ - `lda_search_filings` Senate lobbying filings: who lobbies which agency, on what issue, for how much (keyless)
627
+ </details>
628
+
629
+ <details>
630
+ <summary><b>Server utilities key discovery (1 tool)</b></summary>
631
+
632
+ - `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)
633
+ </details>
634
+
635
+ ---
636
+
637
+ ## Reliability & offline snapshots
638
+
639
+ 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.
640
+
641
+ **Keyless-first, and a down source *throws*.** Every source works with no API key. 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.
642
+
643
+ **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.
644
+
645
+ - **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.
646
+ - **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.
647
+
648
+ ```json
649
+ { "mcpServers": { "sam-gov": { "command": "mcp-sam-gov",
650
+ "env": { "SAMGOV_SNAPSHOT_BASE_URL": "off" } } } }
651
+ ```
652
+
653
+ - **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).
654
+
655
+ - **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.
656
+
657
+ ---
658
+
659
+ ## Troubleshooting
660
+
661
+ | Symptom | Fix |
662
+ |---|---|
663
+ | 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` |
664
+ | `command not found: mcp-sam-gov` | Confirm `npm install -g .` succeeded; check that npm's global bin is on PATH (`npm config get prefix`) |
665
+ | `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. |
666
+ | `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. |
667
+ | `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. |
668
+ | 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. |
669
+ | "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. |
670
+
671
+ ---
672
+
673
+ ## Use as a TypeScript / JavaScript library (no MCP)
674
+
675
+ Beyond the MCP server, this package also exports the underlying federal-data
676
+ clients as importable modules. Useful if you're building your own SaaS, AI
677
+ agent, or CLI and want programmatic access without spawning an MCP server.
678
+
679
+ ```bash
680
+ npm install @cliwant/mcp-sam-gov
681
+ ```
682
+
683
+ ```ts
684
+ // SAM.gov client
685
+ import { SamGovClient } from "@cliwant/mcp-sam-gov/sam-gov";
686
+
687
+ const sam = new SamGovClient(); // keyless
688
+ const result = await sam.searchOpportunities({ ncode: "541512", limit: 5 });
689
+ const opp = await sam.getOpportunity("5ef3db5daeb54099a96d487783a38bd0");
690
+ ```
691
+
692
+ ```ts
693
+ // USAspending wrappers
694
+ import * as usas from "@cliwant/mcp-sam-gov/usaspending";
695
+
696
+ const recompete = await usas.searchExpiringContracts({
697
+ agency: "Department of Veterans Affairs",
698
+ naics: "541512",
699
+ monthsUntilExpiry: 12,
700
+ });
701
+ const recipient = await usas.getRecipientProfile("ed02855e-60d7-2540-...-P");
702
+ ```
703
+
704
+ ```ts
705
+ // Federal Register / eCFR / Grants.gov
706
+ import * as fedreg from "@cliwant/mcp-sam-gov/federal-register";
707
+ import * as ecfr from "@cliwant/mcp-sam-gov/ecfr";
708
+ import * as grants from "@cliwant/mcp-sam-gov/grants";
709
+
710
+ const farResults = await ecfr.search({ query: "SDVOSB", titleNumber: 48 });
711
+ ```
712
+
713
+ This is the canonical home for the Cliwant federal-data libraries — there
714
+ is no separate library package. Two earlier repos (`govicon-sam-gov` and
715
+ `govicon-mcp-sam-gov`) have been archived and consolidated here. All
716
+ client code lives in `src/sam-gov/`, `src/usaspending.ts`,
717
+ `src/federal-register.ts`, `src/ecfr.ts`, `src/grants.ts`.
718
+
719
+ ## License
720
+
721
+ MIT — see [LICENSE](./LICENSE).
722
+
723
+ ## Disclaimer
724
+
725
+ This server uses **publicly available** federal API endpoints. It is not affiliated with the General Services Administration, SAM.gov, USAspending.gov, the Office of the Federal Register, the National Archives, Grants.gov, or any federal agency. Federal procurement, spending, and regulation data is in the public domain.