CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Usaspending Mcp Server

cyanheads/usaspending-mcp-server
216 toolsSTDIO, HTTPregistry active
Summary

Wraps the entire USAspending.gov API with 14 tools covering awards, recipients, agencies, and spending analytics. You can search contracts and grants by keyword or filter, pull full award details including subaward chains, profile recipients by UEI, and slice spending data by geography, category, or time period. Includes disaster spending breakdowns (COVID-19, hurricanes) and federal account budget data. The award search returns generated IDs that chain directly into detail and transaction lookups, and recipient hashes link to full org profiles. Useful when you need to trace federal money flows, audit contract hierarchies, or build spending dashboards without parsing CSV dumps.

Install to Claude Code

verified
claude mcp add --transport http usaspending https://usaspending.caseyjhand.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Review the command, arguments, and environment values before installing — MCP servers run with your local permissions.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Tools

Verified live against the running server on Jun 10, 2026.

verified live16 tools
usaspending_list_agenciesList all top-tier federal agencies with toptier codes, agency slugs, budget authority amounts, and obligation totals for the current fiscal year. Use this as the entry point for agency navigation — toptier codes and agency slugs are required inputs for usaspending_get_agency a...2 params

List all top-tier federal agencies with toptier codes, agency slugs, budget authority amounts, and obligation totals for the current fiscal year. Use this as the entry point for agency navigation — toptier codes and agency slugs are required inputs for usaspending_get_agency a...

Parameters* required
sortstring
Sort field: agency_name (alphabetical), budget_authority_amount, obligated_amount, or outlay_amountone of agency_name · budget_authority_amount · obligated_amount · outlay_amountdefault: agency_name
orderstring
Sort direction: asc or descone of asc · descdefault: asc
usaspending_autocompleteLook up valid code values for filter fields by searching free-text descriptions. Use the type parameter to select the lookup table: naics (NAICS industry codes), psc (product/service codes), cfda (CFDA/Assistance Listing program numbers), awarding_agency (agency names and IDs)...3 params

Look up valid code values for filter fields by searching free-text descriptions. Use the type parameter to select the lookup table: naics (NAICS industry codes), psc (product/service codes), cfda (CFDA/Assistance Listing program numbers), awarding_agency (agency names and IDs)...

Parameters* required
type*string
Lookup table to search: naics (industry codes), psc (product/service codes), cfda (assistance programs), awarding_agency (agency names), recipient (recipient names)one of naics · psc · cfda · awarding_agency · recipient
limitinteger
Maximum number of results to return (1–50)default: 10
search_text*string
Free-text search string — use a description, keyword, or partial code to find matches
usaspending_search_awardsSearch federal awards by keyword, recipient, agency, award type, NAICS code, location, or date range. Returns ranked award summaries including recipient names, amounts, awarding agencies, and generated award IDs for use with usaspending_get_award. Award types: A/B/C/D = contra...11 params

Search federal awards by keyword, recipient, agency, award type, NAICS code, location, or date range. Returns ranked award summaries including recipient names, amounts, awarding agencies, and generated award IDs for use with usaspending_get_award. Award types: A/B/C/D = contra...

Parameters* required
pageinteger
Page number (1-based)default: 1
sortstring
Sort field for resultsone of Award Amount · Total Outlays · Start Date · End Date · Recipient Name · Awarding Agencydefault: Award Amount
limitinteger
Maximum results per page (1–100)default: 10
orderstring
Sort directionone of asc · descdefault: desc
keywordstring
Full-text search across award descriptions, recipient names, and place names
agency_namestring
Filter to a specific awarding agency by name (e.g., "Department of Defense"). Use usaspending_autocomplete type=awarding_agency to find exact names.
naics_codesarray
Filter by NAICS industry codes (e.g., ["541512"]). Use usaspending_autocomplete type=naics to look up codes.
time_periodobject
Filter awards by date range (action date)
recipient_namestring
Filter by recipient name (partial match). Use usaspending_search_recipients for precise recipient_id filtering.
location_filterobject
Filter by place of performance location. Uses FIPS codes and 2-letter state abbreviations, not place names — use a geocoding server to resolve names to codes first.
award_type_codesarray
Filter by award type codes. All codes must belong to a single group: A/B/C/D (contracts), 02/03/04/05 (grants), 06/10 (direct payments), 07/08 (loans), IDV_A–IDV_E (IDVs). Defaults to contracts. Mixing groups across categories causes a 422 error.
usaspending_get_awardFetch full details of a federal award by its generated unique award ID. Returns contract or assistance award data including recipient info, agency hierarchy, period of performance, place of performance, funding account linkages (account_obligations_by_defc), parent IDV informa...1 params

