treasury-fiscaldata-mcp-server
Query US Treasury national debt, interest rates, exchange rates, and 80+ fiscal datasets via MCP. STDIO or Streamable HTTP.
Install / Use
claude mcp add cyanheads -- npx -y github:cyanheads/treasury-fiscaldata-mcp-serverIf the server publishes to npm under a different name, use that package instead โ check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of treasury-fiscaldata-mcp-server
treasury-fiscaldata-mcp-server scores 75/100 on our quality scale, 3697th of 4,611 Development & Engineering skills we index.
Its MCP Server is 16 KB long, well organised into 22 sections with 6 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 9 days ago, so treasury-fiscaldata-mcp-server is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit โ read the skill file before letting an agent act on it.
treasury-fiscaldata-mcp-server compared with similar skills
All 4 of these similar skills score higher than treasury-fiscaldata-mcp-server; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| treasury-fiscaldata-mcp-server (this skill)by cyanheads | 75 | 3 | 9d ago | MCP Server |
| taste-skillby Leonxlnx | 100 | 111.0k | 1d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 109.5k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.0k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 70.0k | today | CLAUDE.md |
Frequently asked questions
- How do I install treasury-fiscaldata-mcp-server?
- Run
claude mcp add cyanheads -- npx -y github:cyanheads/treasury-fiscaldata-mcp-server. The install tabs above show the steps for each supported agent. - Which AI agents does treasury-fiscaldata-mcp-server work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is treasury-fiscaldata-mcp-server safe to use?
- It is Apache-2.0-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is treasury-fiscaldata-mcp-server still maintained?
- The repository was last updated 9 days ago, so treasury-fiscaldata-mcp-server is actively maintained.
Skill content
View source on GitHubPublic Hosted Server: https://treasury-fiscaldata.caseyjhand.com/mcp
</div>Overview
US Treasury Fiscal Data: the national debt, interest rates, exchange rates, and other federal fiscal datasets. Pull the headline numbers in one call, query any Fiscal Data endpoint directly, and run SQL over large pulls.
Tools
| 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_dataframe_drop | Delete a staged dataframe and its provenance (disabled unless TREASURY_DATAFRAME_DROP_ENABLED=true) |
Capability reference
treasury_list_datasets <sub>tool</sub>
- Filter by category (
debt,interest_rates,exchange_rates,revenue_spending,savings_bonds,securities,other) or keyword search. - Returns endpoint paths, fields, types, and update cadence from a bundled catalog, with no network call.
treasury_query_dataset <sub>tool</sub>
- Query an endpoint with
{ field, operator, value }filters (eq,gt,gte,lt,lte,in), sort, and pagination:page_size1โ10000 (default 100),page_numberstarts at 1. - Returns rows, field labels,
total_count, andtotal_pages; error reasons areinvalid_endpoint,invalid_field,invalid_filter, andpage_out_of_range. - Pass
canvas_idto stage the page for SQL analysis; the returnedcanvas_idis the assigned table name.
treasury_get_debt <sub>tool</sub>
mode=latestreturns the newest business-day record;mode=dateaccepts a YYYY-MM-DD date;mode=seriesaccepts a date range. Coverage begins 1993-04-01.- Returns debt totals and a 20-row series preview; compare
retrieved_recordswithtotal_records. A missing date returnsno_data_for_date. - Series staging starts above 500 rows or on request via
canvas_id; paging stops at 50,000 rows.
treasury_get_interest_rates <sub>tool</sub>
mode=latestreturns the newest month's rates, optionally filtered bysecurity_type;mode=seriesaccepts a date range.- Rates are percentages, with available security types disclosed when a filter matches nothing; the series preview holds at most 20 rows.
- Series staging starts above 200 rows or on request via
canvas_id.
treasury_get_exchange_rates <sub>tool</sub>
- Quarterly official reporting rates in foreign currency units per 1 USD. Filter
countriesby exact name;mode=latestreturns one current row per currency andmode=seriesaccepts a date range. - Each row carries
record_dateandeffective_date;mixed_record_datesflags a result spanning quarters. Series previews hold 20 rows;retrieved_recordsdiscloses progress againsttotal_records. - Series staging starts above 500 rows or on request via
canvas_id; paging stops at 50,000 rows. country_not_founderror when a requested country has no records
treasury_dataframe_describe <sub>tool</sub>
- Omit
nameto list the tenant's active dataframes, or supply one exact table name. - Returns provenance, created/expiry timestamps, row count, and column schema;
truncated/max_rowsdisclose a capped source pull. - Table expiry defaults to 24h after staging, configurable with
CANVAS_TTL_MS.
treasury_dataframe_query <sub>tool</sub>
- Accepts one read-only SELECT;
row_limitdefaults to 1000 (max 10000) andpreviewmay not exceed it. System catalogs, external-file functions, and SQL mutations are denied. - Returns rows and
row_count_capped; errors distinguishcanvas_unavailable,system_catalog_access,invalid_sql,missing_table, andinvalid_query_bounds. register_asmaterializes the full result as a new dataframe with a fresh TTL.
treasury_dataframe_drop <sub>tool</sub>
- Accepts the exact
namefromtreasury_dataframe_describe, a data tool'scanvas_id, or query'sregistered_as; deletes that table and its provenance for the tenant. - Returns
nameanddropped: true; an absent or expired table returnsmissing_tablewith guidance to list active tables. - Disabled by default. Set
TREASURY_DATAFRAME_DROP_ENABLED=trueandCANVAS_PROVIDER_TYPE=duckdbto make it callable; the HTTP landing page shows the disabled tool and enable hint otherwise.
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Fiscal Data-specific:
- All API values are strings;
"null"means no value. Treasury dataframe columns are VARCHAR โ CAST to DECIMAL or DATE for arithmetic and date comparisons. DataCanvas requiresCANVAS_PROVIDER_TYPE=duckdb; configured canvas tools reportcanvas_unavailableotherwise. - Curated catalog of 17 endpoints with field metadata โ no discovery round-trip required; pass any endpoint path directly to
treasury_query_datasetfor datasets outside the catalog - Convenience tools for the three most-queried datasets โ national debt, interest rates, exchange rates
- DataCanvas integration: large pulls register as
df_<id>dataframes queryable via DuckDB SQL, with automatic staging thresholds per tool - No API key required โ the US Treasury Fiscal Data API is free and public
Agent-friendly output:
- Provenance: filter-expression echo (
applied_filters) and field-label maps (field_labels) let agents verify what was sent and read raw field names - Enrichment notices: empty-result guidance, partial-country mismatches, canvas staging confirmations, and truncated-series warnings all name the next tool call
- Graceful truncation: series and query results carry
truncated/retrieved_records/row_count_cappedfields instead of silently dropping rows - Canvas provenance: source tool, original query parameters, row count, and column schema surfaced by
treasury_dataframe_describe
Getting started
Connect Claude Code to the public instance:
claude mcp add --transport http treasury-fiscaldata-mcp-server https://treasury-fiscaldata.caseyjhand.com/mcp
Or run it locally:
claude mcp add treasury-fiscaldata-mcp-server -- npx -y @cyanheads/treasury-fiscaldata-mcp-server
For other MCP clients:
{
"mcpServers": {
"treasury-fiscaldata-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/treasury-fiscaldata-mcp-server"]
}
}
}
No API key is required. DataCanvas is enabled by default in npm and Docker installs; CANVAS_PROVIDER_TYPE=none disables it. The portable Claude Desktop .mcpb bundle omits DuckDB native bindings and supports Treasury API queries with DataCanvas disabled. For Docker or a source build, see Running the server.
Configuration
| Variable | Description | Default |
|:---------|:------------|:--------|
| CANVAS_PROVIDER_TYPE | duckdb backs dataframe describe/query, and drop when enabled. With none, callable canvas tools return canvas_unavailable; drop stays off the tool list unless separately enabled. | duckdb (none in the desktop bundle) |
| CANVAS_TTL_MS | Per-table TTL for DataCanvas dataframes in milliseconds. | 86400000 (24h) |
| TREASURY_DATAFRAME_DROP_ENABLED | Register treasury_dataframe_drop as callable. Also requires CANVAS_PROVIDER_TYPE=duckdb. | false |
| MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
| MCP_HTTP_PORT | Port for HTTP server. | 3010 |
| MCP_SESSION_MODE | HTTP session handling: auto, stateful, or stateless. Setting it overrides the server's own declaration; leaving it unset falls through to that declaration, not to the schema default. | stateless (declared in src/index.ts) |
| MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
| MCP_LOG_LEVEL | Log level (debug, info, notice, warning, error). | info |
| LOGS_DIR | Directory for log files (Node.js/Bun only). | <project-root>/logs |
| LOG_TOOL_FAILURE_PAYLOADS | Log failed-call arguments and results, redacted by key name. Secrets inside free-form values are not redacted. | false |
| LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES | Byte cap for each logged failed-call payload. | 16384 |
| OTEL_ENABLED | Enable OpenTelemetry spans and metrics. | false |
| OTEL_EXPORTER_OTLP_ENDPOINT | Base OTLP endpoint for traces and metrics. | Unset |
| OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | Explicit OTLP log endpoint; the base endpoint does not enable log export. | Unset |
See .env.example for the full lis
Truncated for display โ read the full file on GitHub.
Related Skills
taste-skill
111.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
109.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu โ one CLI, zero API fees.
headroom
79.0kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
70.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit โ see the Safety scan above for what the skill file itself contains.
