USASpending.gov

io.github.1102tools由 GitHub 帳號 1102tools 發布v0.3.2更新於 Oct 24, 2026

USASpending.gov federal contracts, subawards, recipients, agencies. 55 tools.

概覽

AI 產生的概覽

讓助理查詢 USAspending.gov 的聯邦支出資料:合約、補助、貸款、分包、受款方、機關和聯邦帳戶。

可以做什麼
將公開的 USAspending.gov REST API 包裝成 55 個 MCP 工具。搜尋與彙總工具涵蓋獎項查詢、獎項計數、依時間統計支出、依類別統計支出、交易層級查詢和地理分布。明細工具可傳回單一獎項紀錄、修改歷史、資金資料、IDV 子訂單、分包、受款方檔案與子公司、機關預算與計畫明細,以及財政部聯邦帳戶。自動完成與參考工具用於解析 NAICS、PSC、CFDA、機關和受款方名稱。
適用情境
適合聯邦採購與補助研究:獎項歷史、會計年度支出總額、供應商與機關分布、分包報告和預算帳戶查詢。當助理需要結構化的公開採購資料而非一般網頁搜尋時值得加入。
執行需求
以 Python 套件(pypi usaspending-gov-mcp)透過 stdio 在本機執行,通常用 uvx 或 pip 安裝;主控台指令碼名稱為 usaspending-mcp。不需要 API 金鑰或身分驗證,未宣告環境變數或標頭。需要連線至 USAspending.gov API 的網路存取。僅支援桌面端。
安裝前請注意
對公開政府 API 的唯讀查詢,不涉及憑證、付款或寫入動作。資料新鮮度因機關而異;README 提出若干注意事項,例如分包金額為累計值而非淨新增支出、獎項日期區間會比對區間內任何處於活動狀態的獎項,以及會計年度可用性在十月轉換後會變動。安裝錯誤的 PyPI 套件名稱將無法運作。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 USASpending.gov,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

usaspending-gov-mcp

[price: free] [license: MIT] [tools: 55] [regression tests]

Free, open-source MCP server for the USAspending.gov API: contracts, grants, loans, subawards, recipients, agencies, and federal accounts.

Overview, demo video and hosted setup: https://1102tools.com/mcp/usaspending

No API key required, locally or hosted. See Local or hosted.

Regression tests, including live checks against the USAspending API. The October 2026 releases were also checked with realistic contracting questions across all 55 tools (award histories, fiscal-year totals, subcontract reports, federal accounts). See testing.md.

Local or hosted

Local (desktop)Claude (hosted)ChatGPT (hosted)
Local setupInstallInstall
  • Local runs it on your computer, inside the Claude or ChatGPT desktop app or another AI app. You get your own full rate limits, and it relies only on the government service. It doesn't update itself, so ask your AI to update it. You don't have to set it up by hand: give your AI this page's link and ask it to set it up or walk you through it.
  • Hosted is always up to date, needs no setup or keys, and works in Claude or ChatGPT anywhere.

Compare local and hosted · Matching prompts

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 payments
  • program_numbers filter - Narrow grants, loans, and other assistance to an assistance listing (CFDA) number, such as 93.778 for Medicaid. Works on search_awards, get_award_count, spending_over_time, spending_by_category, spending_by_subaward_grouped, spending_by_transaction, and spending_by_geography. Find numbers by program name with autocomplete_cfda.
  • get_award_count - Dimensional counts across award categories
  • spending_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 search
  • spending_by_geography - State, county, or congressional district breakdown
  • new_awards_over_time - Pipeline trend for a recipient

Award detail

  • get_award_detail - Full record for a single award
  • get_transactions - Full modification history for an award
  • get_award_funding - File C funding data (Treasury account, object class, program activity)
  • get_award_funding_rollup - Single-line funding summary
  • get_award_subaward_count, get_award_federal_account_count, get_award_transaction_count
  • get_idv_children - Task/delivery orders under an IDV
  • awards_last_updated - Data freshness check

Subawards (FFATA)

  • search_subawards - Subawards under a single prime
  • spending_by_subaward_grouped - Matching prime awards with cumulative reported subaward totals

Recipients

  • search_recipients - Search recipients by keyword
  • get_recipient_profile - Full recipient record
  • get_recipient_children - Subsidiaries of a parent recipient
  • autocomplete_recipient - Find recipient names by partial name
  • list_states - All states with FIPS codes

For a recipient workflow, take a name from autocomplete_recipient to search_recipients. Use the returned id hash for profiles and new-award trends. To retrieve subsidiaries, pass the parent (-P) row’s uei (or legacy duns) to get_recipient_children; that tool accepts UEI/DUNS.

Agency depth

  • list_toptier_agencies, get_agency_overview, get_agency_awards
  • get_agency_budgetary_resources - Budget resources by FY
  • get_agency_sub_agencies - Subordinate orgs with obligations
  • get_agency_federal_accounts - Funding sources (TAS)
  • get_agency_object_classes - Spending categories (OMB)
  • get_agency_program_activities - Program-level breakdown
  • get_agency_obligations_by_award_category - Contract vs grant mix

IDV depth

  • get_idv_amounts - Top-line IDV rollup
  • get_idv_funding, get_idv_funding_rollup - File C for IDV
  • get_idv_activity - Child orders under an IDV

Federal accounts (Treasury)

  • list_federal_accounts - Search TAS
  • get_federal_account_detail, get_federal_account_object_classes, get_federal_account_program_activities, get_federal_account_fy_snapshot