Fetch full details of a federal award by its generated unique award ID. Returns contract or assistance award data including recipient info, agency hierarchy, period of performance, place of performance, funding account linkages (account_obligations_by_defc), parent IDV informa...

Parameters* required
award_id*string
Generated unique award ID (e.g., CONT_AWD_FA862118F6251_9700_FA862115D6276_9700) — use generated_internal_id from usaspending_search_awards
usaspending_get_award_transactionsList individual transactions (contract modifications, grant amendments) on a federal award. Each transaction represents a change event — obligation modifications, performance period extensions, scope changes, etc. Use this to trace the spending history and obligation changes o...5 params

List individual transactions (contract modifications, grant amendments) on a federal award. Each transaction represents a change event — obligation modifications, performance period extensions, scope changes, etc. Use this to trace the spending history and obligation changes o...

Parameters* required
pageinteger
Page number (1-based)default: 1
sortstring
Sort field for transactionsone of action_date · federal_action_obligation · modification_numberdefault: action_date
limitinteger
Maximum transactions per page (1–100)default: 10
orderstring
Sort directionone of asc · descdefault: desc
award_id*string
Generated unique award ID (generated_internal_id from usaspending_search_awards)
usaspending_get_award_subawardsList subaward contracts or grants under a prime federal award. Reveals the sub-contractor or sub-grantee layer — the organizations that actually perform the work. Each row shows the subaward number, amount, description, action date, and recipient. Check subaward_count on usasp...5 params

List subaward contracts or grants under a prime federal award. Reveals the sub-contractor or sub-grantee layer — the organizations that actually perform the work. Each row shows the subaward number, amount, description, action date, and recipient. Check subaward_count on usasp...

Parameters* required
pageinteger
Page number (1-based)default: 1
sortstring
Sort field for subawardsone of subaward_number · description · action_date · amount · recipient_namedefault: action_date
limitinteger
Maximum subawards per page (1–100)default: 10
orderstring
Sort directionone of asc · descdefault: desc
award_id*string
Generated unique award ID (generated_internal_id from usaspending_search_awards)
usaspending_get_idv_awardsList child contracts and task/delivery orders placed under an IDV (Indefinite Delivery Vehicle) award. Each row includes the generated_unique_award_id to chain into usaspending_get_award for full detail. The award_id must be the generated_unique_award_id of the parent IDV — ob...6 params

List child contracts and task/delivery orders placed under an IDV (Indefinite Delivery Vehicle) award. Each row includes the generated_unique_award_id to chain into usaspending_get_award for full detail. The award_id must be the generated_unique_award_id of the parent IDV — ob...

Parameters* required
pageinteger
Page number (1-based)default: 1
sortstring
Field to sort child awards by (e.g., obligated_amount, period_of_performance_start_date)default: obligated_amount
typestring
Type of child awards to list: child_awards = task/delivery orders, child_idvs = sub-IDVs, grandchild_awards = orders under sub-IDVsone of child_awards · child_idvs · grandchild_awardsdefault: child_awards
limitinteger
Maximum results per page (1–100)default: 10
orderstring
Sort directionone of asc · descdefault: desc
award_id*string
Parent IDV generated_unique_award_id (e.g., CONT_IDV_NNK14MA74C_8000) — use generated_internal_id from usaspending_search_awards or generated_unique_award_id from usaspending_get_award
usaspending_search_recipientsSearch for organizations or individuals receiving federal funds by name or UEI (Unique Entity Identifier). Returns recipient IDs (UUID hashes), total award amounts, business type classifications, and location data. Recipient IDs from this tool can be passed to usaspending_get_...3 params

