usaspending-gov-mcp
MCP server for the USASpending.gov federal contract, award, subaward, recipient, agency, and federal account API.
No API key required. MCP is an open standard: this server runs in any MCP client, not just Claude. Executed and verified on eleven platforms in August 2026 (see Configuration).
Tested and hardened through ten rounds of integration testing against the live USASpending.gov API. 2,151 regression tests (1,783 offline, 368 live-gated); round 10 fixed 25 verified findings across both tool families, including filters that could never match and a tool that had never once succeeded. See testing.md for the full testing record.
What it does
Exposes the USASpending.gov REST API as 55 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.spending_by_transaction- Modification-level transaction searchspending_by_geography- State, county, or congressional district breakdownnew_awards_over_time- Pipeline trend for a recipient
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_award_funding_rollup- Single-line funding summaryget_award_subaward_count,get_award_federal_account_count,get_award_transaction_countget_idv_children- Task/delivery orders under an IDVawards_last_updated- Data freshness check
Subawards (FFATA)
search_subawards- Subawards under a single primespending_by_subaward_grouped- Subaward search with full filter set
Recipients
search_recipients- Search recipients by keywordget_recipient_profile- Full recipient recordget_recipient_children- Subsidiaries of a parent recipientautocomplete_recipient- Find recipient hashes by partial namelist_states- All states with FIPS codes
Agency depth
list_toptier_agencies,get_agency_overview,get_agency_awardsget_agency_budgetary_resources- Budget resources by FYget_agency_sub_agencies- Subordinate orgs with obligationsget_agency_federal_accounts- Funding sources (TAS)get_agency_object_classes- Spending categories (OMB)get_agency_program_activities- Program-level breakdownget_agency_obligations_by_award_category- Contract vs grant mix
IDV depth
get_idv_amounts- Top-line IDV rollupget_idv_funding,get_idv_funding_rollup- File C for IDVget_idv_activity- Child orders under an IDV
Federal accounts (Treasury)
list_federal_accounts- Search TASget_federal_account_detail,get_federal_account_object_classes,get_federal_account_program_activities,get_federal_account_fy_snapshot
Autocomplete
autocomplete_psc,autocomplete_naicsautocomplete_awarding_agency,autocomplete_funding_agencyautocomplete_cfda(grants),autocomplete_glossary,autocomplete_recipient
Reference data
get_naics_details,get_psc_filter_treeget_award_types_reference- All award type codes (A=BPA Call etc.)get_def_codes_reference- Disaster Emergency Fund codes (COVID, IIJA, IRA)get_glossary- Acquisition/spending vocabularyget_submission_periods- Agency reporting period coverageget_state_profile- State-level spending profile
Workflow convenience
lookup_piid- Auto-detects contract vs IDV and returns the matching award
Installation
Via pip
pip install usaspending-gov-mcp
Via uvx (recommended, no venv needed)
uvx --from usaspending-gov-mcp usaspending-mcp
The --from is required for this server and only this server. The PyPI package
is usaspending-gov-mcp but the console script it installs is usaspending-mcp,
so a bare uvx usaspending-gov-mcp fails with "An executable named
usaspending-gov-mcp is not provided by package usaspending-gov-mcp".
Do not run uvx usaspending-mcp either. usaspending-mcp is an unrelated
third-party package on PyPI, not this project.
From source
git clone https://github.com/1102tools-dev/federal-contracting-mcps.git
cd federal-contracting-mcps/servers/usaspending-gov-mcp
pip install -e .
Configuration
MCP is an open standard, and this config was executed and verified in August 2026 on eleven platforms: Claude Desktop, Claude Code, Codex Desktop and CLI, Gemini via Antigravity, GitHub Copilot CLI, DeepSeek Harness, Grok Build, Cursor, opencode, and LibreChat. Most clients take the same JSON block below and differ only in where the config file lives; the universal setup guide (PDF) has the exact file path and format for every platform, including the Codex TOML form.
{
"mcpServers": {
"usaspending": {
"command": "uvx",
"args": ["--refresh-package", "usaspending-gov-mcp", "--from", "usaspending-gov-mcp", "usaspending-mcp"]
}
}
}
The --refresh-package flag tells uv to check PyPI for a newer release each time your client launches the server, so fixes arrive automatically; without it, uv keeps serving whatever version it first cached. It adds a moment of network time at startup, so raise your platform's MCP startup timeout if it enforces a short one.
If you installed via pip install -e . or a regular pip install:
{
"mcpServers": {
"usaspending": {
"command": "python",
"args": ["-m", "usaspending_gov_mcp.server"]
}
}
}
Restart the client and the tools appear.
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.
Request pacing
Every upstream request uses a provisional 3-second cross-process anti-burst
interval by default. USASpending does not publish a numeric limit, so this is
a 1102tools safeguard rather than a provider requirement. Override with
FEDERAL_API_MIN_INTERVAL_SECONDS, use 0 to deliberately disable it, and
use FEDERAL_API_PACING_DIR to relocate local pacing state.
License
MIT
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-1.0.3.tar.gz.
File metadata
- Download URL: usaspending_gov_mcp-1.0.3.tar.gz
- Upload date:
- Size: 190.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc256ad6d70930feee9a442fab07b6f915ce471d161b9da3e7a08778d5e7d9ea
|
|
| MD5 |
2185fced11e757b7d6240d79b796df62
|
|
| BLAKE2b-256 |
c849e7f862a635c22ef6676e8bc9ae1e134fd55c05f3b69e73f1a5ce762eb9f1
|
Provenance
The following attestation bundles were made for usaspending_gov_mcp-1.0.3.tar.gz:
Publisher:
publish-pypi.yml on 1102tools-dev/federal-contracting-mcps
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usaspending_gov_mcp-1.0.3.tar.gz -
Subject digest:
dc256ad6d70930feee9a442fab07b6f915ce471d161b9da3e7a08778d5e7d9ea - Sigstore transparency entry: 2555718486
- Sigstore integration time:
-
Permalink:
1102tools-dev/federal-contracting-mcps@8c0fb8a7aa09abc4c59f03570b183e31ff83cef6 -
Branch / Tag:
refs/tags/v1.0.9 - Owner: https://github.com/1102tools-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@8c0fb8a7aa09abc4c59f03570b183e31ff83cef6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file usaspending_gov_mcp-1.0.3-py3-none-any.whl.
File metadata
- Download URL: usaspending_gov_mcp-1.0.3-py3-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47f35aac1f69223bb59ddfa82ee35f6e9a6d26809b438d8497dd0923b596a843
|
|
| MD5 |
7c16354230c4e69ab6c8bc6c261873bb
|
|
| BLAKE2b-256 |
7fc3447227d469d3b100ac67828566aa098386af4eaeafaea0340b158e641a3b
|
Provenance
The following attestation bundles were made for usaspending_gov_mcp-1.0.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on 1102tools-dev/federal-contracting-mcps
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usaspending_gov_mcp-1.0.3-py3-none-any.whl -
Subject digest:
47f35aac1f69223bb59ddfa82ee35f6e9a6d26809b438d8497dd0923b596a843 - Sigstore transparency entry: 2555718804
- Sigstore integration time:
-
Permalink:
1102tools-dev/federal-contracting-mcps@8c0fb8a7aa09abc4c59f03570b183e31ff83cef6 -
Branch / Tag:
refs/tags/v1.0.9 - Owner: https://github.com/1102tools-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@8c0fb8a7aa09abc4c59f03570b183e31ff83cef6 -
Trigger Event:
push
-
Statement type: