@cliwant/mcp-sam-gov 0.3.0 → 1.0.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.
- package/LICENSE +21 -21
- package/README.ja.md +48 -16
- package/README.ko.md +48 -16
- package/README.md +226 -64
- package/dist/attachments.d.ts +63 -0
- package/dist/attachments.d.ts.map +1 -0
- package/dist/attachments.js +576 -0
- package/dist/attachments.js.map +1 -0
- package/dist/bls.d.ts +267 -0
- package/dist/bls.d.ts.map +1 -0
- package/dist/bls.js +1549 -0
- package/dist/bls.js.map +1 -0
- package/dist/cache.d.ts +2 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +4 -0
- package/dist/cache.js.map +1 -1
- package/dist/census.d.ts +182 -0
- package/dist/census.d.ts.map +1 -0
- package/dist/census.js +576 -0
- package/dist/census.js.map +1 -0
- package/dist/ckan.d.ts +141 -0
- package/dist/ckan.d.ts.map +1 -0
- package/dist/ckan.js +393 -0
- package/dist/ckan.js.map +1 -0
- package/dist/clinicaltrials.d.ts +180 -0
- package/dist/clinicaltrials.d.ts.map +1 -0
- package/dist/clinicaltrials.js +730 -0
- package/dist/clinicaltrials.js.map +1 -0
- package/dist/cms.d.ts +140 -0
- package/dist/cms.d.ts.map +1 -0
- package/dist/cms.js +482 -0
- package/dist/cms.js.map +1 -0
- package/dist/coerce.d.ts +32 -0
- package/dist/coerce.d.ts.map +1 -0
- package/dist/coerce.js +50 -0
- package/dist/coerce.js.map +1 -0
- package/dist/datagov-catalog.d.ts +84 -0
- package/dist/datagov-catalog.d.ts.map +1 -0
- package/dist/datagov-catalog.js +233 -0
- package/dist/datagov-catalog.js.map +1 -0
- package/dist/datagov.d.ts +146 -0
- package/dist/datagov.d.ts.map +1 -0
- package/dist/datagov.js +689 -0
- package/dist/datagov.js.map +1 -0
- package/dist/datagovKey.d.ts +36 -0
- package/dist/datagovKey.d.ts.map +1 -0
- package/dist/datagovKey.js +60 -0
- package/dist/datagovKey.js.map +1 -0
- package/dist/datasource.d.ts +313 -0
- package/dist/datasource.d.ts.map +1 -0
- package/dist/datasource.js +551 -0
- package/dist/datasource.js.map +1 -0
- package/dist/disclosure.d.ts +55 -0
- package/dist/disclosure.d.ts.map +1 -0
- package/dist/disclosure.js +57 -0
- package/dist/disclosure.js.map +1 -0
- package/dist/ecfr.d.ts +4 -2
- package/dist/ecfr.d.ts.map +1 -1
- package/dist/ecfr.js +74 -1
- package/dist/ecfr.js.map +1 -1
- package/dist/echo.d.ts +143 -0
- package/dist/echo.d.ts.map +1 -0
- package/dist/echo.js +424 -0
- package/dist/echo.js.map +1 -0
- package/dist/edgar.d.ts +377 -0
- package/dist/edgar.d.ts.map +1 -0
- package/dist/edgar.js +2418 -0
- package/dist/edgar.js.map +1 -0
- package/dist/errors.d.ts +26 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +69 -1
- package/dist/errors.js.map +1 -1
- package/dist/fac.d.ts +180 -0
- package/dist/fac.d.ts.map +1 -0
- package/dist/fac.js +416 -0
- package/dist/fac.js.map +1 -0
- package/dist/far.d.ts +170 -0
- package/dist/far.d.ts.map +1 -0
- package/dist/far.js +804 -0
- package/dist/far.js.map +1 -0
- package/dist/fdic.d.ts +599 -0
- package/dist/fdic.d.ts.map +1 -0
- package/dist/fdic.js +1624 -0
- package/dist/fdic.js.map +1 -0
- package/dist/federal-register.d.ts +139 -2
- package/dist/federal-register.d.ts.map +1 -1
- package/dist/federal-register.js +419 -3
- package/dist/federal-register.js.map +1 -1
- package/dist/fema.d.ts +181 -0
- package/dist/fema.d.ts.map +1 -0
- package/dist/fema.js +436 -0
- package/dist/fema.js.map +1 -0
- package/dist/fpds.d.ts +108 -0
- package/dist/fpds.d.ts.map +1 -0
- package/dist/fpds.js +519 -0
- package/dist/fpds.js.map +1 -0
- package/dist/gao.d.ts +64 -0
- package/dist/gao.d.ts.map +1 -0
- package/dist/gao.js +640 -0
- package/dist/gao.js.map +1 -0
- package/dist/govinfo.d.ts +111 -0
- package/dist/govinfo.d.ts.map +1 -0
- package/dist/govinfo.js +422 -0
- package/dist/govinfo.js.map +1 -0
- package/dist/grants.d.ts +27 -4
- package/dist/grants.d.ts.map +1 -1
- package/dist/grants.js +111 -6
- package/dist/grants.js.map +1 -1
- package/dist/gsa-csv.d.ts +249 -0
- package/dist/gsa-csv.d.ts.map +1 -0
- package/dist/gsa-csv.js +784 -0
- package/dist/gsa-csv.js.map +1 -0
- package/dist/integrity.d.ts +212 -0
- package/dist/integrity.d.ts.map +1 -0
- package/dist/integrity.js +707 -0
- package/dist/integrity.js.map +1 -0
- package/dist/meta.d.ts +165 -0
- package/dist/meta.d.ts.map +1 -0
- package/dist/meta.js +162 -0
- package/dist/meta.js.map +1 -0
- package/dist/nih.d.ts +117 -0
- package/dist/nih.d.ts.map +1 -0
- package/dist/nih.js +291 -0
- package/dist/nih.js.map +1 -0
- package/dist/nppes.d.ts +157 -0
- package/dist/nppes.d.ts.map +1 -0
- package/dist/nppes.js +648 -0
- package/dist/nppes.js.map +1 -0
- package/dist/nsf.d.ts +176 -0
- package/dist/nsf.d.ts.map +1 -0
- package/dist/nsf.js +554 -0
- package/dist/nsf.js.map +1 -0
- package/dist/nvd.d.ts +176 -0
- package/dist/nvd.d.ts.map +1 -0
- package/dist/nvd.js +912 -0
- package/dist/nvd.js.map +1 -0
- package/dist/ofac.d.ts +205 -0
- package/dist/ofac.d.ts.map +1 -0
- package/dist/ofac.js +919 -0
- package/dist/ofac.js.map +1 -0
- package/dist/pricing.d.ts +110 -0
- package/dist/pricing.d.ts.map +1 -0
- package/dist/pricing.js +843 -0
- package/dist/pricing.js.map +1 -0
- package/dist/sam-gov/client.d.ts +60 -2
- package/dist/sam-gov/client.d.ts.map +1 -1
- package/dist/sam-gov/client.js +320 -54
- package/dist/sam-gov/client.js.map +1 -1
- package/dist/sam-gov/index.d.ts +1 -1
- package/dist/sam-gov/index.d.ts.map +1 -1
- package/dist/sam-gov/index.js +1 -1
- package/dist/sam-gov/index.js.map +1 -1
- package/dist/sam-gov/types.d.ts +24 -0
- package/dist/sam-gov/types.d.ts.map +1 -1
- package/dist/sba.d.ts +72 -0
- package/dist/sba.d.ts.map +1 -0
- package/dist/sba.js +281 -0
- package/dist/sba.js.map +1 -0
- package/dist/server.d.ts +14 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3889 -296
- package/dist/server.js.map +1 -1
- package/dist/snapshot.d.ts +98 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +146 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/socrata.d.ts +157 -0
- package/dist/socrata.d.ts.map +1 -0
- package/dist/socrata.js +448 -0
- package/dist/socrata.js.map +1 -0
- package/dist/treasury.d.ts +143 -0
- package/dist/treasury.d.ts.map +1 -0
- package/dist/treasury.js +436 -0
- package/dist/treasury.js.map +1 -0
- package/dist/usaspending.d.ts +260 -65
- package/dist/usaspending.d.ts.map +1 -1
- package/dist/usaspending.js +1629 -201
- package/dist/usaspending.js.map +1 -1
- package/dist/usitc.d.ts +142 -0
- package/dist/usitc.d.ts.map +1 -0
- package/dist/usitc.js +339 -0
- package/dist/usitc.js.map +1 -0
- package/package.json +24 -2
- package/src/attachments.ts +652 -0
- package/src/bls.ts +1943 -0
- package/src/cache.ts +5 -0
- package/src/census.ts +735 -0
- package/src/ckan.ts +495 -0
- package/src/clinicaltrials.ts +923 -0
- package/src/cms.ts +634 -0
- package/src/coerce.ts +47 -0
- package/src/datagov-catalog.ts +296 -0
- package/src/datagov.ts +907 -0
- package/src/datagovKey.ts +68 -0
- package/src/datasource.ts +721 -0
- package/src/disclosure.ts +61 -0
- package/src/ecfr.ts +98 -1
- package/src/echo.ts +496 -0
- package/src/edgar.ts +3014 -0
- package/src/errors.ts +84 -1
- package/src/fac.ts +529 -0
- package/src/far.ts +1007 -0
- package/src/fdic.ts +2052 -0
- package/src/federal-register.ts +512 -3
- package/src/fema.ts +541 -0
- package/src/fpds.ts +620 -0
- package/src/gao.ts +744 -0
- package/src/govinfo.ts +497 -0
- package/src/grants.ts +139 -7
- package/src/gsa-csv.ts +992 -0
- package/src/integrity.ts +928 -0
- package/src/meta.ts +292 -0
- package/src/nih.ts +375 -0
- package/src/nppes.ts +834 -0
- package/src/nsf.ts +706 -0
- package/src/nvd.ts +1124 -0
- package/src/ofac.ts +1166 -0
- package/src/pricing.ts +1075 -0
- package/src/sam-gov/client.ts +345 -63
- package/src/sam-gov/index.ts +5 -1
- package/src/sam-gov/types.ts +22 -0
- package/src/sba.ts +357 -0
- package/src/server.ts +4551 -328
- package/src/snapshot.ts +192 -0
- package/src/socrata.ts +532 -0
- package/src/treasury.ts +575 -0
- package/src/usaspending.ts +1946 -214
- package/src/usitc.ts +420 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
### **$4 trillion of public federal data, one `npm install` away.**
|
|
6
6
|
|
|
7
|
-
The most comprehensive **keyless** MCP server for US federal contracting + spending + regulation. **
|
|
7
|
+
The most comprehensive **keyless** MCP server for US federal contracting + spending + regulation + partner vetting. **111 tools across 31 keyless federal data sources** that work today, in any AI agent.
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@cliwant/mcp-sam-gov)
|
|
10
10
|
[](https://registry.modelcontextprotocol.io/v0/servers?search=cliwant)
|
|
@@ -50,7 +50,7 @@ The most comprehensive **keyless** MCP server for US federal contracting + spend
|
|
|
50
50
|
|---|---|
|
|
51
51
|
| GovWin: $30K-$100K/yr per seat | Free, MIT license |
|
|
52
52
|
| API key registration → wait 24h → quota tier shopping | `npm install` → working in 60s |
|
|
53
|
-
| 5 separate vendor APIs / scrapers | 1 unified surface,
|
|
53
|
+
| 5+ separate vendor APIs / scrapers | 1 unified surface, 111 tools across 31 sources |
|
|
54
54
|
| LLMs hallucinate NAICS codes / agency names | Anti-hallucination autocomplete guards built-in |
|
|
55
55
|
| Brittle scraping breaks weekly | Daily live smoke test ([badge above](#)) |
|
|
56
56
|
| Procurement officer → IT ticket → 3-week wait | Claude Desktop double-click install |
|
|
@@ -61,19 +61,20 @@ The federal data this wraps is **public domain**. There is no good reason it sho
|
|
|
61
61
|
|
|
62
62
|
## What this gives Claude (and other AI agents)
|
|
63
63
|
|
|
64
|
-
| Domain | What you can ask |
|
|
64
|
+
| Domain | What you can ask | Sources |
|
|
65
65
|
|---|---|---|
|
|
66
|
-
| 🔍 **
|
|
67
|
-
| 💰 **
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
|
|
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" | OFAC, SAM, FAC, FDIC, EPA ECHO |
|
|
69
|
+
| 📈 **Financial disclosure (SEC)** | "Pull this public company's revenue trend and latest 10-K filings" | SEC EDGAR |
|
|
70
|
+
| ⚖️ **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 |
|
|
71
|
+
| 💲 **Pricing, labor & fiscal** | "GSA CALC labor-rate band for a systems analyst; SCA wage determination for this county; CPI escalation" | GSA CALC, SAM WDs, BLS, US Treasury |
|
|
72
|
+
| 🏥 **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 |
|
|
73
|
+
| 🛡 **Cyber compliance** | "Is this CVE on the CISA KEV must-patch list?" | NVD, CISA KEV |
|
|
74
|
+
| 🌐 **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 |
|
|
75
|
+
| 🎓 **Grants & datasets** | "Cybersecurity grants posted in the last 30 days; discover federal open datasets" | Grants.gov, data.gov |
|
|
76
|
+
|
|
77
|
+
**111 tools across 31 keyless federal data sources. Zero API keys.** (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.)
|
|
77
78
|
|
|
78
79
|
---
|
|
79
80
|
|
|
@@ -100,7 +101,7 @@ If you already use Claude Code (the CLI):
|
|
|
100
101
|
/plugin install cliwant/mcp-sam-gov
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
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
|
|
104
|
+
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 111 tools.
|
|
104
105
|
|
|
105
106
|
### 🔵 Path 3 — Manual install for any MCP host (Codex, Cursor, Continue, Gemini)
|
|
106
107
|
|
|
@@ -168,7 +169,7 @@ Then point your host config at the absolute path:
|
|
|
168
169
|
|
|
169
170
|
(Or skip this entirely — use Path 1's `.mcpb` and it auto-configures.)
|
|
170
171
|
|
|
171
|
-
Restart Claude Desktop fully (system tray quit on Windows / Quit menu on macOS), then look for the 🔨 icon. You should see "sam-gov (
|
|
172
|
+
Restart Claude Desktop fully (system tray quit on Windows / Quit menu on macOS), then look for the 🔨 icon. You should see "sam-gov (111 tools)".
|
|
172
173
|
|
|
173
174
|
### Claude Code
|
|
174
175
|
|
|
@@ -263,11 +264,42 @@ Once installed, you can ask in natural language. The agent picks the right tool
|
|
|
263
264
|
- "VA 541512 contracts expiring in next 12 months over $1M"
|
|
264
265
|
- "Pull period of performance for award CONT_AWD_..."
|
|
265
266
|
|
|
266
|
-
### Regulatory
|
|
267
|
+
### Regulatory & legislative
|
|
267
268
|
- "Find FAR sections about SDVOSB set-aside requirements"
|
|
269
|
+
- "Turn this RFP's cited FAR/DFARS clause list into a Section L/M compliance matrix"
|
|
268
270
|
- "What new VA cybersecurity rules were published this quarter?"
|
|
271
|
+
- "Any Federal Register documents on the public-inspection desk from DoD today?"
|
|
272
|
+
- "Search Regulations.gov dockets on 'contractor cybersecurity' and pull the public comments"
|
|
273
|
+
- "Discover federal open datasets about 'wildfire' on data.gov"
|
|
269
274
|
- "Is there a Federal Register doc number 2026-08333? Pull the citation."
|
|
270
275
|
|
|
276
|
+
### Partner & entity vetting
|
|
277
|
+
- "Screen 'Acme Defense LLC' against the OFAC sanctions list and SAM exclusions"
|
|
278
|
+
- "Look up NPI 1234567890 in NPPES — is this provider active?"
|
|
279
|
+
- "Does this subcontractor have adverse Single Audit findings in the Federal Audit Clearinghouse?"
|
|
280
|
+
- "How healthy is the bank on cert #3510 — risk ratios and quarterly financials?"
|
|
281
|
+
- "Pull this public company's revenue trend and latest 10-K from SEC EDGAR"
|
|
282
|
+
- "Any EPA compliance/enforcement flags for this facility?"
|
|
283
|
+
|
|
284
|
+
### Compliance & eligibility
|
|
285
|
+
- "What's the SBA small-business size standard for NAICS 541512?"
|
|
286
|
+
- "Search the eCFR for the exact text of a rule"
|
|
287
|
+
- "What's the US import duty rate (HTS) for lithium-ion batteries?"
|
|
288
|
+
|
|
289
|
+
### Pricing, labor & fiscal
|
|
290
|
+
- "GSA CALC ceiling-rate band for a senior systems analyst"
|
|
291
|
+
- "Find the SCA wage determination for Baltimore County, MD and give me the fringe rates"
|
|
292
|
+
- "How much has CPI-U risen over the last 3 years for an escalation clause?"
|
|
293
|
+
- "What's the current total US public debt (Debt to the Penny)?"
|
|
294
|
+
|
|
295
|
+
### Cyber
|
|
296
|
+
- "Is CVE-2021-44228 (Log4Shell) on the CISA KEV must-patch list, and what's the due date?"
|
|
297
|
+
|
|
298
|
+
### Health & research funding
|
|
299
|
+
- "NIH RePORTER projects on mRNA vaccines funded last year"
|
|
300
|
+
- "Recruiting clinical trials for diabetes sponsored by industry"
|
|
301
|
+
- "Industry payments to physicians in CA from the CMS Open Payments Research dataset"
|
|
302
|
+
|
|
271
303
|
### Grants
|
|
272
304
|
- "Cybersecurity grants posted in the last 30 days"
|
|
273
305
|
- "Pull grant id 361238"
|
|
@@ -291,93 +323,223 @@ The MCP server runs **keyless** by default. For higher SAM.gov rate limits + the
|
|
|
291
323
|
|
|
292
324
|
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.
|
|
293
325
|
|
|
326
|
+
### `DATA_GOV_API_KEY` — the api.data.gov / api.gsa.gov family
|
|
327
|
+
|
|
328
|
+
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:
|
|
329
|
+
|
|
330
|
+
```json
|
|
331
|
+
{
|
|
332
|
+
"mcpServers": {
|
|
333
|
+
"sam-gov": {
|
|
334
|
+
"command": "mcp-sam-gov",
|
|
335
|
+
"env": { "DATA_GOV_API_KEY": "your-key-here" }
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
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.
|
|
342
|
+
|
|
294
343
|
---
|
|
295
344
|
|
|
296
|
-
## Tool catalog (
|
|
345
|
+
## Tool catalog (111 tools)
|
|
346
|
+
|
|
347
|
+
Grouped by workflow. Every tool is keyless by default; a handful 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.
|
|
297
348
|
|
|
298
349
|
<details>
|
|
299
|
-
<summary><b>SAM.gov
|
|
350
|
+
<summary><b>Opportunities & solicitations — SAM.gov + Grants.gov (10 tools)</b></summary>
|
|
300
351
|
|
|
301
|
-
- `sam_search_opportunities` — keyless HAL search
|
|
352
|
+
- `sam_search_opportunities` — keyless HAL search of active SAM.gov contracting opportunities
|
|
353
|
+
- `sam_search_shaping` — pre-solicitation radar (Sources Sought / Presol / Special Notices before the RFP exists)
|
|
302
354
|
- `sam_get_opportunity` — full detail by 32-char hex noticeId (POCs + attachments + body)
|
|
303
355
|
- `sam_fetch_description` — full RFP body as plain text
|
|
304
|
-
- `
|
|
305
|
-
- `
|
|
356
|
+
- `sam_fetch_attachment_text` — extract attachment text (RFP / SOW / Q&A / wage tables) from PDF + DOCX + text/HTML
|
|
357
|
+
- `sam_attachment_url` — build the public download URL for an attachment resourceId
|
|
358
|
+
- `sam_lookup_organization` — federal-organization id → canonical fullParentPathName
|
|
359
|
+
- `sam_lookup_notice_fields` — batch-fill nulled naics/set-aside/PoP/deadline for 1–100 noticeIds from the opt-in GSA daily CSV
|
|
360
|
+
- `grants_search` — Grants.gov federal grant opportunities (financial assistance, distinct from SAM contracts)
|
|
361
|
+
- `grants_get_opportunity` — full detail for a single grant opportunity by id
|
|
306
362
|
</details>
|
|
307
363
|
|
|
308
364
|
<details>
|
|
309
|
-
<summary><b>
|
|
310
|
-
|
|
311
|
-
- `usas_search_awards` — share-of-wallet at agency × NAICS
|
|
312
|
-
- `usas_search_individual_awards` — line
|
|
313
|
-
- `
|
|
314
|
-
- `
|
|
315
|
-
- `
|
|
316
|
-
- `
|
|
317
|
-
- `usas_search_expiring_contracts` —
|
|
318
|
-
- `
|
|
365
|
+
<summary><b>Spending, awards & competition — USAspending + FPDS + GAO (29 tools)</b></summary>
|
|
366
|
+
|
|
367
|
+
- `usas_search_awards` — aggregate share-of-wallet at agency × NAICS
|
|
368
|
+
- `usas_search_individual_awards` — line-item federal contracts (returns generatedInternalId)
|
|
369
|
+
- `usas_get_award_detail` — full award detail: period of performance, options, set-aside, competition
|
|
370
|
+
- `usas_search_awards_by_recipient` — every contract a recipient won in an agency × NAICS slice
|
|
371
|
+
- `usas_search_subawards` — enumerate subcontracts on prime awards (supply chain / teaming)
|
|
372
|
+
- `usas_search_recompetes` — recompete radar (PoP ending in a window, soonest-first, no silent drops)
|
|
373
|
+
- `usas_search_expiring_contracts` — **deprecated** alias of `usas_search_recompetes` (legacy shape)
|
|
374
|
+
- `usas_analyze_incumbent` — per-award incumbent + public recompete-pressure hints (labels, not a score)
|
|
375
|
+
- `usas_search_teaming_partners` — small-business teaming discovery by cert × NAICS × agency, exclusion-screened
|
|
376
|
+
- `usas_spending_over_time` — contract-spending time series (fiscal_year / quarter / month)
|
|
377
|
+
- `usas_search_agency_spending` — spending broken down by awarding agency
|
|
378
|
+
- `usas_search_subagency_spending` — break a parent agency down by sub-agency / office
|
|
379
|
+
- `usas_search_psc_spending` — spending by Product Service Code (PSC)
|
|
380
|
+
- `usas_search_cfda_spending` — spending by CFDA grant-program code
|
|
381
|
+
- `usas_search_state_spending` — spending by state / territory
|
|
382
|
+
- `usas_search_federal_account_spending` — spending by federal account / Treasury Account Symbol (TAS)
|
|
383
|
+
- `usas_search_recipients` — recipient list with parent/child hierarchy
|
|
384
|
+
- `usas_get_recipient_profile` — full recipient detail (UEI, alternate names, totals)
|
|
385
|
+
- `usas_get_agency_profile` — agency profile by toptier code (mission, abbreviation, website)
|
|
386
|
+
- `usas_get_agency_awards_summary` — award activity for a fiscal year (transaction count + obligations)
|
|
387
|
+
- `usas_get_agency_budget_function` — budget-function breakdown for an agency × fiscal year
|
|
388
|
+
- `usas_list_toptier_agencies` — all toptier agencies + current-FY obligations
|
|
389
|
+
- `usas_lookup_agency` — resolve 'VA' / 'DHS' → canonical toptier name + 4-digit code
|
|
390
|
+
- `usas_autocomplete_naics` — anti-hallucination NAICS guard
|
|
391
|
+
- `usas_autocomplete_recipient` — anti-hallucination recipient guard
|
|
392
|
+
- `usas_naics_hierarchy` — navigate the NAICS tree (2→4→6) + active-contract count per code
|
|
393
|
+
- `usas_glossary` — 151 federal-spending terms
|
|
394
|
+
- `fpds_search_awards` — FPDS-NG federal contract award actions (the authoritative award-action feed)
|
|
395
|
+
- `gao_protest_lookup` — recent GAO bid-protest decisions from the public Legal-Products RSS feed (recent window only)
|
|
319
396
|
</details>
|
|
320
397
|
|
|
321
398
|
<details>
|
|
322
|
-
<summary><b>
|
|
323
|
-
|
|
324
|
-
- `
|
|
325
|
-
- `
|
|
326
|
-
- `
|
|
327
|
-
- `
|
|
328
|
-
- `
|
|
329
|
-
- `
|
|
399
|
+
<summary><b>Entity & partner vetting — OFAC · SAM · FAC · FDIC · EPA (14 tools)</b></summary>
|
|
400
|
+
|
|
401
|
+
- `ofac_screen_entity` — keyless OFAC denied-party / sanctions screening
|
|
402
|
+
- `sam_check_exclusions` — keyless SAM debarment/exclusion screening by name and/or UEI/CAGE
|
|
403
|
+
- `sam_integrity_lookup` — one-call integrity screen (exclusion verdict + honest FAPIIS pointer)
|
|
404
|
+
- `fac_search_audits` — Single Audit summaries from the Federal Audit Clearinghouse
|
|
405
|
+
- `fac_get_findings` — drill into the audit-RISK findings for an entity
|
|
406
|
+
- `fdic_search_institutions` — search the FDIC-insured-institution directory
|
|
407
|
+
- `fdic_institution_financials` — quarterly financial time-series for one institution (by cert #)
|
|
408
|
+
- `fdic_risk_ratios` — counterparty risk ratios for one institution
|
|
409
|
+
- `fdic_institution_history` — structural-change event log (mergers, charter changes)
|
|
410
|
+
- `fdic_branch_deposits` — branch-deposit footprint
|
|
411
|
+
- `fdic_bank_failures` — historical bank failures & assistance transactions
|
|
412
|
+
- `fdic_industry_summary` — industry & state banking-sector annual aggregates
|
|
413
|
+
- `echo_search_facilities` — search EPA-regulated facilities by state with compliance/enforcement screening
|
|
414
|
+
- `echo_facility_report` — EPA ECHO Detailed Facility Report for one facility (by FRS RegistryID)
|
|
330
415
|
</details>
|
|
331
416
|
|
|
332
417
|
<details>
|
|
333
|
-
<summary><b>
|
|
418
|
+
<summary><b>Financial disclosure — SEC EDGAR (8 tools)</b></summary>
|
|
419
|
+
|
|
420
|
+
- `edgar_lookup_cik` — resolve a company ticker or name to its 10-digit SEC CIK
|
|
421
|
+
- `edgar_company_filings` — a company's SEC filings
|
|
422
|
+
- `edgar_company_facts` — curated XBRL financial facts for a filer
|
|
423
|
+
- `edgar_company_concept` — one filer × one XBRL concept × the complete reported time-series
|
|
424
|
+
- `edgar_xbrl_frames` — cross-filer XBRL cross-section (one concept across all filers for a period)
|
|
425
|
+
- `edgar_full_text_search` — full-text search across EDGAR filings, 2001–present
|
|
426
|
+
- `edgar_filing_index` — bulk cross-filer filing index for a quarter
|
|
427
|
+
- `edgar_daily_filing_index` — per-day cross-filer filing index
|
|
428
|
+
</details>
|
|
334
429
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
430
|
+
<details>
|
|
431
|
+
<summary><b>Regulatory & legislative — Federal Register · Regulations.gov · eCFR · FAR · Congress · GovInfo (18 tools)</b></summary>
|
|
432
|
+
|
|
433
|
+
- `fed_register_search_documents` — search Federal Register documents by query / agency / type / date
|
|
434
|
+
- `fed_register_get_document` — full detail for a document by number (citation, body URL, CFR refs)
|
|
435
|
+
- `fed_register_public_inspection` — the Federal Register public-inspection desk (pre-publication)
|
|
436
|
+
- `fed_register_list_agencies` — Federal Register agency slugs reference
|
|
437
|
+
- `regulations_search_dockets` — search Regulations.gov rulemaking dockets
|
|
438
|
+
- `regulations_search_documents` — search Regulations.gov rulemaking documents (rules, proposed rules, notices)
|
|
439
|
+
- `regulations_search_comments` — search public comments on rulemakings
|
|
440
|
+
- `regulations_get_docket` — fetch one Regulations.gov docket by id
|
|
441
|
+
- `ecfr_search` — full-text search across the entire CFR (titleNumber=48 for FAR)
|
|
442
|
+
- `ecfr_list_titles` — all 50 CFR titles + last-amended dates
|
|
443
|
+
- `far_clause_lookup` — authoritative FAR/DFARS clause text + its prescription (exact clause number)
|
|
444
|
+
- `far_search` — FAR/DFARS-scoped search (excludes GSAM, collapses to current in-force version)
|
|
445
|
+
- `far_compliance_matrix` — cited-clause list → proposal-ready Section L/M compliance matrix (eligibility gates flagged)
|
|
446
|
+
- `congress_search_bills` — search Congress.gov bills / legislation
|
|
447
|
+
- `congress_get_bill` — one bill by congress / type / number
|
|
448
|
+
- `govinfo_search_packages` — search GovInfo (GPO-authoritative) packages in a collection
|
|
449
|
+
- `govinfo_get_package` — one GovInfo package summary + download links (txt/xml/pdf/mods)
|
|
450
|
+
- `govinfo_list_collections` — the GovInfo collection catalog
|
|
338
451
|
</details>
|
|
339
452
|
|
|
340
453
|
<details>
|
|
341
|
-
<summary><b>
|
|
454
|
+
<summary><b>Pricing, labor & fiscal — GSA CALC · SAM WDs · BLS · US Treasury (10 tools)</b></summary>
|
|
455
|
+
|
|
456
|
+
- `gsa_benchmark_labor_rates` — GSA CALC awarded ceiling-rate market band for a labor category (a distribution, not one price)
|
|
457
|
+
- `sam_search_wage_determinations` — find SCA / Davis-Bacon wage determinations for a locality
|
|
458
|
+
- `sam_get_wage_rates` — prevailing-wage + fringe / H&W rate table parsed from a WD, plus the EO minimum-wage floor
|
|
459
|
+
- `bls_timeseries` — BLS time series (CPI-U / ECI escalation, PPI, employment) — the pricing/escalation layer
|
|
460
|
+
- `bls_oews_wages` — benchmark occupational wages & employment (BLS OEWS) by area × occupation
|
|
461
|
+
- `bls_qcew` — county × NAICS market size / wages / location quotient (competition density)
|
|
462
|
+
- `treasury_debt_to_penny` — daily total US public debt outstanding (Treasury Fiscal Data)
|
|
463
|
+
- `treasury_avg_interest_rates` — average interest rate the Treasury pays by security type
|
|
464
|
+
- `treasury_monthly_statement` — Monthly Treasury Statement: receipts, outlays, deficit/surplus by month
|
|
465
|
+
- `treasury_query_dataset` — escape-hatch query over 5 confirmed Treasury Fiscal Data datasets
|
|
466
|
+
</details>
|
|
342
467
|
|
|
343
|
-
|
|
344
|
-
|
|
468
|
+
<details>
|
|
469
|
+
<summary><b>Health & research funding — NIH · NSF · ClinicalTrials · CMS · NPPES (9 tools)</b></summary>
|
|
470
|
+
|
|
471
|
+
- `nih_reporter_search_projects` — awarded NIH RePORTER research-grant projects
|
|
472
|
+
- `nsf_search_awards` — awarded NSF research-grant awards
|
|
473
|
+
- `nsf_get_award` — one NSF award by its numeric award id
|
|
474
|
+
- `clinicaltrials_search_studies` — federally-registered clinical studies with sponsor/funder enrichment
|
|
475
|
+
- `clinicaltrials_get_study` — one clinical study by NCT id (incl. brief summary)
|
|
476
|
+
- `clinicaltrials_facet_counts` — exact per-value study-count distribution over the whole registry
|
|
477
|
+
- `cms_search_datasets` — discover CMS Open Payments (Sunshine Act) datasets
|
|
478
|
+
- `cms_query_dataset` — query a CMS Open Payments datastore distribution (industry→physician payments)
|
|
479
|
+
- `nppes_lookup_provider` — CMS/HHS NPPES NPI Registry provider lookup
|
|
345
480
|
</details>
|
|
346
481
|
|
|
347
482
|
<details>
|
|
348
|
-
<summary><b>
|
|
483
|
+
<summary><b>Cyber compliance — NVD + CISA KEV (2 tools)</b></summary>
|
|
349
484
|
|
|
350
|
-
- `
|
|
351
|
-
- `
|
|
352
|
-
- `usas_naics_hierarchy` — navigate NAICS tree
|
|
353
|
-
- `usas_glossary` — 151 federal-spending terms
|
|
354
|
-
- `usas_list_toptier_agencies` — list all toptier agencies + obligations
|
|
485
|
+
- `cve_lookup` — look up NIST NVD CVE records
|
|
486
|
+
- `cisa_kev_lookup` — filter the CISA Known Exploited Vulnerabilities catalog (binding BOD 22-01 remediation due-dates)
|
|
355
487
|
</details>
|
|
356
488
|
|
|
357
489
|
<details>
|
|
358
|
-
<summary><b>
|
|
490
|
+
<summary><b>Trade & tariffs — USITC (1 tool)</b></summary>
|
|
359
491
|
|
|
360
|
-
- `
|
|
361
|
-
- `fed_register_get_document` — citation, body URL, CFR refs
|
|
362
|
-
- `fed_register_list_agencies` — agency slugs reference
|
|
492
|
+
- `hts_lookup` — US import-tariff classification + duty rates from the USITC Harmonized Tariff Schedule
|
|
363
493
|
</details>
|
|
364
494
|
|
|
365
495
|
<details>
|
|
366
|
-
<summary><b>
|
|
496
|
+
<summary><b>Geo, disaster & state/local open data — Census · FEMA · Socrata · CKAN (8 tools)</b></summary>
|
|
497
|
+
|
|
498
|
+
- `census_geocode_address` — resolve a one-line US address → matched address + Census geographies (tract, CD, place)
|
|
499
|
+
- `census_geographies_by_coordinates` — resolve a longitude/latitude point → Census geographies
|
|
500
|
+
- `fema_disaster_declarations` — FEMA disaster / emergency declarations by state, type, incident, year
|
|
501
|
+
- `fema_search_public_assistance` — FEMA Public Assistance funded projects
|
|
502
|
+
- `socrata_discover_datasets` — find Socrata dataset 4x4 ids by keyword
|
|
503
|
+
- `socrata_query` — query rows from an allowlisted Socrata/SODA open-data portal
|
|
504
|
+
- `ckan_discover_datasets` — find CKAN datastore resource ids by keyword
|
|
505
|
+
- `ckan_query` — query rows from an allowlisted CKAN datastore resource (state/city spend/checkbook)
|
|
506
|
+
</details>
|
|
367
507
|
|
|
368
|
-
|
|
369
|
-
|
|
508
|
+
<details>
|
|
509
|
+
<summary><b>Dataset discovery — data.gov (1 tool)</b></summary>
|
|
510
|
+
|
|
511
|
+
- `datagov_search_datasets` — search the data.gov v4 catalog for federal open datasets across all publishing agencies
|
|
370
512
|
</details>
|
|
371
513
|
|
|
372
514
|
<details>
|
|
373
|
-
<summary><b>
|
|
515
|
+
<summary><b>Small business — SBA (1 tool)</b></summary>
|
|
374
516
|
|
|
375
|
-
- `
|
|
376
|
-
- `grants_get_opportunity` — full grant detail
|
|
517
|
+
- `sba_size_standard` — SBA small-business size standard for a 6-digit NAICS (set-aside eligibility gate)
|
|
377
518
|
</details>
|
|
378
519
|
|
|
379
520
|
---
|
|
380
521
|
|
|
522
|
+
## Reliability & offline snapshots
|
|
523
|
+
|
|
524
|
+
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.
|
|
525
|
+
|
|
526
|
+
**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.
|
|
527
|
+
|
|
528
|
+
**Optional offline snapshots (off 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." For those, you can optionally host a **snapshot mirror**: a static, public-data cache the server reads *only* when the live source is unreachable from your egress. 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. Unset ⇒ pure live, byte-for-byte identical to today's behavior.
|
|
529
|
+
|
|
530
|
+
- **Enable it:** set `SAMGOV_SNAPSHOT_BASE_URL` to the base URL where you host the snapshots. Unset (the default) = live-only, no snapshot path is ever added.
|
|
531
|
+
|
|
532
|
+
```json
|
|
533
|
+
{ "mcpServers": { "sam-gov": { "command": "mcp-sam-gov",
|
|
534
|
+
"env": { "SAMGOV_SNAPSHOT_BASE_URL": "https://your-cdn.example.com/snapshots" } } } }
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
- **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).
|
|
538
|
+
|
|
539
|
+
- **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.
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
381
543
|
## Troubleshooting
|
|
382
544
|
|
|
383
545
|
| Symptom | Fix |
|
|
@@ -412,7 +574,7 @@ const opp = await sam.getOpportunity("5ef3db5daeb54099a96d487783a38bd0");
|
|
|
412
574
|
```
|
|
413
575
|
|
|
414
576
|
```ts
|
|
415
|
-
// USAspending wrappers
|
|
577
|
+
// USAspending wrappers
|
|
416
578
|
import * as usas from "@cliwant/mcp-sam-gov/usaspending";
|
|
417
579
|
|
|
418
580
|
const recompete = await usas.searchExpiringContracts({
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @cliwant/mcp-sam-gov/attachments — read the ACTUAL solicitation document.
|
|
3
|
+
*
|
|
4
|
+
* Why this exists
|
|
5
|
+
* ----------------
|
|
6
|
+
* An AI doing procurement research needs the real RFP/SOW/Q&A/wage-table TEXT,
|
|
7
|
+
* not just the synopsis (`sam_fetch_description`) or metadata. A SAM notice
|
|
8
|
+
* carries ATTACHMENTS (`resourceLinks` → keyless download URLs) that hold the
|
|
9
|
+
* true requirements. The rest of the server exposes those URLs but cannot read
|
|
10
|
+
* them; this module fetches one keyless and returns its extracted text so the
|
|
11
|
+
* agent can analyze the buy.
|
|
12
|
+
*
|
|
13
|
+
* SAM attachments are predominantly PDF (compressed streams / CID fonts — not
|
|
14
|
+
* hand-rollable), so PDF text extraction uses `unpdf` (a single self-contained
|
|
15
|
+
* package that bundles pdfjs; no transitive deps). text/HTML also occur and are
|
|
16
|
+
* decoded/stripped locally. DOCX is a ZIP whose `word/document.xml` holds the
|
|
17
|
+
* body text (deflate-compressed); we parse the ZIP container by hand and inflate
|
|
18
|
+
* that entry with Node's built-in `node:zlib` — NO new dependency. Other
|
|
19
|
+
* binaries are NOT half-parsed — they return `text:null` with an honest note.
|
|
20
|
+
*
|
|
21
|
+
* Truthfulness invariants (a reviewer WILL attack these):
|
|
22
|
+
* - A DOWN fetch (5xx / network / timeout) THROWS `upstream_unavailable`
|
|
23
|
+
* (retryable). A down service is NOT an empty attachment — never `text:""`.
|
|
24
|
+
* - A 404 THROWS `not_found` (the attachment id is gone).
|
|
25
|
+
* - A PDF that fails to parse (encrypted/corrupt) → `text:null` +
|
|
26
|
+
* `extractionError` note — NEVER a crash, NEVER a fake "".
|
|
27
|
+
* - A DOCX that fails to parse (corrupt/not-a-zip/no `word/document.xml`) →
|
|
28
|
+
* `text:null` + a disclosed note — NEVER a crash, NEVER a fake "".
|
|
29
|
+
* - A non-extractable format (binary) → `text:null` + honest note.
|
|
30
|
+
* - SSRF: only sam.gov / api.sam.gov hosts are fetched; anything else →
|
|
31
|
+
* `invalid_input` with NO network call.
|
|
32
|
+
* - `truncated`/`pages` are honest.
|
|
33
|
+
*/
|
|
34
|
+
import { type MetaBundle } from "./meta.js";
|
|
35
|
+
/** The detected document family. */
|
|
36
|
+
export type AttachmentFormat = "pdf" | "docx" | "html" | "text" | "binary";
|
|
37
|
+
/** The tool's success payload (rides in a MetaBundle). */
|
|
38
|
+
export type AttachmentTextData = {
|
|
39
|
+
url: string;
|
|
40
|
+
filename: string | null;
|
|
41
|
+
contentType: string | null;
|
|
42
|
+
format: AttachmentFormat;
|
|
43
|
+
sizeBytes: number;
|
|
44
|
+
pages: number | null;
|
|
45
|
+
text: string | null;
|
|
46
|
+
truncated: boolean;
|
|
47
|
+
extracted: boolean;
|
|
48
|
+
};
|
|
49
|
+
export type FetchAttachmentTextArgs = {
|
|
50
|
+
url: string;
|
|
51
|
+
maxChars?: number;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Fetch a SAM attachment keyless and return its extracted TEXT.
|
|
55
|
+
*
|
|
56
|
+
* See the module header for the truthfulness invariants. Throws a
|
|
57
|
+
* `ToolErrorCarrier` for: bad/non-SAM URL (`invalid_input`, no fetch), a 404
|
|
58
|
+
* (`not_found`), or a down fetch (`upstream_unavailable`, retryable). Otherwise
|
|
59
|
+
* ALWAYS returns a payload — a document we cannot extract yields `text:null` +
|
|
60
|
+
* a disclosed note, never an exception and never a fabricated string.
|
|
61
|
+
*/
|
|
62
|
+
export declare function fetchAttachmentText(args: FetchAttachmentTextArgs): Promise<MetaBundle<AttachmentTextData>>;
|
|
63
|
+
//# sourceMappingURL=attachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAKH,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AA0FtD,oCAAoC;AACpC,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AA8Q3E,0DAA0D;AAC1D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,gBAAgB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAgOzC"}
|