Search for organizations or individuals receiving federal funds by name or UEI (Unique Entity Identifier). Returns recipient IDs (UUID hashes), total award amounts, business type classifications, and location data. Recipient IDs from this tool can be passed to usaspending_get_...

Parameters* required
limitinteger
Maximum results to return (1–100)default: 10
keyword*string
Name, UEI, DUNS, or keyword to search for — partial matches are supported
award_typestring
Filter by award type category to scope the total amounts returnedone of contracts · grants · direct_payments · loans · other_financial_assistance
usaspending_get_recipientFetch a recipient's full profile including address, business type classifications, parent organization, alternate names, and total award amounts by category. Recipient IDs are UUID hashes with a level suffix (-P parent, -C child, -R standalone) from usaspending_search_recipien...3 params

Fetch a recipient's full profile including address, business type classifications, parent organization, alternate names, and total award amounts by category. Recipient IDs are UUID hashes with a level suffix (-P parent, -C child, -R standalone) from usaspending_search_recipien...

Parameters* required
award_typestring
Award type category to scope award totalsone of contracts · grants · direct_payments · loans · other_financial_assistance
fiscal_yearinteger
Fiscal year to scope award totals (e.g., 2024)
recipient_id*string
Recipient hash ID (UUID with level suffix, e.g., b97d19b0-833c-8d8f-3a2c-157d04ea55ef-P) — from usaspending_search_recipients or usaspending_get_award
usaspending_get_agencyFetch an agency's current fiscal year overview including mission, budget authority, obligation totals, sub-agency count, and DEF codes for disaster/emergency funding. Also returns sub-agency breakdown with transaction counts. Accepts either a 3-digit toptier_code (e.g., 097 fo...2 params

Fetch an agency's current fiscal year overview including mission, budget authority, obligation totals, sub-agency count, and DEF codes for disaster/emergency funding. Also returns sub-agency breakdown with transaction counts. Accepts either a 3-digit toptier_code (e.g., 097 fo...

Parameters* required
agency_slugstring
URL-friendly agency slug (e.g., department-of-defense) — from usaspending_list_agencies or award search results. Use either toptier_code or agency_slug, not both.
toptier_codestring
3-digit toptier agency code (e.g., 097, 012) — from usaspending_list_agencies. Use either toptier_code or agency_slug, not both.
usaspending_spending_by_geographyAggregate federal spending by state, county, or congressional district. Useful for per-capita analysis, regional comparisons, and mapping federal investment patterns. Geographic filters accept FIPS codes and 2-letter state abbreviations — NOT place names. Resolve place names t...4 params

Aggregate federal spending by state, county, or congressional district. Useful for per-capita analysis, regional comparisons, and mapping federal investment patterns. Geographic filters accept FIPS codes and 2-letter state abbreviations — NOT place names. Resolve place names t...

Parameters* required
scope*string
Which location to aggregate by: place_of_performance (where work is done) or recipient_location (where the recipient is based)one of place_of_performance · recipient_location
filtersobject
Optional filters to scope the spending aggregation
geo_layer*string
Geographic granularity: state (50 states), county (county-level), or district (congressional district)one of state · county · district
subawardsboolean
Include subaward data instead of prime award datadefault: false
usaspending_spending_by_categoryAggregate federal spending grouped by a specific dimension: NAICS industry code, PSC product/service code, awarding agency, funding agency, CFDA assistance program, or recipient. Returns top items with obligation amounts — useful for trend and breakdown analysis. Chain NAICS c...4 params

