tesourodireto-mcp
v0.1.0MCP 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.
| Parameter | Type | Description |
|---|---|---|
asset_codes | Optional 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.
| Parameter | Type | Description |
|---|---|---|
asset_code | Optional single maturity filter, matched as a case-insensitive substring, e.g. 'NTN-B Principal 150835' or '150835'. | |
asset_codes | Bond families: LTN, LFT, NTN-B, NTN-B Principal, NTN-F, NTN-C, RendA+, Educa+ (official names also accepted). Omit for all bonds. | |
end_date | Optional precise end date (YYYY-MM-DD), overriding last_year. | |
first_year | integer | First calendar year of the series (minimum 2005). |
force_download | boolean | Ignore today's cached file and download the source again. |
frequency | string | Observation frequency: daily raw data, or monthly/yearly means. |
last_year | Last calendar year of the series. Defaults to the current year. | |
max_rows | integer | Maximum rows returned (most recent observations are kept). |
start_date | Optional 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.
| Parameter | Type | Description |
|---|---|---|
asset_codes | Bond families to include (LTN, LFT, NTN-B, NTN-B Principal, NTN-F, NTN-C, RendA+, Educa+). Omit for all bonds. | |
force_download | boolean | Ignore 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.
| Parameter | Type | Description |
|---|---|---|
asset_codes | Bond families to include. Omit for all bonds. | |
end_date | Optional precise end date (YYYY-MM-DD). | |
first_year | integer | First calendar year (minimum 2005). |
force_download | boolean | Ignore today's cached file and download again. |
last_year | Last calendar year. Defaults to the current year. | |
max_assets | integer | Maximum number of maturities summarized (nearest maturities kept). |
start_date | Optional 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`.
| Parameter | Type | Description |
|---|---|---|
force | boolean | Ignore the 30-minute cache and fetch ANBIMA again. |