tesourodireto-mcp

v0.1.0
tesourodireto-mcp Checked 17 hours ago Published 21 days ago

MCP server for Brazilian government bonds (Tesouro Direto): historical prices, yields and the ANBIMA yield curve

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_bond_types

Describe the Brazilian government bond types available at Tesouro Direto. Returns each bond's short code, official name, indexer, coupon structure, a short description and the aliases accepted by the other tools.

ParameterTypeDescription
asset_codesOptional bond codes or official names to filter, e.g. ['LTN'] or ['NTN-B Principal', 'RendA+']. Omit for the full catalog.

get_bond_data

Historical daily prices and yields of Tesouro Direto bonds. Returns CSV. For daily data the columns are `ref_date`, `yield_bid` (decimal annual rate), `yield_bid_pct`, `price_bid` (R$), `asset_code` and `matur_date`. For monthly/yearly data each row is the mean over the period, with the number of observations and first/last dates. If the result exceeds `max_rows`, the most recent observations are kept and a truncation note is included in the CSV comments.

ParameterTypeDescription
asset_codeOptional single maturity filter, matched as a case-insensitive substring, e.g. 'NTN-B Principal 150835' or '150835'.
asset_codesBond families: LTN, LFT, NTN-B, NTN-B Principal, NTN-F, NTN-C, RendA+, Educa+ (official names also accepted). Omit for all bonds.
end_dateOptional precise end date (YYYY-MM-DD), overriding last_year.
first_yearintegerFirst calendar year of the series (minimum 2005).
force_downloadbooleanIgnore today's cached file and download the source again.
frequencystringObservation frequency: daily raw data, or monthly/yearly means.
last_yearLast calendar year of the series. Defaults to the current year.
max_rowsintegerMaximum rows returned (most recent observations are kept).
start_dateOptional precise start date (YYYY-MM-DD), overriding first_year.

get_current_rates

Current prices and yields for all Tesouro Direto bonds. Returns the latest available snapshot (the most recent reference date in the data) as CSV, one row per bond and maturity, ordered by maturity.

ParameterTypeDescription
asset_codesBond families to include (LTN, LFT, NTN-B, NTN-B Principal, NTN-F, NTN-C, RendA+, Educa+). Omit for all bonds.
force_downloadbooleanIgnore today's cached file and download the source again.

get_bond_stats

Summary statistics per bond maturity: last/min/max yield, mean and dates. Returns JSON. Useful to compare many maturities without downloading the full daily series.

ParameterTypeDescription
asset_codesBond families to include. Omit for all bonds.
end_dateOptional precise end date (YYYY-MM-DD).
first_yearintegerFirst calendar year (minimum 2005).
force_downloadbooleanIgnore today's cached file and download again.
last_yearLast calendar year. Defaults to the current year.
max_assetsintegerMaximum number of maturities summarized (nearest maturities kept).
start_dateOptional precise start date (YYYY-MM-DD).

get_yield_curve

Current Brazilian yield curve from ANBIMA (ETTJ). Returns CSV with `n_biz_days`, `type` (real_return, nominal_return or implicit_inflation), `value` in percent per year, the derived `ref_date` (maturity) and ANBIMA's `current_date`.

ParameterTypeDescription
forcebooleanIgnore the 30-minute cache and fetch ANBIMA again.