Aggregate federal spending grouped by a specific dimension: NAICS industry code, PSC product/service code, awarding agency, funding agency, CFDA assistance program, or recipient. Returns top items with obligation amounts — useful for trend and breakdown analysis. Chain NAICS c...

Parameters* required
pageinteger
Page number (1-based)default: 1
limitinteger
Maximum items to return (1–100)default: 10
filtersobject
Optional filters to scope the aggregation
category*string
Breakdown dimension: naics (industry), psc (product/service code), awarding_agency, awarding_subagency, funding_agency, funding_subagency, cfda (assistance programs), recipient_duns, or recipient_parent_dunsone of naics · psc · awarding_agency · awarding_subagency · funding_agency · funding_subagency
usaspending_spending_over_timeFetch aggregated federal obligation amounts grouped by fiscal year, fiscal quarter, or calendar month. Filter by award type, agency, recipient, keyword, or NAICS code to trace spending trends in a specific area. Returns per-period totals and optional breakdowns by award catego...3 params

Fetch aggregated federal obligation amounts grouped by fiscal year, fiscal quarter, or calendar month. Filter by award type, agency, recipient, keyword, or NAICS code to trace spending trends in a specific area. Returns per-period totals and optional breakdowns by award catego...

Parameters* required
group*string
Time grouping: fiscal_year (annual US govt FY: Oct–Sep), quarter (fiscal quarter), or month (calendar month)one of fiscal_year · quarter · month
filtersobject
Filters to scope the time-series aggregation. Defaults to contract awards when omitted.
subawardsboolean
Aggregate subaward data instead of prime award datadefault: false
usaspending_disaster_spendingFetch disaster and emergency supplemental spending (COVID-19, hurricanes, infrastructure law, etc.) broken down by agency, CFDA assistance program, recipient, or geography. Use the dimension parameter to select the breakdown axis: overview (top-level totals), agency, cfda, rec...5 params

Fetch disaster and emergency supplemental spending (COVID-19, hurricanes, infrastructure law, etc.) broken down by agency, CFDA assistance program, recipient, or geography. Use the dimension parameter to select the breakdown axis: overview (top-level totals), agency, cfda, rec...

Parameters* required
pageinteger
Page number (1-based)default: 1
limitinteger
Maximum results per page (1–100, not used for overview dimension)default: 10
filtersobject
Filters — def_codes is required for all non-overview dimensions (agency, cfda, recipient, geography)
dimension*string
Breakdown axis: overview (top-level totals and DEF code funding), agency (by awarding agency), cfda (by assistance program), recipient (by recipient), geography (by state/county)one of overview · agency · cfda · recipient · geography
spending_typestring
Data type: award (award-level obligations and outlays) or total (includes direct non-award spending). Applies to agency and recipient dimensions only.one of award · totaldefault: award
usaspending_get_federal_accountFetch a federal account's budget data: total obligations, gross outlays, and budgetary resources. Federal accounts connect appropriations law to actual agency spending. Account codes appear in usaspending_get_award account_obligations_by_defc field and are formatted as AGENCY-...1 params

Fetch a federal account's budget data: total obligations, gross outlays, and budgetary resources. Federal accounts connect appropriations law to actual agency spending. Account codes appear in usaspending_get_award account_obligations_by_defc field and are formatted as AGENCY-...

Parameters* required
account_code*string
Federal account code in AGENCY-MAIN format (e.g., 097-0100). Appears in award funding details from usaspending_get_award.
usaspending_search_federal_accountsList and keyword-search federal accounts by agency identifier or title keyword. Returns account numbers, names, managing agencies, and budgetary resources. Use account_number from results as input to usaspending_get_federal_account for full budget detail. Use usaspending_list_...6 params

List and keyword-search federal accounts by agency identifier or title keyword. Returns account numbers, names, managing agencies, and budgetary resources. Use account_number from results as input to usaspending_get_federal_account for full budget detail. Use usaspending_list_...