Autocomplete

  • autocomplete_psc, autocomplete_naics
  • autocomplete_awarding_agency, autocomplete_funding_agency
  • autocomplete_cfda (grants), autocomplete_glossary, autocomplete_recipient

Reference data

  • get_naics_details, get_psc_filter_tree
  • get_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 vocabulary
  • get_submission_periods - Agency reporting period coverage
  • get_state_profile - State-level spending profile

Workflow convenience

  • lookup_piid - Auto-detects contract vs IDV and returns the matching award

Installation

Via pip

bash
pip install usaspending-gov-mcp

Via uvx (recommended, no venv needed)

bash
uvx --refresh-package usaspending-gov-mcp --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

bash
git clone https://github.com/1102tools-dev/federal-contracting-mcps.gitcd federal-contracting-mcps/servers/usaspending-gov-mcppip install -e .

Configuration

Use the configuration below as the server definition and adapt its placement to your compatible MCP client. For practical requests using this source, see the prompt library.

json
{  "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:

json
{  "mcpServers": {    "usaspending": {      "command": "python",      "args": ["-m", "usaspending_gov_mcp.server"]    }  }}

Restart the client and the tools appear.

Tool profiles

Standalone use defaults to USASPENDING_TOOL_PROFILE=full, which exposes all 55 tools. Packaged acquisition agents set USASPENDING_TOOL_PROFILE=acquisition-agent to expose a stable 20-tool subset covering core award search, spending, agency, recipient, NAICS, PSC, transaction, and subaward operations. An unknown profile stops startup with a clear error instead of silently changing the catalog.

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.
  • Fiscal time groups. Fiscal years run October through September; quarter 1 is October–December and month 1 is October. new_awards_over_time combines the source’s fiscal-quarter counts for annual fiscal-year results. A date window that covers only part of a fiscal year returns counts for that requested portion, not the entire year. Quarter and month results retain the source counts.
  • FFATA period scope. spending_by_subaward_grouped ranks cumulative reported subaward totals for matching primes. Its date filters do not trim those totals to subaward actions inside the requested period. For period-specific reports, pass a returned award_generated_internal_id to search_subawards, read every page and filter the records by action_date. Reported amounts can repeat cumulative values; their sum is not net new subcontract spending.
  • Award date windows. By default, a date window matches any award active during it (first signing through latest action), so a match does not prove an action happened inside the window. For actual activity, use spending_by_transaction, read every page and deduplicate award identifiers; get_transactions gives a single award's action dates. Explicit date_type="action_date" bounds the latest action.
  • Federal-account programs. Program lists contain codes and names across all reported years, without dollar amounts or a fiscal-year filter. The tool retrieves source pages internally (up to 2,000 records) and reports completeness and any requested FY that was not applied. Use the numeric account ID with the fiscal-year snapshot for single-year account resources. Agency program totals apply to the whole agency.
  • Available fiscal years. Account listings default to the source's latest available FY; check fy, especially after October rollover. If you ask for a year the source does not have yet, the answer explains which years are available. Agency budgetary resources do not provide a mandatory/discretionary split.
  • Award type groups cannot be mixed. The award_type parameter takes one of: contracts, idvs, grants, loans, direct_payments, other. Use separate calls for separate categories.
  • program_numbers is for assistance only. Use it with award_type set to grants, loans, direct_payments, or other. Contracts and IDVs have no assistance listing, so the server returns a message instead of zero results.
  • 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

Regression tests

Run PYTHONPATH=src uv run --python 3.12 python -m pytest -q from this package directory. Set USASPENDING_LIVE_TESTS=1 to add the live checks against the public API (no key needed). See testing.md for details.

Test fileCoverage
test_v0_3_features.pyTool shapes, filters and expanded API surface
test_density_r5.pyBoundary and semantic regression density
test_live_audit_r6.pyLive endpoint audit
test_live_audit_r7.pyLive parameter and pagination audit
test_content_fixes_1013.pyOctober content fixes, offline and live
test_round_8.pyProperty and validation checks
test_entity_family_fixes.pyAgency, recipient and award semantics
test_validation.pyInput validation
test_search_family_fixes.pySearch and aggregation semantics
test_response_cache_hosted.pyHosted cache behavior
test_audit_r11.pyPaced audit anchors
test_throughput.pyRequest throughput and pacing
test_tool_profiles.pyTool profile selection
test_http.pyHTTP handling
test_content_e2e_1014.pyFull end-to-end audit guidance regressions
test_published_scope_1015.pyPublished tool-selection scope guidance
test_new_awards_fiscal_year_1016.pyCaptured annual fiscal-year correction and unchanged quarter/month samples
test_subaward_period_scope_1017.pyCumulative FFATA scope and complete dated-report recovery
test_federal_account_program_scope_1018.pyCaptured all-year program scope, complete list and single-year financial recovery
test_federal_account_available_fy_1020.pyCurrent-FY source availability, supported recovery and unchanged 503 control
test_naics_current_retired_1021.pyActual retired rows versus active rows omitted by the requested limit
test_award_date_overlap_r6.pyAward interval overlap versus complete dated-transaction recovery
test_sdk23_expected_guidance.pyVisible ordinary recovery hints, no pre-validation source requests, preserved source outputs and unexpected-fault masking
Total2,322

來源:servers/usaspending-gov-mcp/readme.md,提交 7ff19f1

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.3.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分