@pipeworx/treasury-fiscal
Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/treasury-fiscal’s. Install: one-click buttons
Connect to just the @pipeworx/treasury-fiscal pack
https://gateway.pipeworx.io/treasury-fiscal/mcp — only @pipeworx/treasury-fiscal’s own tools, nothing else in the catalog.
No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.
Tools: 8
The U.S. Department of Treasury’s Fiscal Data API. Daily Treasury cash, public debt outstanding, federal receipts and outlays, customs revenue, exchange rates, and savings bonds redemption data. The actual numbers behind “the federal deficit” and “the national debt.” Free, no auth.
Why this matters for AI agents
For macro questions about the US fiscal stance — debt level, daily cash position, monthly receipts, customs revenue — Treasury Fiscal Data is the authoritative live source. Where FRED publishes monthly aggregates, Treasury publishes the underlying daily ledger.
Common flows:
- National debt. “What’s the public debt right now?” →
treasury_debt→ outstanding total broken into intragovernmental vs. public-held. - Customs revenue. “How much tariff revenue did Treasury collect in 2024?” →
treasury_customs_revenue({year: 2024}). - Receipts / outlays. Daily Treasury cash position (deposits vs. withdrawals) by source.
- Outlays by function. “What were net interest outlays in FY2026?” ->
treasury_outlays({fiscal_year: 2026, function: "Net Interest"})-> month, fiscal-year-to-date and prior-year-to-date dollars for each budget function, plus total net outlays, total receipts and the deficit (computed as outlays minus receipts and labelled as such). Every response names the statement date, the period, and the basis (net outlays, nominal dollars, fiscal year Oct-Sep). Covers fiscal years 2015 onward; earlier years, or a statement not yet released, returnfound:falsewith the reason rather than an empty list. Matching a published headline total: month vs fiscal-year-to-date and net-by-function vs by-agency are different bases. - Exchange rates. Treasury reporting rate for foreign-currency transactions (used by federal contractors and grant recipients).
- Auction results. “What was the high yield at the last 10-year note auction?” →
treasury_auction_results({security_type: "Note", term: "10-Year"})→ high yield, bid-to-cover ratio, CUSIP, offering/accepted amounts for the most recent settled auction. Covers bills, notes, bonds, TIPS, and floating-rate notes (FRNs).
Used by the trade_bilateral_analysis compound for tariff context.
Auth
None. Treasury Fiscal Data is fully public, free, no key.
Datasets worth knowing
| Dataset | Cadence | Use |
|---|---|---|
| Daily Treasury Statement | Daily | Cash position, deposits, withdrawals |
| Monthly Treasury Statement | Monthly | Receipts, outlays, deficit |
| Public Debt Outstanding | Daily | Total debt, intragovernmental vs. public-held |
| Customs Revenue | Monthly | Tariff collections |
| Treasury Reporting Rates of Exchange | Quarterly | Official rates for federal accounting |
| Savings Bond Securities | Monthly | Issuance, redemption |
| Auctions | Per auction (daily-ish) | High yield/rate, bid-to-cover, CUSIP for bills/notes/bonds/TIPS/FRNs |
Update cadence
- Daily Treasury Statement: ~3 PM Eastern, T+1 (next business day)
- Monthly statements: ~mid-month, for prior month
- Public debt: daily
- Exchange rates: quarterly (recalibrated; not real-time market rates — use FX/forex packs for live rates)
Pipeworx caches with TTLs matching these.
Common pitfalls
- Public debt vs. gross debt. “Public-held debt” excludes intragovernmental holdings (Social Security trust fund, etc.). Headlines usually quote the gross debt; analysts care about public-held. Both are in the data.
- Customs revenue ≠ tariffs only. Includes anti-dumping, countervailing duties, fees. For pure tariff revenue, filter by item code in the call response.
- Treasury exchange rates aren’t market rates. They’re quarterly-recalibrated rates used for federal accounting. For real-time FX, use the dedicated
exchange-rateorfrankfurterpacks. - Daily cash position is not GDP. The Treasury’s cash position is a stock measure; GDP is a flow. Don’t confuse.
- Fiscal year vs. calendar year. Federal fiscal year is October 1 – September 30. Receipts and outlays default to fiscal-year reporting. Filter explicitly if you need calendar-year numbers.
- Auctions are often reopenings, not new issues. Treasury reopens an existing note/bond CUSIP at a shorter remaining maturity (e.g. a “10-year note” auctioned 2 months after issuance shows up as a “9-Year 10-Month” term).
treasury_auction_results’stermfilter matches the security’s ORIGINAL nominal term (original_termin the response) so “10-Year” still finds it — useterm/original_termin the response to tell a fresh issue from a reopening. - TIPS and FRNs aren’t their own
security_typein the source data. Treasury files them underNote/Bondwith an inflation-indexed or floating-rate flag. Passsecurity_type: "TIPS"or"FRN"and the tool resolves this for you; the raw API’s ownsecurity_type:eq:TIPSfilter returns zero rows. - Bills report a rate, not a yield.
high_yield_pctis null for bills — usehigh_investment_rate_pct(the bond-equivalent yield) orhigh_discount_rate_pct(the discount rate actually bid).
Tools
- treasury_customs_revenue — Track monthly US customs duty revenue. Returns monthly collection amounts to analyze tariff impact trends.
- treasury_receipts — Get US government receipts by source: individual income tax, corporate tax, excise taxes, customs duties, and more.
- treasury_debt — Check current US national debt with historical data points. Returns total public debt outstanding over time.
- treasury_exchange_rates — Get official US Treasury exchange rates used for government currency conversions. Pass a country name for one country’s rate; omit it for the most recent rates across all countries.
- treasury_avg_interest_rates — Average interest rates on US Treasury securities by security type (bills, notes, bonds, TIPS, total marketable / non-marketable) from the Treasury Fiscal Data avg_interest_rates dataset. Returns recen
- treasury_federal_net_cost — US federal government net cost / spending by agency (gross cost, earned revenue, net cost) from the Treasury statement_net_cost dataset. Returns recent records; optionally filter by fiscal_year.
- treasury_outlays — US federal outlays by budget function (Net Interest, National Defense, Social Security, Medicare, Health, …) plus total net outlays, total receipts and the deficit, from the U.S. Treasury Monthly Tr
- treasury_auction_results — US Treasury auction results: high yield/rate, bid-to-cover ratio, and offering/accepted amounts for recently settled bills, notes, bonds, TIPS, and floating-rate notes (FRNs), with CUSIP, from the Tre
Tools
treasury_auction_results— US Treasury auction results: high yield/rate, bid-to-cover ratio, and offering/accepted amounts for recently settled bills, notes, bonds, TIPS, and floating-rate notes (FRNs), with CUSIP, from the Tretreasury_avg_interest_rates— Average interest rates on US Treasury securities by security type (bills, notes, bonds, TIPS, total marketable / non-marketable) from the Treasury Fiscal Data avg_interest_rates dataset. Returns recentreasury_customs_revenue— Track monthly US customs duty revenue. Returns monthly collection amounts to analyze tariff impact trends.treasury_debt— Check current US national debt with historical data points. Returns total public debt outstanding over time.treasury_exchange_rates— Get official US Treasury exchange rates used for government currency conversions. Pass a country name for one country's rate; omit it for the most recent rates across all countries.treasury_federal_net_cost— US federal government net cost / spending by agency (gross cost, earned revenue, net cost) from the Treasury statement_net_cost dataset. Returns recent records; optionally filter by fiscal_year.treasury_outlays— US federal outlays by budget function (Net Interest, National Defense, Social Security, Medicare, Health, ...) plus total net outlays, total receipts and the deficit, from the U.S. Treasury Monthly Trtreasury_receipts— Get US government receipts by source: individual income tax, corporate tax, excise taxes, customs duties, and more.