Parameters* required
pageinteger
Page number (1-based)default: 1
limitinteger
Maximum results per page (1–100)default: 10
keywordstring
Filter accounts by name or title keyword (e.g., "defense", "transportation")
sort_fieldstring
Field to sort results byone of account_name · account_number · budgetary_resources · managing_agencydefault: budgetary_resources
sort_directionstring
Sort directionone of asc · descdefault: desc
agency_identifierstring
3-digit agency identifier code (e.g., "097" for Department of Defense). Use usaspending_list_agencies to look up codes.

@cyanheads/usaspending-mcp-server

Access US federal award, recipient, agency, and spending analytics data from USAspending.gov via MCP. STDIO or Streamable HTTP.

16 Tools

Version License Docker MCP SDK npm TypeScript Bun

Install in Claude Desktop Install in Cursor Install in VS Code

Framework

Public Hosted Server: https://usaspending.caseyjhand.com/mcp


Tools

16 tools covering the full USAspending.gov API surface — award discovery and detail, recipient and agency profiles, spending analytics (by geography, category, and time), disaster/emergency spending, and federal account data:

ToolDescription
usaspending_search_awardsSearch federal awards by keyword, recipient, agency, award type, NAICS code, location, or date range. Returns ranked award summaries with recipient names, amounts, agencies, and award IDs for chaining.
usaspending_get_awardFetch full details of a federal award by its generated ID. Returns contract or assistance data, parent IDV info, subaward count, and funding account linkages.
usaspending_get_idv_awardsList child contracts and task/delivery orders placed under an IDV award. Each row includes a generated_unique_award_id for chaining into usaspending_get_award.
usaspending_get_award_transactionsList individual transactions (modifications, amendments) on an award. Reveals spending history and obligation changes over time.
usaspending_get_award_subawardsList subaward contracts or grants under a prime award. Reveals the sub-contractor or sub-grantee layer — who actually does the work.
usaspending_search_recipientsSearch for organizations receiving federal funds by name or UEI. Returns recipient IDs, total award amounts, and business type classifications.
usaspending_get_recipientFetch a recipient's profile: address, business types, parent organization, alternate names, and total award amounts by type.
usaspending_get_agencyFetch an agency's fiscal year overview: mission, budget authority, obligation totals, sub-agency count, and DEF codes. Accepts a 3-digit toptier_code or an agency_slug from award search results.
usaspending_spending_by_geographyAggregate federal spending by state, county, or congressional district. Returns per-capita figures when combined with population data.
usaspending_spending_by_categoryAggregate spending grouped by NAICS code, PSC code, awarding agency, funding agency, CFDA program, or recipient. Returns top items with amounts for trend and breakdown analysis.
usaspending_spending_over_timeFetch aggregated spending by fiscal year, fiscal quarter, or calendar month. Filter by award type, agency, recipient, or keyword to trace trends in a specific area.
usaspending_disaster_spendingFetch disaster and emergency supplemental spending (COVID-19, hurricanes, etc.) broken down by agency, CFDA program, recipient, or geography. Filter by DEF codes to isolate a specific appropriation.
usaspending_get_federal_accountFetch a federal account's budget data: total obligations, outlays, program activities, and object class breakdown. Account codes appear in award funding details.
usaspending_search_federal_accountsList and keyword-search federal accounts by agency identifier or title keyword. Returns account numbers for chaining into usaspending_get_federal_account.
usaspending_list_agenciesList all top-tier federal agencies with toptier codes, budget authority amounts, and obligation totals. Entry point for agency navigation.
usaspending_autocompleteLook up valid code values for filter fields: NAICS, PSC, CFDA, recipient names, or agency names. Use before filtering to discover the right code from a description.

usaspending_search_awards

