treasury-fiscaldata-mcp

treasury-fiscaldata-mcp

Enables querying U.S. Treasury fiscal data including debt, interest rates, auctions, and more via natural language, with no API key required.

Category
访问服务器

README

Treasury Fiscal Data MCP

A free, key-less Model Context Protocol server for the U.S. Treasury Fiscal Data API — the federal government's official record of debt, interest, receipts and outlays, exchange rates, and auctions. No API key, no account.

Built with FastMCP.

Tools

Tool What it does
fiscaldata_status Check API reachability and catalog size.
list_datasets List/search popular Fiscal Data datasets (key, path, date field, description).
query_dataset Generic access to any Fiscal Data endpoint: fields, filters, sort, pagination.
current_debt Latest U.S. total public debt outstanding (single most recent figure).
debt_to_penny Daily total public debt over a date range (public + intragovernmental).
avg_interest_rates Average interest rates on Treasury securities by type.
interest_expense Interest expense on the public debt by security type (month + FYTD).
monthly_treasury_statement Monthly receipts, outlays, and surplus/deficit (MTS Table 1).
exchange_rates Treasury reporting rates of exchange (foreign currency).
treasury_auctions Recent Treasury securities auction results (CUSIP, term, dates).

Install

git clone https://github.com/jsconiers/treasury-fiscaldata-mcp.git
cd treasury-fiscaldata-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/python test_fiscaldata.py   # offline tests

Use with Claude Desktop

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "treasury-fiscaldata": {
      "command": "/absolute/path/to/treasury-fiscaldata-mcp/.venv/bin/python",
      "args": ["/absolute/path/to/treasury-fiscaldata-mcp/fiscaldata_mcp.py"]
    }
  }
}

Restart Claude Desktop, then ask things like "What's the national debt right now?", "How much is the U.S. paying in interest this fiscal year?", or "Show the monthly budget deficit."

The generic query_dataset tool

The curated catalog (list_datasets) surfaces ten popular datasets, but query_dataset works for any Fiscal Data endpoint. It accepts a catalog key, a path, or a full URL:

query_dataset(endpoint="debt_to_penny", sort="-record_date", page_size=5)
query_dataset(endpoint="/v2/accounting/od/gold_reserve", sort="-record_date")
query_dataset(
  endpoint="avg_interest_rates",
  fields="record_date,security_desc,avg_interest_rate_amt",
  filters=["security_desc:eq:Treasury Notes"],
  start_date="2024-01-01", sort="-record_date",
)

Filter operators: eq, gte, lte, gt, lt, in. Sort by any column; prefix - for descending. Responses include a columns map of field → human-readable label.

Examples

current_debt()                                  -> latest total public debt (~$39.3T)
debt_to_penny(start_date="2025-01-01")          -> daily debt series
avg_interest_rates(security="Total Marketable") -> blended Treasury rate over time
interest_expense()                              -> interest cost by security type (month + FYTD)
monthly_treasury_statement(classification="Year-to-Date") -> FYTD surplus/deficit
exchange_rates(country_or_currency="Euro")      -> latest Treasury reporting rate
treasury_auctions(security_type="Note")         -> recent note auctions

Data source

All data comes from the public U.S. Treasury Fiscal Data REST API (https://api.fiscaldata.treasury.gov/). Datasets are updated on Treasury's published schedules (daily, monthly, or quarterly depending on the dataset).

License

MIT — see LICENSE. Not affiliated with or endorsed by the U.S. Department of the Treasury. For informational purposes only.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选