USAspending MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@USAspending MCP Server Find top recipients for semiconductor spending in FY2025"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
USAspending MCP Server
Read-only Model Context Protocol server for exploring federal spending through the USAspending.gov API.
Use it from Claude Desktop, Codex, Cursor, VS Code, or any MCP-compatible AI tool to ask questions like:
"Which agencies awarded the most climate-related obligations in FY2025?"
"Find top recipients for semiconductor-related federal spending."
"Show spending over time for affordable housing."
"Get the details behind this USAspending award ID."
"Search transactions for Department of Energy clean energy awards."
USAspending.gov does not require an API key for these endpoints. This server is intentionally read-only and uses local stdio transport.
Why This Exists
USAspending.gov is powerful, but the API has many endpoints and detailed filter shapes. This MCP server gives AI agents a safer, typed tool layer for common federal-spending workflows:
agency and recipient lookup
award and transaction search
spending aggregation by category, geography, and time
award profile lookup
recipient new-award momentum
safe generic calls for documented
/api/v2/endpoints
It is useful for public-sector market analysis, policy research, impact-investing screens, federal contractor diligence, grant monitoring, and thematic government-spending research.
Related MCP server: USA Spending MCP Server
Tools
Tool | What it does |
| List federal toptier agencies and summary budgetary fields. |
| Find recipient names, UEIs, and DUNS values. |
| Find awarding or funding agency offices. |
| Search awards/subawards with Advanced Search filters and selected fields. |
| Aggregate spending by agency, recipient, NAICS, PSC, federal account, state, and more. |
| Aggregate by state, county, district, or country. |
| Aggregate by fiscal year, calendar year, quarter, or month. |
| Count new awards for a recipient by fiscal year, quarter, or month. |
| Search individual transaction records. |
| Count matching transactions by award category. |
| Fetch detailed award profile data. |
| Safely call documented read-only |
The generic endpoint tool blocks job/file-generating download paths, while allowing the read-only /api/v2/download/count/ preflight endpoint.
Requirements
Node.js 20 or newer
npm
No USAspending API key is required.
Install From Source
git clone https://github.com/haydentbs/usaspending-mcp-server.git
cd usaspending-mcp-server
npm install
npm run buildRun a live API smoke test:
npm run smokeRun the MCP regression suite:
npm run test:mcpAdd It To An AI Tool
Build the project first, then point your MCP client at dist/index.js.
Claude Desktop
Add this to your Claude Desktop MCP config:
{
"mcpServers": {
"usaspending": {
"command": "node",
"args": ["/absolute/path/to/usaspending-mcp-server/dist/index.js"]
}
}
}On macOS, Claude Desktop config is commonly located at:
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop after editing the config.
Codex
Add this to ~/.codex/config.toml:
[mcp_servers.usaspending]
command = "node"
args = ["/absolute/path/to/usaspending-mcp-server/dist/index.js"]Restart or reload your Codex session so the new MCP namespace is discovered.
Cursor, VS Code, And Other MCP Clients
Most MCP clients use the same server definition shape:
{
"mcpServers": {
"usaspending": {
"command": "node",
"args": ["/absolute/path/to/usaspending-mcp-server/dist/index.js"]
}
}
}If your tool supports per-project MCP config, place the same server definition there. If it supports global config, add it globally.
Example Prompts
After connecting the MCP server, try:
List the top FY2025 awarding agencies for clean energy spending.Compare FY2021-FY2025 federal spending over time for semiconductor-related awards.Find the top recipients for wastewater-related spending in FY2025 and show their NAICS concentration.Search FY2025 Department of Energy contract awards mentioning hydrogen and return award IDs, recipients, amounts, and descriptions.Example Filters
USAspending Advanced Search filters are passed through as JSON. Most analysis should include an explicit time_period.
Defense contract awards in FY2025:
{
"filters": {
"time_period": [{ "start_date": "2024-10-01", "end_date": "2025-09-30" }],
"agencies": [{ "type": "awarding", "tier": "toptier", "name": "Department of Defense" }],
"award_type_codes": ["A", "B", "C", "D"]
},
"limit": 10,
"page": 1
}Spending by NAICS for a keyword:
{
"category": "naics",
"filters": {
"keywords": ["semiconductor"],
"time_period": [{ "start_date": "2024-10-01", "end_date": "2025-09-30" }]
}
}Recipient new-award trend:
{
"group": "fiscal_year",
"filters": {
"recipient_id": "5ad7895c-192b-21cd-8baf-92c6dce0b593-C",
"time_period": [{ "start_date": "2020-10-01", "end_date": "2025-09-30" }]
}
}Notes And Limitations
USAspending values are obligations/outlays from federal reporting, not company revenue.
Keyword screens are directional. For production research, combine keywords with NAICS, PSC, agency, assistance listing, and award-type filters.
Some USAspending endpoints enforce award-type group constraints. For example, award search should not mix contracts, grants, loans, direct payments, and IDVs in a single
award_type_codesfilter.Large federal-spending queries can be slow. The server uses a request timeout, configurable with
USASPENDING_TIMEOUT_MS.
Development
npm install
npm run build
npm run test:mcpRun the server locally:
npm startRun against TypeScript source during development:
npm run devLicense
MIT
Available Tools
12 toolsusaspending_autocomplete_agencyAutocomplete USAspending AgenciesCRead-onlyIdempotent
Search awarding or funding agency offices for USAspending AdvancedFilterObject agency filters.
Inputs: search_text (required), agency_kind, limit, response_format.
usaspending_autocomplete_recipientAutocomplete USAspending RecipientsARead-onlyIdempotent
Search recipient names, UEIs, and DUNS values for use in USAspending filters.
Inputs: search_text (required), limit, recipient_levels, response_format.
usaspending_call_endpointCall Safe USAspending EndpointARead-onlyIdempotent
Call a documented read-only USAspending v2 endpoint that is not covered by a purpose-built tool. Blocks download and bulk_download paths. Use only with official /api/v2/ endpoints.
Inputs: endpoint_path (required), method, body, query, +1 more.
usaspending_count_transactionsCount USAspending TransactionsARead-onlyIdempotent
Count matching transaction records grouped by award category: contracts, grants, direct payments, loans, IDVs, and other.
Inputs: filters, response_format.
usaspending_get_awardGet USAspending Award DetailBRead-onlyIdempotent
Get detailed USAspending award profile data by generated unique award ID or internal award database ID.
Inputs: award_id (required), response_format.
usaspending_list_toptier_agenciesList USAspending Toptier AgenciesARead-onlyIdempotent
List federal toptier agencies with current USAspending budgetary, obligation, and outlay summary fields. No authentication required.
Inputs: limit, response_format.
usaspending_new_awards_over_timeCount New USAspending Awards Over TimeARead-onlyIdempotent
Count new awards for a specific USAspending recipient over fiscal years, quarters, or months. Requires a recipient_id hash such as values returned by /api/v2/recipient/duns/.
Inputs: filters (required), group, response_format.
usaspending_search_awardsSearch USAspending AwardsARead-onlyIdempotent
Search prime awards or subawards with USAspending AdvancedFilterObject filters and selected fields. Use for questions like top awards for a recipient, agency, date range, award type, NAICS, PSC, or keyword.
Inputs: filters, fields, limit, page, +4 more.
usaspending_search_transactionsSearch USAspending TransactionsARead-onlyIdempotent
Search individual transaction records with USAspending AdvancedFilterObject filters. Use when award-level results are too aggregated and you need action dates, modifications, or transaction amounts.
Inputs: filters, fields, limit, page, +3 more.
usaspending_spending_by_categoryAggregate USAspending By CategoryBRead-onlyIdempotent
Aggregate obligations/outlays by category such as awarding_agency, recipient_duns, naics, psc, federal_account, state_territory, cfda, or defc.
Inputs: category (required), filters, limit, page, +2 more.
usaspending_spending_by_geographyAggregate USAspending By GeographyARead-onlyIdempotent
Aggregate spending by state, county, congressional district, or country using place of performance or recipient location.
Inputs: filters, scope, geo_layer, geo_layer_filters, +2 more.
usaspending_spending_over_timeAggregate USAspending Over TimeCRead-onlyIdempotent
Aggregate obligations and outlays over fiscal years, calendar years, quarters, or months for a USAspending filter set.
Inputs: group, filters, spending_level, response_format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct operation on USAspending data, from autocomplete to searching, counting, and aggregation. No two tools have overlapping purposes, ensuring clear selection by an agent.
All tools follow a consistent 'usaspending_verb_noun' pattern with snake_case, making it predictable which action and resource a tool handles.
With 12 tools covering core operations on federal spending data, the count is well-scoped. Each tool serves a clear purpose without unnecessary redundancy.
The tool set covers all major aspects of USAspending: autocomplete, search, count, aggregation, and listing, plus a generic endpoint caller for edge cases. There are no obvious gaps for common queries.
Maintenance
Related MCP Connectors
USAspending MCP — Federal spending data from USAspending.gov API
Access US federal award, recipient, agency, and spending analytics data from USAspending.gov.
MCP access to the U.S. federal procurement graph: contracts, opportunities, entities, and more.
Search verified-open US grants (federal, state, foundation). Read-only MCP for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceMCP server for querying U.S. Federal Procurement Data System (FPDS-NG) to search federal contract actions by keyword, agency, NAICS, or vendor, with USDC micropayments via x402.-

USA Spending MCP Serverofficial
FlicenseBqualityCmaintenanceAn MCP server for interacting with the USAspending.gov API, supporting local use with Claude Desktop and cloud deployment with login.gov authentication.310-- AlicenseNot gradedqualityDmaintenanceA free, key-less MCP server for querying U.S. federal spending data from USAspending.gov, including contracts, grants, loans, recipients, agencies, and geographic breakdowns.MIT
- AlicenseNot gradedqualityBmaintenanceAccess US federal award, recipient, agency, and spending analytics data from USAspending.gov via MCP, with 18 tools for searching and retrieving detailed records.485 npm5Apache 2.0