Query US Treasury national debt, interest rates, exchange rates, and 80+ fiscal datasets via MCP. STDIO or Streamable HTTP.
- ✓Open-source license (Apache-2.0)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
git clone https://github.com/cyanheads/treasury-fiscaldata-mcp-server{
"mcpServers": {
"treasury-fiscaldata": {
"command": "node",
"args": ["/path/to/treasury-fiscaldata-mcp-server/dist/index.js"]
}
}
}MCP Servers overview
<div align="center">
<h1>@cyanheads/treasury-fiscaldata-mcp-server</h1>
<p><b>Query US Treasury national debt, interest rates, exchange rates, and fiscal datasets via MCP.</b>
<div>7 Tools</div>
</p>
</div>
<div align="center">
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/treasury-fiscaldata-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/treasury-fiscaldata-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
</div>
<div align="center">
[](https://github.com/cyanheads/treasury-fiscaldata-mcp-server/releases/latest/download/treasury-fiscaldata-mcp-server.mcpb) [](https://cursor.com/en/install-mcp?name=treasury-fiscaldata-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvdHJlYXN1cnktZmlzY2FsZGF0YS1tY3Atc2VydmVyIl19) [](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22treasury-fiscaldata-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Ftreasury-fiscaldata-mcp-server%22%5D%7D)
[](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
</div>
<div align="center">
**Public Hosted Server:** [https://treasury-fiscaldata.caseyjhand.com/mcp](https://treasury-fiscaldata.caseyjhand.com/mcp)
</div>
---
## Tools
Five tools for querying the US Treasury Fiscal Data API, plus two for SQL analytics over DuckDB-backed DataCanvas dataframes:
| Tool | Description |
|:-----|:------------|
| `treasury_list_datasets` | Browse the curated catalog of 17 Treasury Fiscal Data endpoints with field names, descriptions, and update cadence |
| `treasury_query_dataset` | Query any Treasury Fiscal Data endpoint by path, field list, filters, sort, and page — with optional DataCanvas spill |
| `treasury_get_debt` | Fetch national debt (Debt to the Penny) — latest record, specific date, or date-range series with optional DataCanvas spill |
| `treasury_get_interest_rates` | Average interest rates Treasury pays on outstanding securities by type — marketable issues, non-marketable series, and aggregate totals |
| `treasury_get_exchange_rates` | Official Treasury statutory exchange rates for ~165 countries, published quarterly |
| `treasury_dataframe_describe` | List DataCanvas dataframes materialized by the treasury_* tools with schema, row count, and TTL |
| `treasury_dataframe_query` | Run a single-statement SELECT against DataCanvas dataframes using standard DuckDB SQL |
### `treasury_list_datasets`
Browse the embedded catalog of available Treasury Fiscal Data endpoints. No network calls — serves from a static catalog bundled with the server.
- Filter by category: `debt`, `interest_rates`, `exchange_rates`, `revenue_spending`, `savings_bonds`, `securities`, `other`
- Keyword search against dataset name and description (case-insensitive substring)
- Returns endpoint paths, field names, types, and update cadence
- Use this first to get the exact endpoint path and field names before calling `treasury_query_dataset`
- Every path and field name is checked against the live API by `bun run verify:catalog`, so a dataset Treasury moves or renames fails a gate rather than reaching a caller
---
### `treasury_query_dataset`
Generic parameterized query against any Treasury Fiscal Data endpoint.
- Filter syntax: `{ field, operator, value }` where operator is `eq`, `gt`, `gte`, `lt`, `lte`, `in`
- Multiple filters ANDed together
- Pagination via `page_size` (1–10000) and `page_number`
- Sort by any field, descending with `-` prefix (e.g. `-record_date`)
- All response values are strings per the API contract — including numeric and date fields; `"null"` means no value
- Pass `canvas_id` to stage the page as a DataCanvas table — the server assigns the name and returns it in `canvas_id`; read its schema with `treasury_dataframe_describe`, then SQL it with `treasury_dataframe_query` (requires `CANVAS_PROVIDER_TYPE=duckdb`)
---
### `treasury_get_debt`
Convenience tool for national debt (Debt to the Penny) — total public debt outstanding broken into publicly-held debt and intragovernmental holdings.
- `mode=latest` — most recent business-day record
- `mode=date` — specific business day (YYYY-MM-DD; API only records debt on market-open days)
- `mode=series` — date range, sorted newest-first; auto-spills to DataCanvas when the series exceeds 500 rows
- Records go back to 1993-04-01
---
### `treasury_get_interest_rates`
Average interest rates the Treasury pays on outstanding securities. Updated monthly (end-of-month records).
- Covers every security type Treasury reports — marketable issues, non-marketable series, and aggregate totals
- `security_type` takes any `security_desc` value the data carries, matched exactly; which types Treasury publishes changes over the years, so when a filter matches nothing the response names the types the data does hold
- `mode=latest` — most recent month's rates for all or one security type
- `mode=series` — time-range history; auto-spills to DataCanvas when results exceed 200 rows
---
### `treasury_get_exchange_rates`
Official Treasury statutory reporting exchange rates for ~165 countries, published quarterly (March 31, June 30, Sep 30, Dec 31).
- Rate expressed as foreign currency units per 1 USD (a Japan-Yen rate of 159.41 means 1 USD = 159.41 JPY)
- These are **not** market exchange rates — required by US federal agencies for foreign-currency-to-USD conversions in official reporting
- Filter to one or more countries by exact name; omit for every country in a quarter
- `mode=latest` returns one row per currency — the operative rate, newest `record_date` and then newest `effective_date`, so an amended rate supersedes the one it replaced and a country holding two legal tenders keeps both
- Treasury amends a published quarter by reissuing a rate under the same `record_date` with a later `effective_date`, so both dates ride every row; `mixed_record_dates` flags a result whose rows are not all from one quarter
- `mode=series` auto-spills to DataCanvas when results exceed 500 rows (~19,000 rows full history, back to 2001-03-31)
---
### `treasury_dataframe_describe` / `treasury_dataframe_query`
In-conversation SQL analytics over the dataframes that `treasury_query_dataset`, `treasury_get_debt`, `treasury_get_interest_rates`, and `treasury_get_exchange_rates` materialize on a shared DuckDB-backed DataCanvas. Each data-returning call with `canvas_id` adds a `df_XXXXX_XXXXX` handle; read its columns with `treasury_dataframe_describe`, then pass the handle to `treasury_dataframe_query` for joins, aggregates, window functions, and CTEs — standard DuckDB SQL.
- **Read-only.** Writes, DDL, DROP, COPY, PRAGMA, ATTACH, and external-file table functions are rejected by the SQL gate. System catalogs (`information_schema`, `pg_catalog`, `sqlite_master`, `duckdb_*`) are denied at the bridge layer.
- **All Treasury columns are VARCHAR.** CAST to `DECIMAL` or `DATE` for arithmetic and date comparisons.
- **`register_as` chaining.** `treasury_dataframe_query` can persist its result as a new dataframe with a fresh TTL for multi-step analysis.
- **Per-table TTL.** Dataframes age on their own clock (default 24h, override with `CANVAS_TTL_MS`).
- Requires `CANVAS_PROVIDER_TYPE=duckdb`.
## Features
Built on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):
- Declarative tool definitions — single file per tool, framework handles registration and validation
- Structured output schemas with automatic formatting for human-readable display
- Unified error handling — handlers throw, framework catches, classifies, and formats
- Pluggable auth: `none`, `jwt`, `oauth`
- Structured logging with request-scoped context
- STDIO and Streamable HTTP transports
Treasury-specific:
- Curated catalog of 17 Treasury Fiscal Data endpoints with field metadata — no discovery round-trip required. Pass any endpoint path directly to `treasury_query_dataset` to access datasets not in the catalog.
- Convenience tools for the three most-queried datasets (national debt, interest rates, exchange rates)
- Full generic access to any Fiscal Data endpoint via `treasury_query_dataset`
- DataCanvas integration: large time-series pulls register as `df_<id>` dataframes queryable via DuckDB SQL
- No API keys required — the US Treasury Fiscal Data API is free and public
Agent-friendly output:
- Filter expression echo (`applied_filters`) so agents can verify what was sent to the API
- Field-label maps on query results (`field_labels`) map raw field names to human-readable labels
- Enrichment notices on empty results, partial-country mismatches, staged canvas tables, and truncated series guide the next tool call
- Canvas provenance: source tool, original query parameters, row count, and column schema surfaced by `treasury_dataframe_describeWhat people ask about treasury-fiscaldata-mcp-server
What is cyanheads/treasury-fiscaldata-mcp-server?
+
cyanheads/treasury-fiscaldata-mcp-server is mcp servers for the Claude AI ecosystem. Query US Treasury national debt, interest rates, exchange rates, and 80+ fiscal datasets via MCP. STDIO or Streamable HTTP. It has 2 GitHub stars and its last recorded update is dated 2026-08-25.
How do I install treasury-fiscaldata-mcp-server?
+
You can install treasury-fiscaldata-mcp-server by cloning the repository (https://github.com/cyanheads/treasury-fiscaldata-mcp-server) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is cyanheads/treasury-fiscaldata-mcp-server safe to use?
+
Our security agent has analyzed cyanheads/treasury-fiscaldata-mcp-server and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains cyanheads/treasury-fiscaldata-mcp-server?
+
cyanheads/treasury-fiscaldata-mcp-server is maintained by cyanheads. The last recorded GitHub activity is dated 2026-08-25, with 0 open issues.
Are there alternatives to treasury-fiscaldata-mcp-server?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy treasury-fiscaldata-mcp-server to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/cyanheads-treasury-fiscaldata-mcp-server)<a href="https://claudewave.com/repo/cyanheads-treasury-fiscaldata-mcp-server"><img src="https://claudewave.com/api/badge/cyanheads-treasury-fiscaldata-mcp-server" alt="Featured on ClaudeWave: cyanheads/treasury-fiscaldata-mcp-server" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!