Search for federal awards across contracts, grants, loans, direct payments, and IDVs.

  • Full-text keyword search across award descriptions, recipient names, and locations
  • Filter by award type codes (A/B/C/D = contracts, 02/03/04/05 = grants, 06/10 = direct payments, 07/08 = loans, IDV_* = IDVs)
  • Filter by awarding or funding agency (toptier or subtier), recipient name or ID, NAICS code, PSC code, and place of performance
  • Date range filtering — earliest 2007-10-01 via search API
  • Pagination via limit (max 100) and page; page_metadata.hasNext signals more results
  • Returns generated_internal_id for chaining to usaspending_get_award and agency_slug for chaining to usaspending_get_agency

usaspending_get_award

Fetch complete details for a single federal award by its generated ID.

  • Returns type, description, total obligation, date signed, and subaward count
  • Exposes recipient.recipient_hash for chaining to usaspending_get_recipient
  • Exposes parent_award.generated_unique_award_id for traversing IDV parent chains
  • Includes NAICS code and product/service code from the latest transaction
  • Returns account_obligations_by_defc linking the award to specific disaster/emergency appropriations
  • Award IDs use the generated_unique_award_id format (e.g., CONT_AWD_FA862118F6251_9700_...)

usaspending_get_idv_awards

List child contracts and orders placed under an IDV (Indefinite Delivery Vehicle) award.

  • award_id must be the generated_unique_award_id of the parent IDV — from usaspending_search_awards (generated_internal_id field) or from usaspending_get_award
  • type selects what to list: child_awards (task/delivery orders), child_idvs (sub-IDVs), or grandchild_awards
  • Each row returns generated_unique_award_id for chaining into usaspending_get_award for full detail
  • Pagination via limit and page; note: no total count is available from this endpoint
  • An invalid award_id or an IDV with no children of the requested type returns an empty result set

usaspending_get_award_transactions

List obligation history and modifications for an award.

  • Each row is one transaction: action_date, federal_action_obligation, modification_number, and description
  • Pagination via limit and page; configurable sort and order

usaspending_get_award_subawards

List subawards under a prime contract or grant.

  • Each row covers: subaward number, description, action date, amount, and recipient name
  • Reveals the supply chain below the prime — who actually performs the work
  • Pagination via limit and page; configurable sort and order

usaspending_search_recipients

Search for organizations receiving federal funds by name or UEI.

  • Returns recipient IDs (UUID hashes with level suffix: -P parent, -C child, -R root), UEI, DUNS, name, recipient level, and total award amount
  • results[].id chains to usaspending_get_recipient; uei and duns chain to SAM.gov or SEC EDGAR

usaspending_get_recipient

Fetch a recipient's full profile.

  • Returns address, business type classifications, parent organization, alternate names
  • Optionally scope to a specific fiscal year and award type
  • Requires the UUID-based recipient ID from usaspending_search_recipients

usaspending_get_agency

Fetch an agency's current fiscal year overview.

  • Returns mission, budget authority amount, obligation amount, sub-agency count, and DEF codes
  • Accepts either a 3-digit toptier_code (e.g., 097 for DoD) or an agency_slug (e.g., department-of-defense) — slugs appear in award search results, eliminating an intermediate lookup
  • Includes sub-agency breakdown with transaction counts

usaspending_spending_by_geography

Aggregate federal spending by geographic unit.

  • scope: place_of_performance or recipient_location
  • geo_layer: state, county, or district
  • Returns shape_code, display_name, aggregated_amount, and per_capita (when population is available)
  • Geographic filters require FIPS codes or 2-letter state abbreviations — use a geocoding server (e.g., Census or OpenStreetMap) to resolve place names first

usaspending_spending_by_category

Aggregate spending broken down by a single dimension.

  • category enum maps to the right sub-route: naics, psc, awarding_agency, funding_agency, cfda, or recipient
  • Returns top items with amounts and codes for trend analysis
  • Accepts the standard award filter object for scoping to a specific agency, time period, or keyword

usaspending_spending_over_time

