Data source: USASpending.gov
https://context.gnist.ai/mcp/usaspending/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (6)
search_awardsSearch USASpending.gov for federal awards (contracts, grants, loans, direct payments).
USASpending.gov is the official source for US federal government spending data,
covering $6–7 trillion annually from FY2008–present, updated nightly.
Args:
query: Keywords to search for (e.g. "Lockheed Martin", "cybersecurity", "COVID-19 relief").
award_type: Filter by award category. Values: "contracts" (default), "grants", "loans",
"direct_payments".
agency: Filter by awarding agency name (e.g. "Department of Defense",
"Department of Health and Human Services").
date_from: Only include awards starting on or after this date (YYYY-MM-DD).
date_to: Only include awards starting on or before this date (YYYY-MM-DD).
limit: Number of results to return (1–50, default 10). Sorted by award amount descending.
Returns:
Dict with 'count', 'has_next', and 'awards' list. Each award includes award_id,
recipient_name, award_amount, awarding_agency, start/end dates, description,
and NAICS industry classification.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Keywords to search for (e.g. "Lockheed Martin", "cybersecurity", "COVID-19 relief"). |
award_type | any | optional | Filter by award category. Values: "contracts" (default), "grants", "loans", "direct_payments". |
agency | any | optional | Filter by awarding agency name (e.g. "Department of Defense", "Department of Health and Human Services"). |
date_from | any | optional | Only include awards starting on or after this date (YYYY-MM-DD). |
date_to | any | optional | Only include awards starting on or before this date (YYYY-MM-DD). |
limit | integer | optional | Number of results to return (1–50, default 10). Sorted by award amount descending. (default: 10) |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "search_awards",
"arguments": {
"query": "example"
}
}
}get_awardFetch detailed information for a specific federal award.
Use the generated_internal_id from search_awards results (e.g.
"CONT_AWD_N0001917C0001_9700_-NONE-_-NONE-") to look up full details including
recipient info, subaward data, contracting details, and place of performance.
Args:
award_id: The generated_unique_award_id or generated_internal_id from search results.
Returns:
Dict with full award details: obligation amounts, recipient, agencies, NAICS/PSC codes,
subaward count, place of performance, and period of performance dates.
| Parameter | Type | Required | Description |
|---|---|---|---|
award_id | string | required | The generated_unique_award_id or generated_internal_id from search results. |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_award",
"arguments": {
"award_id": "example"
}
}
}get_recipientSearch for or fetch a federal award recipient (contractor, grantee, etc.).
Search by name/keyword to find recipients, or pass a recipient_id (from search_awards
results) to get a full profile with alternate names, business types, and location.
Args:
keyword: Recipient name or keyword to search (e.g. "Raytheon", "Johns Hopkins").
recipient_id: Specific recipient hash ID for full profile lookup
(e.g. "6cf5fb1b-4988-d087-5dc1-70939d8fc6c4-C").
limit: Number of search results (1–50, default 10). Ignored when using recipient_id.
Returns:
Dict with 'count', 'total', and 'recipients' list. Each includes name, UEI,
total award amount, and (for profile lookups) business types, location, and alternate names.
| Parameter | Type | Required | Description |
|---|---|---|---|
keyword | any | optional | Recipient name or keyword to search (e.g. "Raytheon", "Johns Hopkins"). |
recipient_id | any | optional | Specific recipient hash ID for full profile lookup (e.g. "6cf5fb1b-4988-d087-5dc1-70939d8fc6c4-C"). |
limit | integer | optional | Number of search results (1–50, default 10). Ignored when using recipient_id. (default: 10) |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_recipient",
"arguments": {}
}
}get_agency_spendingFetch budgetary resources for a US federal agency.
Common toptier agency codes:
- "097" — Department of Defense
- "075" — Department of Health and Human Services
- "012" — Department of Agriculture
- "069" — Department of Transportation
- "089" — Department of Energy
- "028" — Social Security Administration
Args:
agency_code: Three-digit toptier agency code (e.g. "097" for DoD).
fiscal_year: Federal fiscal year (Oct–Sep). Omit for most recent available.
Returns:
Dict with toptier_code, fiscal_year, agency_budgetary_resources (total budget authority),
agency_total_obligated (committed), agency_total_outlayed (spent),
and total_budgetary_resources (all-government total for comparison).
| Parameter | Type | Required | Description |
|---|---|---|---|
agency_code | string | required | Three-digit toptier agency code (e.g. "097" for DoD). |
fiscal_year | any | optional | Federal fiscal year (Oct–Sep). Omit for most recent available. |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_agency_spending",
"arguments": {
"agency_code": "example"
}
}
}spending_by_geographyAggregate federal spending by geographic area (state, county, or congressional district).
Useful for analyzing where federal money flows — e.g. which states receive the most
defense contracts, or where COVID relief grants were concentrated.
Args:
keywords: Search terms to filter spending (e.g. ["cybersecurity"], ["COVID-19", "relief"]).
geo_layer: Geographic granularity. Values: "state", "county", "district"
(congressional district). Default "state".
scope: What location to aggregate by. Values: "place_of_performance" (where work happens),
"recipient_location" (where recipient is based). Default "place_of_performance".
award_type: Filter by category: "contracts", "grants", "loans", "direct_payments".
Omit for all types.
date_from: Start date filter (YYYY-MM-DD).
date_to: End date filter (YYYY-MM-DD).
Returns:
Dict with 'scope', 'geo_layer', 'count', and 'results' list. Each result includes
shape_code (state/county/district code), display_name, aggregated_amount, population,
and per_capita spending.
| Parameter | Type | Required | Description |
|---|---|---|---|
keywords | list[string] | required | Search terms to filter spending (e.g. ["cybersecurity"], ["COVID-19", "relief"]). |
geo_layer | string | optional | Geographic granularity. Values: "state", "county", "district" (congressional district). Default "state". (default: "state") |
scope | string | optional | What location to aggregate by. Values: "place_of_performance" (where work happens), "recipient_location" (where recipient is based). Default "place_of_performance". (default: "place_of_performance") |
award_type | any | optional | Filter by category: "contracts", "grants", "loans", "direct_payments". Omit for all types. |
date_from | any | optional | Start date filter (YYYY-MM-DD). |
date_to | any | optional | End date filter (YYYY-MM-DD). |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "spending_by_geography",
"arguments": {
"keywords": [
"example"
]
}
}
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "report_feedback",
"arguments": {
"feedback": "example"
}
}
}Quick Start
curl -X POST "https://context.gnist.ai/mcp/usaspending/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_awards", "arguments": {"query": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/usaspending/",
headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "search_awards",
"arguments": {
"query": "example"
}
}
},
)
print(resp.json())