USAspending MCP
A free, key-less MCP server for querying U.S. federal spending data from USAspending.gov, including contracts, grants, loans, recipients, agencies, and geographic breakdowns.
README
USAspending MCP
A free, key-less Model Context Protocol server for USAspending.gov — the U.S. government's official record of federal spending. Query contracts, grants, loans, recipients, agencies, and geographic breakdowns directly from the primary source. No API key, no account.
Built with FastMCP. Data covers FY2008-present.
Tools
| Tool | What it does |
|---|---|
usaspending_status |
Check API reachability and list supported award categories. |
list_agencies |
List/search federal toptier agencies; resolve an agency name to its code. |
search_awards |
Search awards (contracts/grants/loans/...) by recipient, agency, keyword, date. |
award_count |
Count matching awards broken down by type (contracts, grants, loans, idvs, ...). |
award_details |
Full detail for one award (amounts, period of performance, recipient, agencies). |
top_recipients |
Top recipients by dollars for an agency + award category over a period. |
spending_by_category |
Aggregate spending by recipient, agency, NAICS, PSC, CFDA, geography, etc. |
recipient_search |
Find recipients by name; returns UEI / DUNS and a recipient id. |
recipient_details |
Profile for one recipient: parent entity, business types, location, totals. |
spending_by_geography |
Spending by state / county / district, by recipient location or place of performance. |
Install
git clone https://github.com/jsconiers/usaspending-mcp.git
cd usaspending-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/python test_usaspending.py # offline tests
Use with Claude Desktop
Add to claude_desktop_config.json (macOS:
~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"usaspending": {
"command": "/absolute/path/to/usaspending-mcp/.venv/bin/python",
"args": ["/absolute/path/to/usaspending-mcp/usaspending_mcp.py"]
}
}
}
Restart Claude Desktop, then ask things like "Who are the top DoD contractors this fiscal year?", "How much has Lockheed Martin been awarded?", or "Show federal contract spending by state."
Award categories
award_category accepts a friendly group that expands to USAspending award-type codes:
| Category | Codes |
|---|---|
contracts |
A, B, C, D |
idvs |
IDV_A ... IDV_E |
grants |
02, 03, 04, 05 |
direct_payments |
06, 10 |
loans |
07, 08 |
other |
09, 11, -1 |
all |
union of the above |
Pass award_type_codes explicitly to override.
Examples
list_agencies(search="defense") -> Department of Defense (code 097)
search_awards(recipient="Lockheed Martin") -> largest contracts + award_internal_id
award_count(recipient="Lockheed Martin") -> {contracts: 6501, grants: 21, idvs: 233, ...}
top_recipients(agency="Department of Defense") -> Lockheed, Electric Boat, Raytheon, ...
spending_by_category(category="naics", agency="Department of Defense")
spending_by_geography(geo_layer="state", agency="Department of Defense")
recipient_search(name="Lockheed Martin") -> UEI / DUNS + recipient_id
Typical flow: search_awards (or top_recipients) to find an award/recipient, then
award_details / recipient_details for the full record.
Data source
All data comes from the public USAspending.gov REST API (https://api.usaspending.gov/).
Please be considerate with request volume.
License
MIT — see LICENSE. Not affiliated with or endorsed by USAspending.gov or the U.S. government. For informational purposes only.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.