@cliwant/mcp-sam-gov 1.13.2 → 1.15.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/README.ja.md +8 -1
- package/README.ko.md +8 -1
- package/README.md +53 -2
- package/dist/arcgis-feature.d.ts.map +1 -1
- package/dist/arcgis-feature.js +8 -0
- package/dist/arcgis-feature.js.map +1 -1
- package/dist/bls.d.ts.map +1 -1
- package/dist/bls.js +4 -3
- package/dist/bls.js.map +1 -1
- package/dist/bonfire.d.ts +1 -1
- package/dist/bonfire.d.ts.map +1 -1
- package/dist/bonfire.js +15 -11
- package/dist/bonfire.js.map +1 -1
- package/dist/data-map.d.ts +43 -0
- package/dist/data-map.d.ts.map +1 -0
- package/dist/data-map.js +289 -0
- package/dist/data-map.js.map +1 -0
- package/dist/errors.d.ts +6 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +159 -58
- package/dist/server.js.map +1 -1
- package/dist/socrata.d.ts +1 -1
- package/dist/socrata.d.ts.map +1 -1
- package/dist/socrata.js +46 -1
- package/dist/socrata.js.map +1 -1
- package/dist/toolsets.d.ts +111 -0
- package/dist/toolsets.d.ts.map +1 -0
- package/dist/toolsets.js +390 -0
- package/dist/toolsets.js.map +1 -0
- package/package.json +1 -1
- package/src/arcgis-feature.ts +8 -0
- package/src/bls.ts +4 -3
- package/src/bonfire.ts +15 -11
- package/src/data-map.ts +329 -0
- package/src/errors.ts +6 -1
- package/src/server.ts +180 -99
- package/src/socrata.ts +47 -1
- package/src/toolsets.ts +435 -0
package/dist/toolsets.js
ADDED
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toolset profiles for MCP_SAM_GOV_TOOLSETS.
|
|
3
|
+
*
|
|
4
|
+
* Each of the 152 registered tools belongs to exactly one named toolset.
|
|
5
|
+
* A user may load a subset by setting the env var (comma- or space-separated,
|
|
6
|
+
* case-insensitive). Unset or "all" → all 152 tools loaded (default; byte-
|
|
7
|
+
* identical to today's behaviour). Unknown names → stderr warning AND a note
|
|
8
|
+
* in the server instructions; if no valid name remains → fall back to all,
|
|
9
|
+
* with a stderr warning and an instructions note.
|
|
10
|
+
*
|
|
11
|
+
* `feedback` and `api_key_status` are always loaded in every profile.
|
|
12
|
+
* Their toolset mapping is "core" (so a one-set-per-tool mapping is maintained),
|
|
13
|
+
* but `resolveToolsets` always injects them into any profile's loaded set.
|
|
14
|
+
* They are listed in the README table as "always loaded".
|
|
15
|
+
*
|
|
16
|
+
* Available toolsets:
|
|
17
|
+
* core — SAM.gov discovery/awards/wage determinations/exclusions/integrity,
|
|
18
|
+
* Grants.gov, all USAspending, FPDS, GAO, FAR/eCFR/Federal Register,
|
|
19
|
+
* SBA, OFAC, GSA labor-rate benchmarks; api_key_status + feedback
|
|
20
|
+
* (always loaded in every profile)
|
|
21
|
+
* sled — State/local (SLED): OpenGov, Bonfire, ArcGIS, Socrata,
|
|
22
|
+
* data.gov/CKAN, Tableau, Open Checkbook, search.gov domains
|
|
23
|
+
* vetting — Partner due-diligence: FAC, FDIC, EPA ECHO/TRI,
|
|
24
|
+
* CourtListener, nonprofit (IRS 990), Senate LDA lobbying
|
|
25
|
+
* disclosure — SEC EDGAR financial filings and XBRL frames
|
|
26
|
+
* regulatory — Regulations.gov, Congress.gov, GovInfo
|
|
27
|
+
* pricing — GSA per-diem, BLS, Treasury, BEA, Census business-patterns,
|
|
28
|
+
* FRED, DOL, USITC HTS
|
|
29
|
+
* health — CMS, NPPES, NIH, NSF, ClinicalTrials.gov, openFDA
|
|
30
|
+
* safety — NHTSA vehicle recalls, CPSC consumer-product recalls
|
|
31
|
+
* geo — Census geocode, FEMA disasters, NWS alerts, CBP border wait
|
|
32
|
+
* times, data.gov catalog
|
|
33
|
+
* cyber — NVD CVE, CISA KEV, NIST SP 800-53
|
|
34
|
+
*/
|
|
35
|
+
/** Every valid toolset name. */
|
|
36
|
+
export const ALL_TOOLSET_NAMES = [
|
|
37
|
+
"core",
|
|
38
|
+
"sled",
|
|
39
|
+
"vetting",
|
|
40
|
+
"disclosure",
|
|
41
|
+
"regulatory",
|
|
42
|
+
"pricing",
|
|
43
|
+
"health",
|
|
44
|
+
"safety",
|
|
45
|
+
"geo",
|
|
46
|
+
"cyber",
|
|
47
|
+
];
|
|
48
|
+
/**
|
|
49
|
+
* Short 2–4 word description for each toolset, shown in the server instructions
|
|
50
|
+
* when a profile is active so agents know what other sets exist.
|
|
51
|
+
*/
|
|
52
|
+
export const TOOLSET_HINTS = {
|
|
53
|
+
core: "SAM, USAspending, FAR",
|
|
54
|
+
sled: "state/local procurement",
|
|
55
|
+
vetting: "FAC, FDIC, EPA, OFAC",
|
|
56
|
+
disclosure: "SEC EDGAR filings",
|
|
57
|
+
regulatory: "Regs.gov, Congress, GovInfo",
|
|
58
|
+
pricing: "GSA, BLS, Treasury, DOL",
|
|
59
|
+
health: "CMS, NIH, openFDA",
|
|
60
|
+
safety: "NHTSA, CPSC recalls",
|
|
61
|
+
geo: "Census geocode, FEMA, NWS",
|
|
62
|
+
cyber: "CVE, CISA KEV, NIST",
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Tools that are always loaded regardless of the active profile.
|
|
66
|
+
* Their toolset mapping is "core" (one-set-per-tool), but resolveToolsets
|
|
67
|
+
* injects them into every profile's loaded set.
|
|
68
|
+
*/
|
|
69
|
+
export const ALWAYS_LOADED_TOOLS = new Set([
|
|
70
|
+
"feedback",
|
|
71
|
+
"api_key_status",
|
|
72
|
+
]);
|
|
73
|
+
/**
|
|
74
|
+
* Canonical mapping: tool name → toolset.
|
|
75
|
+
* Every registered tool must appear exactly once.
|
|
76
|
+
* Tests enforce: union === all 152 tools, no entry for an unregistered name.
|
|
77
|
+
*
|
|
78
|
+
* After moves (review 2026-09-18):
|
|
79
|
+
* ofac_screen_entity vetting → core (govcon users screen SAM exclusions + OFAC together)
|
|
80
|
+
* gsa_benchmark_labor_rates pricing → core (proposal pricing; needed in core govcon workflows)
|
|
81
|
+
* hts_lookup geo → pricing (tariff/duty data; groups with cost/rate tools)
|
|
82
|
+
*
|
|
83
|
+
* Resulting counts: core=60, sled=13, vetting=16, disclosure=8, regulatory=9,
|
|
84
|
+
* pricing=15, health=17, safety=3, geo=8, cyber=3. Total=152.
|
|
85
|
+
*/
|
|
86
|
+
export const TOOL_TOOLSET_MAP = {
|
|
87
|
+
// ── core (60) ──────────────────────────────────────────────────────────────
|
|
88
|
+
// SAM.gov: discovery, attachments, wage-determinations, exclusions, integrity
|
|
89
|
+
sam_search_opportunities: "core",
|
|
90
|
+
sam_search_shaping: "core",
|
|
91
|
+
sam_get_opportunity: "core",
|
|
92
|
+
sam_fetch_description: "core",
|
|
93
|
+
sam_attachment_url: "core",
|
|
94
|
+
sam_fetch_attachment_text: "core",
|
|
95
|
+
sam_lookup_organization: "core",
|
|
96
|
+
sam_lookup_notice_fields: "core",
|
|
97
|
+
sam_check_exclusions: "core",
|
|
98
|
+
sam_get_wage_rates: "core",
|
|
99
|
+
sam_search_wage_determinations: "core",
|
|
100
|
+
sam_integrity_lookup: "core",
|
|
101
|
+
// Grants.gov
|
|
102
|
+
grants_search: "core",
|
|
103
|
+
grants_get_opportunity: "core",
|
|
104
|
+
// USAspending (29)
|
|
105
|
+
usas_search_awards: "core",
|
|
106
|
+
usas_search_individual_awards: "core",
|
|
107
|
+
usas_search_subagency_spending: "core",
|
|
108
|
+
usas_lookup_agency: "core",
|
|
109
|
+
usas_search_awards_by_recipient: "core",
|
|
110
|
+
usas_search_subawards: "core",
|
|
111
|
+
usas_search_recompetes: "core",
|
|
112
|
+
usas_search_expiring_contracts: "core",
|
|
113
|
+
usas_get_award_detail: "core",
|
|
114
|
+
usas_analyze_incumbent: "core",
|
|
115
|
+
usas_spending_over_time: "core",
|
|
116
|
+
usas_search_psc_spending: "core",
|
|
117
|
+
usas_search_state_spending: "core",
|
|
118
|
+
usas_search_cfda_spending: "core",
|
|
119
|
+
usas_search_federal_account_spending: "core",
|
|
120
|
+
usas_search_agency_spending: "core",
|
|
121
|
+
usas_get_agency_profile: "core",
|
|
122
|
+
usas_get_agency_awards_summary: "core",
|
|
123
|
+
usas_get_agency_budget_function: "core",
|
|
124
|
+
usas_search_recipients: "core",
|
|
125
|
+
usas_get_recipient_profile: "core",
|
|
126
|
+
usas_autocomplete_naics: "core",
|
|
127
|
+
usas_autocomplete_recipient: "core",
|
|
128
|
+
usas_disaster_spending: "core",
|
|
129
|
+
usas_glossary: "core",
|
|
130
|
+
usas_list_disaster_codes: "core",
|
|
131
|
+
usas_list_toptier_agencies: "core",
|
|
132
|
+
usas_naics_hierarchy: "core",
|
|
133
|
+
usas_search_teaming_partners: "core",
|
|
134
|
+
// FPDS
|
|
135
|
+
fpds_search_awards: "core",
|
|
136
|
+
// GAO
|
|
137
|
+
gao_protest_lookup: "core",
|
|
138
|
+
// FAR / DFARS
|
|
139
|
+
far_search: "core",
|
|
140
|
+
far_clause_lookup: "core",
|
|
141
|
+
far_compliance_matrix: "core",
|
|
142
|
+
// eCFR
|
|
143
|
+
ecfr_search: "core",
|
|
144
|
+
ecfr_list_titles: "core",
|
|
145
|
+
ecfr_get_section: "core",
|
|
146
|
+
// Federal Register
|
|
147
|
+
fed_register_search_documents: "core",
|
|
148
|
+
fed_register_get_document: "core",
|
|
149
|
+
fed_register_list_agencies: "core",
|
|
150
|
+
fed_register_public_inspection: "core",
|
|
151
|
+
// SBA
|
|
152
|
+
sba_size_standard: "core",
|
|
153
|
+
// OFAC (moved from vetting — govcon users screen SAM exclusions + OFAC together)
|
|
154
|
+
ofac_screen_entity: "core",
|
|
155
|
+
// GSA labor-rate benchmarks (moved from pricing — needed in core proposal-pricing)
|
|
156
|
+
gsa_benchmark_labor_rates: "core",
|
|
157
|
+
// Always-loaded utilities (every profile; mapped to core for 1-set invariant)
|
|
158
|
+
api_key_status: "core",
|
|
159
|
+
feedback: "core",
|
|
160
|
+
// ── sled (13) ──────────────────────────────────────────────────────────────
|
|
161
|
+
// State/local procurement + spend
|
|
162
|
+
opengov_list_governments: "sled",
|
|
163
|
+
opengov_search_solicitations: "sled",
|
|
164
|
+
bonfire_list_organizations: "sled",
|
|
165
|
+
bonfire_search_opportunities: "sled",
|
|
166
|
+
arcgis_hub_discover_datasets: "sled",
|
|
167
|
+
arcgis_feature_query: "sled",
|
|
168
|
+
socrata_discover_datasets: "sled",
|
|
169
|
+
socrata_query: "sled",
|
|
170
|
+
ckan_discover_datasets: "sled",
|
|
171
|
+
ckan_query: "sled",
|
|
172
|
+
tableau_view_csv: "sled",
|
|
173
|
+
open_checkbook_search: "sled",
|
|
174
|
+
search_gov_domains: "sled",
|
|
175
|
+
// ── vetting (16) ───────────────────────────────────────────────────────────
|
|
176
|
+
// Partner due-diligence (ofac_screen_entity moved to core)
|
|
177
|
+
fac_search_audits: "vetting",
|
|
178
|
+
fac_get_findings: "vetting",
|
|
179
|
+
fdic_search_institutions: "vetting",
|
|
180
|
+
fdic_institution_financials: "vetting",
|
|
181
|
+
fdic_institution_history: "vetting",
|
|
182
|
+
fdic_bank_failures: "vetting",
|
|
183
|
+
fdic_branch_deposits: "vetting",
|
|
184
|
+
fdic_industry_summary: "vetting",
|
|
185
|
+
fdic_risk_ratios: "vetting",
|
|
186
|
+
echo_search_facilities: "vetting",
|
|
187
|
+
echo_facility_report: "vetting",
|
|
188
|
+
epa_tri_facilities: "vetting",
|
|
189
|
+
courtlistener_search_opinions: "vetting",
|
|
190
|
+
nonprofit_search: "vetting",
|
|
191
|
+
nonprofit_financials: "vetting",
|
|
192
|
+
lda_search_filings: "vetting",
|
|
193
|
+
// ── disclosure (8) ─────────────────────────────────────────────────────────
|
|
194
|
+
// SEC EDGAR
|
|
195
|
+
edgar_company_concept: "disclosure",
|
|
196
|
+
edgar_company_facts: "disclosure",
|
|
197
|
+
edgar_company_filings: "disclosure",
|
|
198
|
+
edgar_daily_filing_index: "disclosure",
|
|
199
|
+
edgar_filing_index: "disclosure",
|
|
200
|
+
edgar_full_text_search: "disclosure",
|
|
201
|
+
edgar_lookup_cik: "disclosure",
|
|
202
|
+
edgar_xbrl_frames: "disclosure",
|
|
203
|
+
// ── regulatory (9) ─────────────────────────────────────────────────────────
|
|
204
|
+
// Regulations.gov, Congress.gov, GovInfo
|
|
205
|
+
regulations_search_documents: "regulatory",
|
|
206
|
+
regulations_search_comments: "regulatory",
|
|
207
|
+
regulations_search_dockets: "regulatory",
|
|
208
|
+
regulations_get_docket: "regulatory",
|
|
209
|
+
congress_search_bills: "regulatory",
|
|
210
|
+
congress_get_bill: "regulatory",
|
|
211
|
+
govinfo_list_collections: "regulatory",
|
|
212
|
+
govinfo_search_packages: "regulatory",
|
|
213
|
+
govinfo_get_package: "regulatory",
|
|
214
|
+
// ── pricing (15) ───────────────────────────────────────────────────────────
|
|
215
|
+
// GSA per-diem, BLS, Treasury, BEA, Census business-patterns, FRED, DOL, USITC HTS
|
|
216
|
+
// (gsa_benchmark_labor_rates moved to core; hts_lookup moved in from geo)
|
|
217
|
+
gsa_perdiem_rates: "pricing",
|
|
218
|
+
bls_oews_wages: "pricing",
|
|
219
|
+
bls_qcew: "pricing",
|
|
220
|
+
bls_timeseries: "pricing",
|
|
221
|
+
treasury_avg_interest_rates: "pricing",
|
|
222
|
+
treasury_debt_to_penny: "pricing",
|
|
223
|
+
treasury_monthly_statement: "pricing",
|
|
224
|
+
treasury_query_dataset: "pricing",
|
|
225
|
+
bea_regional_data: "pricing",
|
|
226
|
+
census_business_patterns: "pricing",
|
|
227
|
+
fred_search_series: "pricing",
|
|
228
|
+
fred_series_observations: "pricing",
|
|
229
|
+
dol_list_datasets: "pricing",
|
|
230
|
+
dol_get_dataset: "pricing",
|
|
231
|
+
hts_lookup: "pricing",
|
|
232
|
+
// ── health (17) ────────────────────────────────────────────────────────────
|
|
233
|
+
// CMS, NPPES, NIH, NSF, ClinicalTrials.gov, openFDA
|
|
234
|
+
cms_medicare_provider_services: "health",
|
|
235
|
+
cms_hospital_compare: "health",
|
|
236
|
+
cms_facility_directory: "health",
|
|
237
|
+
cms_dmepos_suppliers: "health",
|
|
238
|
+
cms_revoked_providers: "health",
|
|
239
|
+
cms_query_dataset: "health",
|
|
240
|
+
cms_search_datasets: "health",
|
|
241
|
+
nppes_lookup_provider: "health",
|
|
242
|
+
nih_reporter_search_projects: "health",
|
|
243
|
+
nsf_search_awards: "health",
|
|
244
|
+
nsf_get_award: "health",
|
|
245
|
+
clinicaltrials_search_studies: "health",
|
|
246
|
+
clinicaltrials_get_study: "health",
|
|
247
|
+
clinicaltrials_facet_counts: "health",
|
|
248
|
+
openfda_enforcement: "health",
|
|
249
|
+
openfda_device_clearances: "health",
|
|
250
|
+
openfda_drug_approvals: "health",
|
|
251
|
+
// ── safety (3) ─────────────────────────────────────────────────────────────
|
|
252
|
+
// NHTSA, CPSC
|
|
253
|
+
nhtsa_recalls: "safety",
|
|
254
|
+
nhtsa_complaints: "safety",
|
|
255
|
+
cpsc_recalls: "safety",
|
|
256
|
+
// ── geo (8) ────────────────────────────────────────────────────────────────
|
|
257
|
+
// Census geocode, FEMA, NWS, CBP, data.gov catalog
|
|
258
|
+
// (hts_lookup moved to pricing)
|
|
259
|
+
census_geocode_address: "geo",
|
|
260
|
+
census_geographies_by_coordinates: "geo",
|
|
261
|
+
fema_disaster_declarations: "geo",
|
|
262
|
+
fema_search_hazard_mitigation: "geo",
|
|
263
|
+
fema_search_public_assistance: "geo",
|
|
264
|
+
nws_active_alerts: "geo",
|
|
265
|
+
cbp_border_wait_times: "geo",
|
|
266
|
+
datagov_search_datasets: "geo",
|
|
267
|
+
// ── cyber (3) ──────────────────────────────────────────────────────────────
|
|
268
|
+
// NVD CVE, CISA KEV, NIST 800-53
|
|
269
|
+
cve_lookup: "cyber",
|
|
270
|
+
cisa_kev_lookup: "cyber",
|
|
271
|
+
nist_800_53_controls: "cyber",
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Parse MCP_SAM_GOV_TOOLSETS and return the set of tool names to expose.
|
|
275
|
+
*
|
|
276
|
+
* Pure: takes the env value and the full tool-name list as inputs, reads
|
|
277
|
+
* nothing from `process.env`, and has no side-effects. Call sites (server.ts)
|
|
278
|
+
* are responsible for logging any warnings to stderr.
|
|
279
|
+
*
|
|
280
|
+
* `feedback` and `api_key_status` are always injected into `loaded` regardless
|
|
281
|
+
* of the requested profile (ALWAYS_LOADED_TOOLS invariant).
|
|
282
|
+
*
|
|
283
|
+
* @param envValue The raw value of MCP_SAM_GOV_TOOLSETS (undefined / empty = all).
|
|
284
|
+
* @param toolNames The complete list of registered tool names (from TOOLS).
|
|
285
|
+
*/
|
|
286
|
+
export function resolveToolsets(envValue, toolNames) {
|
|
287
|
+
const allLoaded = new Set(toolNames);
|
|
288
|
+
// Unset or empty → all.
|
|
289
|
+
if (!envValue || !envValue.trim()) {
|
|
290
|
+
return { loaded: allLoaded, sets: ["all"], unknown: [], fellBack: false };
|
|
291
|
+
}
|
|
292
|
+
// Split on commas and/or whitespace, normalise to lower-case.
|
|
293
|
+
const tokens = envValue
|
|
294
|
+
.split(/[\s,]+/)
|
|
295
|
+
.map((t) => t.toLowerCase().trim())
|
|
296
|
+
.filter(Boolean);
|
|
297
|
+
// "all" anywhere → all.
|
|
298
|
+
if (tokens.includes("all")) {
|
|
299
|
+
return { loaded: allLoaded, sets: ["all"], unknown: [], fellBack: false };
|
|
300
|
+
}
|
|
301
|
+
const validSet = new Set(ALL_TOOLSET_NAMES);
|
|
302
|
+
const validNames = [];
|
|
303
|
+
const unknownNames = [];
|
|
304
|
+
for (const token of tokens) {
|
|
305
|
+
if (validSet.has(token)) {
|
|
306
|
+
if (!validNames.includes(token))
|
|
307
|
+
validNames.push(token);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
unknownNames.push(token);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
// No valid names → fall back to all.
|
|
314
|
+
if (validNames.length === 0) {
|
|
315
|
+
return {
|
|
316
|
+
loaded: allLoaded,
|
|
317
|
+
sets: ["all"],
|
|
318
|
+
unknown: unknownNames,
|
|
319
|
+
fellBack: true,
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
// Build the loaded set: union of all tools in the requested toolsets.
|
|
323
|
+
const requestedSets = new Set(validNames);
|
|
324
|
+
const loaded = new Set();
|
|
325
|
+
for (const toolName of toolNames) {
|
|
326
|
+
const ts = TOOL_TOOLSET_MAP[toolName];
|
|
327
|
+
if (ts && requestedSets.has(ts)) {
|
|
328
|
+
loaded.add(toolName);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
// Always inject always-loaded tools (feedback, api_key_status) regardless
|
|
332
|
+
// of the profile. They are already in core's mapping but must appear in every
|
|
333
|
+
// profile's loaded set.
|
|
334
|
+
for (const toolName of toolNames) {
|
|
335
|
+
if (ALWAYS_LOADED_TOOLS.has(toolName)) {
|
|
336
|
+
loaded.add(toolName);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return {
|
|
340
|
+
loaded,
|
|
341
|
+
sets: validNames,
|
|
342
|
+
unknown: unknownNames,
|
|
343
|
+
fellBack: false,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Filter a tool list to only those in the loaded set.
|
|
348
|
+
* Exported so server.ts can call this and tests can import and verify the logic
|
|
349
|
+
* without mutating dist/server.js.
|
|
350
|
+
*/
|
|
351
|
+
export function filterToolsFor(tools, loaded) {
|
|
352
|
+
return tools.filter((t) => loaded.has(t.name));
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Build the structured tool_not_loaded error envelope.
|
|
356
|
+
* Exported so server.ts can call this and tests can import and verify the logic
|
|
357
|
+
* without mutating dist/server.js.
|
|
358
|
+
*
|
|
359
|
+
* @param toolName The name of the tool that was called but not loaded.
|
|
360
|
+
* @param loadedSets The currently loaded toolset names (from ResolveResult.sets).
|
|
361
|
+
*/
|
|
362
|
+
export function toolNotLoadedEnvelope(toolName, loadedSets) {
|
|
363
|
+
const toolset = TOOL_TOOLSET_MAP[toolName] ?? "unknown";
|
|
364
|
+
// Suggest the union of currently loaded sets + the needed set (not just the
|
|
365
|
+
// needed set alone, which would silently drop the user's current profile).
|
|
366
|
+
const isAll = loadedSets.length === 1 && loadedSets[0] === "all";
|
|
367
|
+
let suggestion;
|
|
368
|
+
if (isAll) {
|
|
369
|
+
// All tools are already loaded — the tool simply doesn't exist.
|
|
370
|
+
suggestion = `MCP_SAM_GOV_TOOLSETS=all`;
|
|
371
|
+
}
|
|
372
|
+
else if (toolset === "unknown") {
|
|
373
|
+
suggestion = `MCP_SAM_GOV_TOOLSETS=all`;
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
// Build union: current loaded sets + the required set, deduped.
|
|
377
|
+
const unionSets = [...loadedSets];
|
|
378
|
+
if (!unionSets.includes(toolset))
|
|
379
|
+
unionSets.push(toolset);
|
|
380
|
+
suggestion = `MCP_SAM_GOV_TOOLSETS=${unionSets.join(",")}`;
|
|
381
|
+
}
|
|
382
|
+
const error = {
|
|
383
|
+
kind: "tool_not_loaded",
|
|
384
|
+
message: `Tool '${toolName}' belongs to the '${toolset}' toolset, which is not loaded. ` +
|
|
385
|
+
`Set ${suggestion} to enable it.`,
|
|
386
|
+
retryable: false,
|
|
387
|
+
};
|
|
388
|
+
return { ok: false, error };
|
|
389
|
+
}
|
|
390
|
+
//# sourceMappingURL=toolsets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolsets.js","sourceRoot":"","sources":["../src/toolsets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,gCAAgC;AAChC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM;IACN,MAAM;IACN,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,OAAO;CACC,CAAC;AAIX;;;GAGG;AACH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C;AACjD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAgB,EAChB,UAA6B;IAK7B,MAAM,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC;IACxD,4EAA4E;IAC5E,2EAA2E;IAC3E,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC;IACjE,IAAI,UAAkB,CAAC;IACvB,IAAI,KAAK,EAAE,CAAC;QACV,gEAAgE;QAChE,UAAU,GAAG,0BAA0B,CAAC;IAC1C,CAAC;SAAM,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,UAAU,GAAG,0BAA0B,CAAC;IAC1C,CAAC;SAAM,CAAC;QACN,gEAAgE;QAChE,MAAM,SAAS,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;YAAE,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1D,UAAU,GAAG,wBAAwB,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7D,CAAC;IACD,MAAM,KAAK,GAAG;QACZ,IAAI,EAAE,iBAA0B;QAChC,OAAO,EACL,SAAS,QAAQ,qBAAqB,OAAO,kCAAkC;YAC/E,OAAO,UAAU,gBAAgB;QACnC,SAAS,EAAE,KAAc;KAC1B,CAAC;IACF,OAAO,EAAE,EAAE,EAAE,KAAc,EAAE,KAAK,EAAE,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cliwant/mcp-sam-gov",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"mcpName": "io.github.cliwant/mcp-sam-gov",
|
|
5
5
|
"description": "Most comprehensive keyless-first MCP server for US federal + state/local (SLED) contracting + spending + regulation: SAM.gov, USAspending, Federal Register, eCFR, Grants.gov, plus SLED procurement bids (OpenGov, Bonfire, ArcGIS, Socrata 53 hosts). 152 tools (147 need no API key), plug into Claude Desktop / Claude Code / Codex CLI / Cursor / Continue / Gemini CLI.",
|
|
6
6
|
"keywords": [
|
package/src/arcgis-feature.ts
CHANGED
|
@@ -90,6 +90,14 @@ export const ARCGIS_SERVICES: readonly ArcgisService[] = [
|
|
|
90
90
|
{ key: "nddot_flex_partner_road", base: "https://services1.arcgis.com/EDijJFsQQwgz8X53/arcgis/rest/services/Flex_Funding_Awarded_WFL1/FeatureServer/22", label: "North Dakota DOT — Flex Funding Awarded (Partner-Allocated, Road)", note: "NDDOT federal flex-funding ROAD awards, Partner-Allocated category (LPA_NAME/LPA_TYPE/Total_Project_Cost/Flex_Funds_Awarded/Work_Type). ~22. ★$ amounts are FORMATTED STRINGS; recipients are LOCAL PUBLIC AGENCIES. Companion to nddot_flex_setaside_road. ND's authoritative checkbook/procurement is keyless-unreachable — this is a proxy." },
|
|
91
91
|
{ key: "nddot_flex_setaside_bridge", base: "https://services1.arcgis.com/EDijJFsQQwgz8X53/arcgis/rest/services/Flex_Funding_Awarded_WFL1/FeatureServer/1", label: "North Dakota DOT — Flex Funding Awarded (Set-Aside, Bridge)", note: "NDDOT federal flex-funding BRIDGE awards, Set-Aside category (LPA_NAME/LPA_TYPE/Total_Project_Cost/Flex_Funds_Awarded/Work_Type). ~12. ★$ amounts are FORMATTED STRINGS; recipients are LOCAL PUBLIC AGENCIES. ND's authoritative checkbook/procurement is keyless-unreachable — this is a proxy." },
|
|
92
92
|
{ key: "nddot_flex_partner_bridge", base: "https://services1.arcgis.com/EDijJFsQQwgz8X53/arcgis/rest/services/Flex_Funding_Awarded_WFL1/FeatureServer/21", label: "North Dakota DOT — Flex Funding Awarded (Partner-Allocated, Bridge)", note: "NDDOT federal flex-funding BRIDGE awards, Partner-Allocated category (LPA_NAME/LPA_TYPE/Total_Project_Cost/Flex_Funds_Awarded/Work_Type). ~1. ★$ amounts are FORMATTED STRINGS; recipients are LOCAL PUBLIC AGENCIES. ND's authoritative checkbook/procurement is keyless-unreachable — this is a proxy." },
|
|
93
|
+
// ── DEPTH additions (loop cycle, 2026-09-21) — county capital improvement
|
|
94
|
+
// project (CIP) pipelines. These are CAPITAL-PROJECT PIPELINE registries,
|
|
95
|
+
// NOT solicitation or award registers. Rows represent planned/active CIP
|
|
96
|
+
// line items with bid-open dates or phase status; they are NOT live bids.
|
|
97
|
+
// Both layers are anonymous/keyless and live-verified (returnCountOnly +
|
|
98
|
+
// resultOffset pagination walk confirmed). ──
|
|
99
|
+
{ key: "hennepin_transportation_cip", base: "https://gis.hennepin.us/arcgis/rest/services/Maps/TRANSPORTATION_PROJECTS/FeatureServer/0", label: "Hennepin County MN — Transportation CIP Projects", note: "★CAPITAL-PROJECT PIPELINE, NOT a solicitation or award register. Rows are Hennepin County MN transportation capital improvement projects (CP_Num=SAP project ID, Roadway, Bid_Open=planned bid-open date [date string, not epoch-ms], Fund_Source, CIP_Status, Proj_Type, Start_CRN_Dt/End_CRN_Dt). ~257 rows (all fit in maxRecordCount=2000; no pagination needed). Freshness: Bid_Open and CIP_Status reflect the county's active CIP program; recency is indicated by Bid_Open and Start_CRN_Dt field values. No PII (rows are road projects, not about individuals). Keyless anonymous access." },
|
|
100
|
+
{ key: "charlotte_mecklenburg_cip", base: "https://gis.charlottenc.gov/arcgis/rest/services/CIP/CapitalImprovementProjectsService/MapServer/17", label: "Charlotte-Mecklenburg NC — Capital Improvement Projects", note: "★CAPITAL-PROJECT PIPELINE, NOT a solicitation or award register. Rows are City of Charlotte / Mecklenburg County joint CIP projects (Project_ID, Project_Name, Project_Phase, Department, Project_Type, Location_Description, Public_Project_Description, Anticipated_Start_Date, Anticipated_Compl_Date, Total_Project_Budget, Status). ~2,276 rows; page by resultRecordCount=1000 at resultOffset 0/1000/2000 (layer default: server enforces 1000-row pages despite maxRecordCount=4000 in metadata). Freshness: Project_Phase and Status reflect active pipeline; sort by Anticipated_Start_Date for recency. CAUTION: Project_Manager/Project_Manager_Email/Project_Manager_Phone are government-staff contact fields — do not surface as personal data. Dates are date strings (not epoch-ms). Keyless anonymous access." },
|
|
93
101
|
] as const;
|
|
94
102
|
|
|
95
103
|
const SERVICE_BY_KEY: ReadonlyMap<string, ArcgisService> = new Map(ARCGIS_SERVICES.map((s) => [s.key, s]));
|
package/src/bls.ts
CHANGED
|
@@ -149,10 +149,11 @@ const BLS_ID_TO_KEY: ReadonlyMap<string, BlsSeriesKey> = new Map(
|
|
|
149
149
|
);
|
|
150
150
|
|
|
151
151
|
// ─── Raw-seriesId charclass (SSRF + "verify the ID" honesty) ──────
|
|
152
|
-
// `^[A-Z0-9]{1,
|
|
152
|
+
// `^[A-Z0-9]{1,25}$` — uppercase alnum, explicit length bound. In JS (no `m`
|
|
153
153
|
// flag) `$` matches only end-of-input, and `[A-Z0-9]` cannot include `\n`, so a
|
|
154
154
|
// trailing newline is rejected. Rejects `../`, encoded traversal, `@host`, `;`.
|
|
155
|
-
|
|
155
|
+
// 25 chars covers OEWS series IDs (e.g. OEUN000000000000015125201, 25 chars).
|
|
156
|
+
const SERIES_ID_RE = /^[A-Z0-9]{1,25}$/;
|
|
156
157
|
|
|
157
158
|
// ─── Year bounds ──────────────────────────────────────────────────
|
|
158
159
|
const YEAR_MIN = 1900;
|
|
@@ -417,7 +418,7 @@ export async function timeseries(args: BlsTimeseriesArgs): Promise<MetaBundle> {
|
|
|
417
418
|
if (typeof raw !== "string" || !SERIES_ID_RE.test(raw)) {
|
|
418
419
|
throw new ToolErrorCarrier({
|
|
419
420
|
kind: "invalid_input",
|
|
420
|
-
message: `Invalid seriesId ${JSON.stringify(raw)} — expected 1..
|
|
421
|
+
message: `Invalid seriesId ${JSON.stringify(raw)} — expected 1..25 uppercase alphanumeric characters (^[A-Z0-9]{1,25}$). A BLS series ID like 'CUUR0000SA0' or OEWS 'OEUN000000000000015125201' (25 chars); punctuation/whitespace/lowercase are rejected (SSRF + "verify the ID" honesty).`,
|
|
421
422
|
retryable: false,
|
|
422
423
|
upstreamEndpoint: label,
|
|
423
424
|
});
|
package/src/bonfire.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* ★ NO keyless directory API: Bonfire's authoritative org list
|
|
12
12
|
* (`GET common-production-api-global.bonfirehub.com/v1.0/organizations/external`)
|
|
13
13
|
* is AUTH-GATED (a free vendor-account token) — OUT OF BOUNDS (we never sign in).
|
|
14
|
-
* So this ships a CURATED, live-verified SEED directory (
|
|
14
|
+
* So this ships a CURATED, live-verified SEED directory (195 US orgs; §BONFIRE_
|
|
15
15
|
* ORGS) as `bonfire_list_organizations`, and documents the keyless RSS-probe
|
|
16
16
|
* refresh method (no catch-all: `{slug}.bonfirehub.com/opportunities/rss` returns
|
|
17
17
|
* 200 <rss> for a real org, a connection failure for a non-provisioned slug). The
|
|
@@ -51,22 +51,26 @@ const BONFIRE_SOURCE = (org: string) =>
|
|
|
51
51
|
`${org}.bonfirehub.com via Bonfire (Euna) open-opportunities RSS (keyless)`;
|
|
52
52
|
|
|
53
53
|
const BONFIRE_SEED_NOTE =
|
|
54
|
-
"This directory is a CURATED, live-verified SEED (Bonfire has NO keyless org-list API; the authoritative list is auth-gated and out of bounds). Euna markets up to ~900 US orgs, so the seed is partial — probe `{slug}.bonfirehub.com/opportunities/rss` (200 <rss> = real org) to extend. Feed a result's `org` to bonfire_search_opportunities.";
|
|
54
|
+
"This directory is a CURATED, live-verified SEED (Bonfire has NO keyless org-list API; the authoritative list is auth-gated and out of bounds). Euna markets up to ~900 US orgs, so the seed is partial — probe `{slug}.bonfirehub.com/opportunities/rss` (200 <rss> = real org) to extend. Feed a result's `org` to bonfire_search_opportunities. Slug identity traps: pcc = Portland Community College OR (NOT Pima CC AZ); dps = Dayton Public Schools OH (NOT Denver PS CO); maricopa = Maricopa County Community Colleges AZ (NOT Maricopa County government).";
|
|
55
55
|
|
|
56
|
-
// ─── The curated
|
|
56
|
+
// ─── The curated 195-org US seed directory (live-verified 2026-09-21) ──
|
|
57
57
|
// "slug|Entity|ST" — the slug is the RSS subdomain. Non-US (.ca / cayman / etc.)
|
|
58
58
|
// deliberately excluded.
|
|
59
|
+
// Slug identity notes (depth sweep 2026-09-21):
|
|
60
|
+
// pcc = Portland Community College OR (NOT Pima Community College AZ)
|
|
61
|
+
// dps = Dayton Public Schools OH (NOT Denver Public Schools CO)
|
|
62
|
+
// maricopa = Maricopa County Community Colleges AZ (NOT Maricopa County government)
|
|
59
63
|
const BONFIRE_SEED_RAW: readonly string[] = [
|
|
60
64
|
"littlerock|City of Little Rock|AR",
|
|
61
|
-
"buckeyeaz|City of Buckeye|AZ", "goodyearaz|City of Goodyear|AZ", "peoriaaz|City of Peoria|AZ", "scottsdaleaz|City of Scottsdale|AZ", "yumaaz|City of Yuma|AZ", "pinalcountyaz|Pinal County|AZ", "susd|Scottsdale USD|AZ", "tollesonuhsd|Tolleson Union HSD|AZ",
|
|
62
|
-
"cityofirvine|City of Irvine|CA", "oaklandca|City of Oakland|CA", "alamedacounty|Alameda County|CA", "solanocounty|Solano County|CA", "ventura|County of Ventura|CA", "yolocounty|Yolo County|CA", "mtc|Metropolitan Transportation Commission|CA", "azusa|Azusa USD|CA", "stocktonusd|Stockton USD|CA", "weta|SF Bay Area Water Emergency Transportation Authority|CA", "acwd|Alameda County Water District|CA", "wrd|Water Replenishment District of Southern CA|CA", "actransit|AC Transit|CA", "marintransit|Marin Transit|CA", "mst|Monterey-Salinas Transit|CA", "omnitrans|Omnitrans|CA", "smctd|San Mateo County Transit District|CA", "sonomamarintrain|Sonoma-Marin Area Rail Transit|CA", "ggbhtd|Golden Gate Bridge Highway & Transportation District|CA",
|
|
65
|
+
"buckeyeaz|City of Buckeye|AZ", "goodyearaz|City of Goodyear|AZ", "maricopa|Maricopa County Community Colleges|AZ", "peoriaaz|City of Peoria|AZ", "scottsdaleaz|City of Scottsdale|AZ", "yumaaz|City of Yuma|AZ", "pinalcountyaz|Pinal County|AZ", "susd|Scottsdale USD|AZ", "tollesonuhsd|Tolleson Union HSD|AZ",
|
|
66
|
+
"cityofirvine|City of Irvine|CA", "oaklandca|City of Oakland|CA", "alamedacounty|Alameda County|CA", "emwd|Eastern Municipal Water District|CA", "laccd|Los Angeles Community College District|CA", "solanocounty|Solano County|CA", "ventura|County of Ventura|CA", "yolocounty|Yolo County|CA", "mtc|Metropolitan Transportation Commission|CA", "azusa|Azusa USD|CA", "stocktonusd|Stockton USD|CA", "weta|SF Bay Area Water Emergency Transportation Authority|CA", "acwd|Alameda County Water District|CA", "wrd|Water Replenishment District of Southern CA|CA", "actransit|AC Transit|CA", "marintransit|Marin Transit|CA", "mst|Monterey-Salinas Transit|CA", "omnitrans|Omnitrans|CA", "smctd|San Mateo County Transit District|CA", "sonomamarintrain|Sonoma-Marin Area Rail Transit|CA", "ggbhtd|Golden Gate Bridge Highway & Transportation District|CA",
|
|
63
67
|
"bouldercounty|Boulder County|CO",
|
|
64
68
|
"crcog|Capitol Region Council of Governments|CT", "easternct|Eastern Connecticut State University|CT",
|
|
65
69
|
"dfm|DE OMB - Division of Facility Management|DE", "gss|DE OMB - Government Support Services|DE",
|
|
66
70
|
"daviefl|Town of Davie|FL", "ocoee|City of Ocoee|FL", "broward|Broward County|FL", "hillsboroughcounty|Hillsborough County|FL", "marionfl|Marion County|FL", "monroecounty-fl|Monroe County|FL", "pascocountyfl|Pasco County|FL", "famu|Florida A&M University|FL", "fau|Florida Atlantic University|FL", "fgcu|Florida Gulf Coast University|FL", "floridapoly|Florida Polytechnic University|FL", "ucf|University of Central Florida|FL", "tampabaywater|Tampa Bay Water|FL", "gohart|Hillsborough Transit Authority|FL", "psta|Pinellas Suncoast Transit Authority|FL",
|
|
67
71
|
"brookhavenga|City of Brookhaven|GA", "sandysprings|City of Sandy Springs|GA", "chathamcountyga|Chatham County|GA", "columbiacountyga|Columbia County|GA", "gwinnett|Gwinnett County Public Schools|GA",
|
|
68
72
|
"cityofnampa|City of Nampa|ID", "adacounty|Ada County|ID", "bannockcounty|Bannock County|ID",
|
|
69
|
-
"cookcountyil|Cook County|IL", "thecha|Chicago Housing Authority|IL", "cps|Chicago Public Schools|IL", "u-46|School District U-46|IL", "chicagoparkdistrict|Chicago Park District|IL", "mwrd|Metro Water Reclamation District of Greater Chicago|IL", "transitchicago|Chicago Transit Authority|IL", "metra|Metra|IL",
|
|
73
|
+
"cookcountyil|Cook County|IL", "d214|Township High School District 214|IL", "thecha|Chicago Housing Authority|IL", "cps|Chicago Public Schools|IL", "u-46|School District U-46|IL", "chicagoparkdistrict|Chicago Park District|IL", "mwrd|Metro Water Reclamation District of Greater Chicago|IL", "transitchicago|Chicago Transit Authority|IL", "metra|Metra|IL",
|
|
70
74
|
"indygo|Indianapolis Public Transportation Corp|IN",
|
|
71
75
|
"olatheks|City of Olathe|KS", "wichita|City of Wichita|KS",
|
|
72
76
|
"covingtonky|City of Covington|KY", "louisvilleky|City of Louisville|KY", "owensboro|City of Owensboro|KY", "lexingtonky|Lexington-Fayette|KY", "kyhousing|Kentucky Housing Corporation|KY", "tarc|Transit Authority of River City|KY",
|
|
@@ -75,20 +79,20 @@ const BONFIRE_SEED_RAW: readonly string[] = [
|
|
|
75
79
|
"maine|State of Maine|ME",
|
|
76
80
|
"detroit|City of Detroit|MI",
|
|
77
81
|
"ramseycountymn|Ramsey County|MN", "sourcewell|Sourcewell|MN",
|
|
78
|
-
"jeffersoncitymo|Jefferson City|MO", "stlouiscountymo|St. Louis County|MO", "stlcc|St. Louis Community College|MO",
|
|
82
|
+
"jeffersoncitymo|Jefferson City|MO", "kcmo|Kansas City, MO|MO", "stlouiscountymo|St. Louis County|MO", "stlcc|St. Louis Community College|MO",
|
|
79
83
|
"apexnc|Town of Apex|NC", "charlottenc|City of Charlotte|NC", "wake|Wake County|NC", "ncat|NC A&T State University|NC", "ncsu|NC State University|NC",
|
|
80
84
|
"rutgers|Rutgers University|NJ",
|
|
81
85
|
"cabq|City of Albuquerque|NM", "mckinleycounty|McKinley County|NM",
|
|
82
86
|
"clarkcountynv|Clark County|NV", "ccsd|Clark County School District|NV",
|
|
83
87
|
"suffolkcountyny|Suffolk County|NY", "stonybrook|Stony Brook University|NY", "healthsolutions|Public Health Solutions|NY", "centro|Central NY Regional Transportation Authority|NY", "nfta|Niagara Frontier Transportation Authority|NY", "panynj|Port Authority of New York & New Jersey|NY",
|
|
84
|
-
"akronohio|City of Akron|OH", "cincinnati-oh|City of Cincinnati|OH", "columbus|City of Columbus|OH", "equalisgroup|Equalis Group|OH",
|
|
85
|
-
"pdx|Portland State University|OR",
|
|
86
|
-
"
|
|
88
|
+
"akronohio|City of Akron|OH", "cincinnati-oh|City of Cincinnati|OH", "columbus|City of Columbus|OH", "dps|Dayton Public Schools|OH", "equalisgroup|Equalis Group|OH",
|
|
89
|
+
"pcc|Portland Community College|OR", "pdx|Portland State University|OR",
|
|
90
|
+
"alleghenycounty|Allegheny County|PA", "montcopa|Montgomery County PA|PA", "pennbid|PennBid|PA",
|
|
87
91
|
"charlestoncounty|Charleston County|SC", "tridenttech|Trident Technical College|SC",
|
|
88
92
|
"apsu|Austin Peay State University|TN",
|
|
89
93
|
"dfwairport|DFW International Airport|TX", "amarillo|City of Amarillo|TX", "arlingtontx|City of Arlington|TX", "brownsvilletx|City of Brownsville|TX", "burlesontx|City of Burleson|TX", "cityoflewisville|City of Lewisville|TX", "dallascityhall|City of Dallas|TX", "fortworthtexas|City of Fort Worth|TX", "friscotexas|City of Frisco|TX", "leandertx|City of Leander|TX", "mckinneytexas|City of McKinney|TX", "midlandtexas|City of Midland|TX", "roundrocktexas|City of Round Rock|TX", "sanantonio|City of San Antonio|TX", "schertz|City of Schertz|TX", "southlake|City of Southlake|TX", "templetx|City of Temple|TX", "waco-texas|City of Waco|TX", "mansfield|Mansfield Council of Governments|TX", "brazoriacounty|Brazoria County|TX", "dentoncounty|Denton County|TX", "galvestoncountytx|Galveston County|TX", "harriscountytx|Harris County|TX", "johnsoncountytx|Johnson County|TX", "lubbock|Lubbock County|TX", "parkercountytx|Parker County|TX", "smithcounty|Smith County|TX", "wilco|Williamson County|TX", "hccs|Houston Community College|TX", "rice-edu|Rice University|TX", "tccd|Tarrant County College District|TX", "utdallas|UT Dallas|TX", "utexas|UT Austin|TX", "utrgv|UT Rio Grande Valley|TX", "uttyler|UT Tyler|TX", "uthscsa|UT Health San Antonio|TX", "saha|Opportunity Home San Antonio|TX", "universityhealth|University Health (hospital district)|TX", "allenisd|Allen ISD|TX", "austinisd|Austin ISD|TX", "comalisd|Comal ISD|TX", "dallasisd|Dallas ISD|TX", "fortbendisd|Fort Bend ISD|TX", "kleinisd|Klein ISD|TX", "laredoisd|Laredo ISD|TX", "magnoliaisd|Magnolia ISD|TX", "mesquiteisd|Mesquite ISD|TX", "tomballisd|Tomball ISD|TX", "twc-texas-gov|Texas Workforce Commission|TX", "txdot|Texas Department of Transportation|TX", "dart|Dallas Area Rapid Transit|TX", "ridemetro|Harris County METRO|TX",
|
|
90
94
|
"ccog|The Cooperative Council of Governments|US", "omniapartners|OMNIA Partners|US", "utah|U3P / Utah Public Procurement Place|UT",
|
|
91
|
-
"fairfaxcounty|Fairfax County|VA", "cnu|Christopher Newport University|VA", "gmu|George Mason University|VA", "nsu|Norfolk State University|VA", "fcps|Fairfax County Public Schools|VA",
|
|
95
|
+
"chesterfield|Chesterfield County|VA", "fairfaxcounty|Fairfax County|VA", "cnu|Christopher Newport University|VA", "gmu|George Mason University|VA", "nsu|Norfolk State University|VA", "fcps|Fairfax County Public Schools|VA",
|
|
92
96
|
"cityofvancouver|City of Vancouver WA|WA", "federalwaywa|City of Federal Way|WA", "clarkcountywa|Clark County WA|WA", "kingcounty|King County|WA", "portolympia|Port of Olympia|WA", "lwsd|Lake Washington School District|WA", "tacoma|Tacoma Public Schools|WA",
|
|
93
97
|
"cityofmilwaukee|City of Milwaukee|WI", "westalliswi|City of West Allis|WI", "racinecounty|Racine County|WI", "waukeshacounty|Waukesha County|WI", "cvtc|Chippewa Valley Technical College|WI", "mmsd|Milwaukee Metropolitan Sewerage District|WI",
|
|
94
98
|
"marshall|Marshall University|WV",
|