treasury-fiscaldata-mcp-server
Server Details
Query US Treasury national debt, interest rates, exchange rates, and fiscal datasets via MCP.
- Status
- Healthy
- Uptime
- 100.0% over the last 24 hours
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
- Repository
- cyanheads/treasury-fiscaldata-mcp-server
- GitHub Stars
- 3
- Server Listing
- @cyanheads/treasury-fiscaldata-mcp-server
- ChatGPT
- –
- Claude
- –
TDQS
Scored across 7 tools
Each tool has a clear role: three domain-specific getters, one generic endpoint query, one catalog lister, and two dataframe operations. The only real overlap is that treasury_query_dataset can reproduce anything treasury_get_debt/interest_rates/exchange_rates return, so an agent must decide between convenience modes and the generic path, but the descriptions justify the split (staging thresholds, presets). Dataframe describe vs query is cleanly separated by the read-schema-then-SQL workflow.
All names share the treasury_ snake_case prefix and use conventional verbs (get_, list_, query_). The only deviation is the resource-first naming of treasury_dataframe_describe/treasury_dataframe_query versus the verb-first pattern used elsewhere, which is a small, readable inconsistency rather than a chaotic mix.
Seven tools is well within the ideal range for a data-access server. Each tool earns its place: discovery, generic query, three high-value curated datasets, and a two-step dataframe staging workflow.
The surface covers catalog discovery, arbitrary endpoint querying with filters/sort/paging, curated convenience accessors, and post-staging SQL. Minor gaps: no explicit dataset-metadata/field-enumeration tool (field errors are surfaced only on failure) and no dataframe cleanup or listing-by-canvas beyond describe, though staged tables expire automatically.
Available Tools
7 toolstreasury_dataframe_describeDescribe Treasury DataframesARead-onlyIdempotentInspect
List DataCanvas dataframes materialized by treasury_query_dataset, treasury_get_debt, treasury_get_interest_rates, and treasury_get_exchange_rates. Each entry surfaces source tool, query parameters, creation/expiry timestamps, row count, and column schema. Use this tool before treasury_dataframe_query to discover table names and column types. Requires CANVAS_PROVIDER_TYPE=duckdb.
Inputs: name. Returns: error, dataframes
treasury_dataframe_queryQuery Treasury DataframesARead-onlyIdempotentInspect
Run a single-statement SELECT against DataCanvas dataframes registered by treasury_query_dataset, treasury_get_debt, treasury_get_interest_rates, and treasury_get_exchange_rates. Read-only: writes, DDL, DROP, COPY, PRAGMA, ATTACH, and external-file table functions are rejected. System catalogs (information_schema, pg_catalog, sqlite_master, duckdb_*) are denied at the bridge layer. Tables staged from Treasury API rows hold every column as VARCHAR — CAST to DECIMAL or DATE for arithmetic and date comparisons; a register_as table keeps the column types its SELECT produced. Use treasury_dataframe_describe to list available table names and column schemas before querying.
Inputs: sql (required), preview, row_limit, register_as. Returns: cap, rows, error, shown, +7 more
treasury_get_debtGet National DebtARead-onlyIdempotentInspect
Fetch national debt (Debt to the Penny) — total public debt outstanding broken into publicly-held debt and intragovernmental holdings. Three modes: "latest" returns the most recent business day's record; "date" returns the record for a specific date (must be a business day — the API only records debt on days markets are open); "series" returns a date range, staging the full result as a DataCanvas table when canvas_id is set or the range matches more than 500 rows — read the table's column schema with treasury_dataframe_describe, then run SQL over it with treasury_dataframe_query. Records go back to 1993-04-01.
Inputs: date, mode, end_date, canvas_id, +1 more. Returns: cap, error, shown, notice, +10 more
treasury_get_exchange_ratesGet Treasury Exchange RatesARead-onlyIdempotentInspect
Official Treasury reporting exchange rates for ~165 countries — the rates US federal agencies are required to use when converting foreign currency to USD for official reporting. Published quarterly (March 31, June 30, Sep 30, Dec 31); mode "latest" returns the most recently published quarter. Rate is expressed as foreign currency units per 1 USD (e.g., a Japan-Yen rate of 159.41 means 1 USD = 159.41 JPY). These are NOT market exchange rates and are not suitable for financial transaction pricing. Mode "series" stages the result as a DataCanvas table when canvas_id is set or the range matches more than 500 rows — read the table's column schema with treasury_dataframe_describe, then run SQL over it with treasury_dataframe_query.
Inputs: mode, end_date, canvas_id, countries, +1 more. Returns: cap, note, error, rates, +10 more
treasury_get_interest_ratesGet Treasury Interest RatesARead-onlyIdempotentInspect
Average interest rates Treasury pays on its outstanding securities by security type. Answers "what is the government's cost of borrowing?" Covers every type Treasury reports — marketable issues, non-marketable series, and the aggregate totals — and which types it reports changes over the years, so omit security_type to see the ones a given period carries. Rates are percentages, not basis points. Updated monthly (end-of-month records). Mode "latest" returns the most recent month's rates for all or one security type; "series" returns a time history, staging the result as a DataCanvas table when canvas_id is set or the range matches more than 200 rows — read the table's column schema with treasury_dataframe_describe, then run SQL over it with treasury_dataframe_query.
Inputs: mode, end_date, canvas_id, start_date, +1 more. Returns: cap, error, rates, shown, +6 more
treasury_list_datasetsList Treasury Fiscal Data DatasetsARead-onlyIdempotentInspect
Browse the curated catalog of US Treasury Fiscal Data API endpoints. Returns endpoint paths, field names, descriptions, and update cadence for each dataset. Use this tool before treasury_query_dataset to discover the correct endpoint path and field names. The catalog is a curated subset of the full API — pass any endpoint path directly to treasury_query_dataset to query datasets not listed here; a field name the endpoint lacks fails with an error that lists every field it has. The catalog covers debt, interest rates, exchange rates, revenue/spending, savings bonds, and securities datasets.
Inputs: search, category. Returns: error, total, datasets
treasury_query_datasetQuery Treasury Fiscal Data DatasetARead-onlyIdempotentInspect
Query any Treasury Fiscal Data endpoint by path, field list, filters, sort, and page. Call treasury_list_datasets first to get the correct endpoint path and exact field names; a field name the endpoint lacks fails with an error listing every field it has. Filter syntax: each condition is { field, operator, value } where operator is eq/gt/gte/lt/lte/in (e.g., record_date:gte:2024-01-01). Multiple conditions are ANDed together. All response values are strings per the API contract, including numbers and dates; "null" (string) means no value. Supply canvas_id to stage the page result as a DataCanvas table — read its column schema with treasury_dataframe_describe, then run SQL over it with treasury_dataframe_query (requires CANVAS_PROVIDER_TYPE=duckdb on the server).
Inputs: endpoint (required), sort, fields, filters, +3 more. Returns: data, error, notice, endpoint, +9 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Treasury MCP — US Treasury Fiscal Data public API (free, no auth)
Treasury Fiscal MCP — US Treasury Fiscal Data API
Access U.S. congressional data (bills, votes, members, committees) via MCP.
Query U.S. Census Bureau data, variables, and geography via MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables querying US Treasury Fiscal Data through the Treasury Fiscal Data API, providing access to financial data such as debt, spending, and revenue.73 npmMIT
- AlicenseNot gradedqualityBmaintenanceQuery SEC EDGAR filings, XBRL financials, and company data through MCP.811 npm12Apache 2.0
- FlicenseNot gradedqualityCmaintenanceQuery normalized U.S. House and Senate STOCK Act disclosures, member trading histories, and aggregate trading statistics through MCP.-
- AlicenseNot gradedqualityDmaintenanceEnables querying U.S. Treasury fiscal data including debt, interest rates, auctions, and more via natural language, with no API key required.MIT
Glama MCP Gateway
Add one secure layer between your agents and this server.