Fetch aggregated spending grouped by time period.

  • group: fiscal_year, quarter, or month
  • Filter by award type, agency, recipient, or keyword to trace trends in a specific area
  • subawards: true shifts aggregation to the subaward layer

usaspending_disaster_spending

Fetch disaster and emergency supplemental spending consolidated from nine+ API endpoints.

  • dimension enum selects the breakdown axis: overview, agency, cfda, recipient, or geography
  • spending_type selects between award-level obligations and outlays (award) and total spending including direct non-award amounts (total, agency and recipient dimensions only)
  • Filter by def_codes to isolate a specific emergency appropriation (e.g., COVID-19 = L, M, N, O, P, U)
  • Returns obligation, outlay, and award count per row

usaspending_get_federal_account

Fetch budget data for a federal account identified by its account code.

  • Returns account title, federal account code, budget function, and managing agency
  • Includes fiscal year snapshot with total obligations and outlays
  • Program activity and object class breakdown shows how funds are categorized
  • Account codes appear in account_obligations_by_defc from usaspending_get_award

usaspending_search_federal_accounts

List and keyword-search federal accounts by agency or title keyword.

  • keyword filters by account name/title (e.g., "defense", "transportation")
  • agency_identifier filters to a specific agency by 3-digit code (e.g., "097" for DoD) — use usaspending_list_agencies to look up codes
  • sort_field enum: account_name, account_number, budgetary_resources (default), managing_agency
  • Returns account_number (format "097-8097") for chaining into usaspending_get_federal_account for full budget detail
  • Pagination via limit and page; count in page_metadata is the total matches

usaspending_list_agencies

List all top-tier federal agencies.

  • Returns agency name, abbreviation, toptier_code, agency_slug, obligated amount, and budget authority amount for the current fiscal year
  • Entry point for agency navigation — toptier_code is required by usaspending_get_agency and agency filters
  • Configurable sort and order

usaspending_autocomplete

Discover valid code values for award filter fields.

  • type enum selects the lookup: naics, psc, cfda, awarding_agency, or recipient
  • Returns matching codes and names — use before filtering to find the right code when you only know a description (e.g., "cybersecurity" → NAICS code)
  • Consolidates five autocomplete endpoints into one tool

Features

Built on @cyanheads/mcp-ts-core:

  • Declarative tool definitions — single file per tool, framework handles registration and validation
  • Unified error handling — handlers throw, framework catches, classifies, and formats
  • Pluggable auth: none, jwt, oauth
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • STDIO and Streamable HTTP transports

USAspending-specific:

  • Full USAspending.gov API v2 coverage — award search, award detail, recipient and agency profiles, spending analytics, disaster spending, and federal accounts
  • No authentication required — all data is public domain under the DATA Act
  • usaspending_spending_by_category consolidates 14 category sub-routes behind a single category enum; usaspending_disaster_spending consolidates 9+ disaster endpoints behind dimension + spending_type enums
  • usaspending_get_agency accepts both toptier_code and agency_slug, eliminating the intermediate agency-list lookup that award search results would otherwise require
  • usaspending_autocomplete serves as the code-discovery step before filtering — maps human-readable terms to NAICS, PSC, CFDA, and agency codes

Agent-friendly output:

  • Chaining fields on every response — generated_internal_id, agency_slug, recipient_hash, and account_code fields are surfaced explicitly so agents can follow the money without parsing identifiers out of display strings
  • Pagination metadata on all list responses — page_metadata.hasNext, page_metadata.page, and page_metadata.total let agents iterate large result sets without guessing
  • Structured geographic outputs — shape_code, display_name, aggregated_amount, and per_capita are typed consistently across state, county, and district views for composable analysis

Getting started

Public Hosted Instance

A public instance is available at https://usaspending.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

{
  "mcpServers": {
    "usaspending-mcp-server": {
      "type": "streamable-http",
      "url": "https://usaspending.caseyjhand.com/mcp"
    }
  }
}

Self-Hosted / Local

