MCP server for USASpending.gov federal contract and award data
Project description
usaspending-gov-mcp
MCP server for the USASpending.gov federal contract and award data API.
No API key required. Works with any MCP-compatible client (Claude Desktop, Claude Code, Cursor, Cline, Continue, Zed, etc.).
What it does
Exposes the USASpending.gov REST API as 17 MCP tools covering:
Search and aggregation
search_awards- Primary search for contracts, IDVs, grants, loans, direct paymentsget_award_count- Dimensional counts across award categoriesspending_over_time- Time series aggregation (fiscal year, quarter, month)spending_by_category- Top N breakdowns by agency, vendor, NAICS, PSC, state, etc.
Award detail
get_award_detail- Full record for a single awardget_transactions- Full modification history for an awardget_award_funding- File C funding data (Treasury account, object class, program activity)get_idv_children- Task/delivery orders under an IDV
Workflow convenience
lookup_piid- Auto-detects contract vs IDV and returns the matching award
Autocomplete
autocomplete_psc- Product/Service Code lookupautocomplete_naics- NAICS code lookup
Reference data
list_toptier_agencies- All federal agenciesget_agency_overview- Agency summary by toptier code and fiscal yearget_agency_awards- Agency award totals by categoryget_naics_details- NAICS code details (2-6 digit)get_psc_filter_tree- PSC hierarchy, drillableget_state_profile- State-level spending profile by FIPS code
Installation
Via pip
pip install usaspending-gov-mcp
Via uvx (recommended, no venv needed)
uvx usaspending-gov-mcp
From source
git clone https://github.com/1102tools/usaspending-gov-mcp.git
cd usaspending-gov-mcp
pip install -e .
Claude Desktop configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"usaspending": {
"command": "uvx",
"args": ["usaspending-gov-mcp"]
}
}
}
If you installed via pip install -e . or a regular pip install:
{
"mcpServers": {
"usaspending": {
"command": "python",
"args": ["-m", "usaspending_gov_mcp.server"]
}
}
}
Restart Claude Desktop. The server should appear in the MCP tools panel.
Claude Code configuration
Add to ~/.claude.json or your project's .claude.json:
{
"mcpServers": {
"usaspending": {
"command": "uvx",
"args": ["usaspending-gov-mcp"]
}
}
}
Example prompts
Once configured, try:
- "Show me the top 10 NAVSEA contracts awarded in FY2025 by dollar value."
- "Find all software development contracts at NASA with sole-source justifications in the last year."
- "How much has Leidos received in federal awards since 2020? Group by fiscal year."
- "What are the top 15 recipients of HUBZone set-aside contracts at DoD?"
- "Pull the full modification history for PIID N00024-24-C-0085."
- "Compare FFP vs T&M award counts for IT services at Air Force in FY2024."
Design notes
- No authentication required. USASpending.gov is a free, public API.
- Award type groups cannot be mixed. The
award_typeparameter takes one of:contracts,idvs,grants,loans,direct_payments,other. Use separate calls for separate categories. - Actionable error messages. Common API errors (422 mixed award types, 400 sort field missing, 400 empty keywords) are translated into guidance for the calling LLM.
- Sort field auto-handling. The USASpending API requires the sort field to appear in the fields array; this server adds it automatically.
- Sensible defaults. Search limits default to 25 (API max 100). Default fields cover the most common columns for each award category.
- Flat filter parameters. Most common filters are surfaced as named parameters (
keywords,awarding_agency,naics_codes, etc.) rather than a nested filter dict, for better LLM tool discovery.
Data source
All data is sourced from USASpending.gov, which aggregates FPDS-NG contract data, FAADC assistance data, and agency DATA Act submissions. Data freshness varies by agency: non-DoD contract data is typically available within 5 business days, DoD and USACE procurement data has a 90-day reporting delay in FPDS, and financial assistance data is available within 2 days of submission.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usaspending_gov_mcp-0.1.3.tar.gz.
File metadata
- Download URL: usaspending_gov_mcp-0.1.3.tar.gz
- Upload date:
- Size: 63.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
022846703d5e0c3e9d8e5881fedbab3fd8b0439a522f80b9b523577fae912f9a
|
|
| MD5 |
859ce67aafde4019c2b50cee803aa709
|
|
| BLAKE2b-256 |
5396b41006a5d14cfa388914b47aa2e86b0d49c8e83f35e93a4ca4323b825f10
|
File details
Details for the file usaspending_gov_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: usaspending_gov_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2568f35a0628662637d7da5ce25ee5f72933cdf5c9f560bd69fba4c43a7ba668
|
|
| MD5 |
73b0166535e72e8917867e113014aa62
|
|
| BLAKE2b-256 |
197106708600bfbd1b63e08d1c7b989591ab9e10dc796a2460d6ee8e2097c4c8
|