Docs

One API key, from your dashboard, authenticates both the REST API and the MCP server.

Guide

Treasury indices

The eleven total-return indices: what each covers, how to read levels, returns and analytics, and the two date conventions.

What is in the API

Every endpoint is a GET with the same key. Dates are optional almost everywhere and mean the most recent published day. Each group has an MCP tool serving the same data.

Curves

MCP: get_treasury_curve, get_treasury_rate_history

/v1/curves/zeroFitted zero-coupon curve, with fit diagnostics
/v1/curves/parPar yield curve, 3 months to 30 years
/v1/curves/money-marketBill curve, 1 week to 1 year
/v1/curves/realTIPS real yield curve
/v1/curves/breakevenBreakeven inflation, nominal less real
/v1/curves/zero/historyZero curve over a range
/v1/curves/money-market/historyBill curve over a range
/v1/curves/real/historyReal curve over a range

Securities

MCP: get_treasury_security, list_treasury_securities

/v1/securitiesEvery security priced on a day
/v1/on-the-runOn- and off-the-run securities by tenor
/v1/securities/{cusip}One CUSIP: terms, auctions, latest price and analytics
/v1/securities/{cusip}/pricesIts daily prices
/v1/securities/{cusip}/analyticsIts daily duration, DV01, key rates and curve residual

Rich/cheap

MCP: get_treasury_rich_cheap

/v1/rich-cheapNotes and bonds furthest from the curve, ranked by z-score

Auctions

MCP: get_treasury_auctions

/v1/auctionsAuctions in a date window: announced, auctioned and settled, with results
/v1/auctions/latestEach term's latest result, with changes against up to six previous auctions

Indices

MCP: get_treasury_index

/v1/indicesEvery index, latest daily and month-end levels
/v1/indices/{code}One index
/v1/indices/{code}/levelsDaily total-return levels
/v1/indices/{code}/returnsMonth-, quarter- and year-to-date returns
/v1/indices/{code}/analyticsYield, duration, convexity, key rates
/v1/indices/{code}/constituentsWhat it holds now
/v1/indices/{code}/constituents/{date}What it held in a completed period

Calculators

MCP: price_treasury_security

/v1/price/couponPrice or yield a note or bond
/v1/price/billPrice or yield a bill

Debt

MCP: get_treasury_debt

/v1/debtFederal debt from the monthly statement
/v1/stripsHow much is held as STRIPS

Savings bonds

MCP: get_savings_bond_rates, value_savings_bond

/v1/savings-bonds/ratesSeries I and EE rates
/v1/savings-bonds/i/valueValue a Series I bond
/v1/savings-bonds/ee/valueValue a Series EE bond

REST

The full reference is generated from the API itself: https://api.saferate.markets/reference.

curl https://api.saferate.markets/v1/curves/zero \
  -H "Authorization: Bearer $SAFERATE_MARKETS_KEY"

MCP

For AI assistants and agents. Streamable HTTP at https://api.saferate.markets/mcp, authenticated with the same key as a Bearer header.

Claude Code

claude mcp add --transport http saferate-markets https://api.saferate.markets/mcp \
  --header "Authorization: Bearer $SAFERATE_MARKETS_KEY"

Any client that reads an mcpServers file

{
  "mcpServers": {
    "saferate-markets": {
      "type": "http",
      "url": "https://api.saferate.markets/mcp",
      "headers": { "Authorization": "Bearer ${SAFERATE_MARKETS_KEY}" }
    }
  }
}

Keep the key in an environment variable rather than in the file. Sign-in based connection for claude.ai and Claude Desktop is not available yet.