Add the following to your MCP client configuration file. No API key is required — USAspending.gov data is public domain.

{
  "mcpServers": {
    "usaspending-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/usaspending-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Or with npx (no Bun required):

{
  "mcpServers": {
    "usaspending-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/usaspending-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "usaspending-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "MCP_TRANSPORT_TYPE=stdio",
        "ghcr.io/cyanheads/usaspending-mcp-server:latest"
      ]
    }
  }
}

For Streamable HTTP, set the transport and start the server:

MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp

Prerequisites

  • Bun v1.3.0 or higher (or Node.js v24+).
  • No API key required — USAspending.gov is a public data platform with no authentication requirement.

Installation

  1. Clone the repository:
git clone https://github.com/cyanheads/usaspending-mcp-server.git
  1. Navigate into the directory:
cd usaspending-mcp-server
  1. Install dependencies:
bun install
  1. Configure environment (optional):
cp .env.example .env
# edit .env if you need to override defaults

Configuration

All configuration is validated at startup via Zod schemas in src/config/server-config.ts. No environment variables are required — the defaults work out of the box.

VariableDescriptionDefault
USASPENDING_BASE_URLBase URL for the USAspending.gov API.https://api.usaspending.gov/api/v2/
USASPENDING_TIMEOUT_MSPer-request HTTP timeout in milliseconds.30000
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for the HTTP server.3010
MCP_HTTP_ENDPOINT_PATHHTTP endpoint path./mcp
MCP_PUBLIC_URLPublic origin override for TLS-terminating reverse-proxy deployments.—
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.).info
LOGS_DIRDirectory for log files (Node.js only).<project-root>/logs
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1.in-memory
OTEL_ENABLEDEnable OpenTelemetry instrumentation.false

See .env.example for the full list of optional overrides.

Running the server

Local development

  • Build and run:

    # One-time build
    bun run rebuild
    
    # Run the built server
    bun run start:stdio
    # or
    bun run start:http
    
  • Run checks and tests:

    bun run devcheck   # Lint, format, typecheck, security
    bun run test       # Vitest test suite
    bun run lint:mcp   # Validate MCP definitions against spec
    

Docker

docker build -t usaspending-mcp-server .
docker run --rm -p 3010:3010 usaspending-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/usaspending-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers tools and inits services.
src/configServer-specific environment variable parsing and validation with Zod.
src/mcp-server/toolsTool definitions (*.tool.ts).
src/servicesUSAspending API client and service layer.
tests/Unit and integration tests mirroring src/.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • Register new tools via the barrels in src/mcp-server/tools/definitions/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields

Contributing

Issues and pull requests are welcome. Run checks and tests before submitting:

bun run devcheck
bun run test

License

Apache-2.0 — see LICENSE for details.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Configuration

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Categories
Monitoring & ObservabilityData & Analytics
Registryactive
Package@cyanheads/usaspending-mcp-server
TransportSTDIO, HTTP
Tools verifiedJun 10, 2026
UpdatedJun 9, 2026
View on GitHub

Related Monitoring & Observability MCP Servers

View all →
Mcp Observability

io.github.infoinlet-marketplace/mcp-observability

Observability for incident agents — query Loki (LogQL), Prometheus (PromQL), Elasticsearch.
Monitor

betterdb-inc/monitor

BetterDB MCP server - Valkey observability for Claude Code and other MCP clients
1.1k
Datadog

com.mcparmory/datadog

Monitor infrastructure, manage agents and deployments, track metrics, logs, and events
25
Observability Mcp

thotischner/observability-mcp

Unified observability gateway for AI agents — Prometheus, Loki & more, with anomaly detection.
5
Datadog Mcp

io.github.tantiope/datadog-mcp

Full Datadog API access: monitors, logs, metrics, traces, dashboards, and observability tools
4
Datadog

io.github.us-all/datadog

Datadog MCP — 165 tools for metrics, monitors, logs, APM, RUM, incidents, CI/CD, fleet
1