Skip to main content
Glama
mcp-TesouroDireto

mcp-TesouroDireto

by msperlin

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoBind address for HTTP transports.127.0.0.1
MCP_PORTNoBind port for HTTP transports.8000
MCP_TRANSPORTNoTransport to use: stdio, streamable-http or sse.stdio
TESOURO_DIRETO_CSV_URLNoOverride with a direct CSV URL or a local file path (useful offline/tests).Official CKAN resource URL
TESOURO_DIRETO_CACHE_DIRNoWhere the raw CSV is cached.~/.cache/mcp-tesouro-direto

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Brazilian government bonds (Tesouro Direto) and the ANBIMA yield curve.

How to work with this server:

  1. Call list_bond_types when you need the meaning of a bond code (LTN, LFT, NTN-B, NTN-B Principal, NTN-F, NTN-C, RendA+, Educa+).

  2. Call get_bond_data for historical daily prices and yields. Filter with asset_codes (bond family) and, to isolate one maturity, asset_code (e.g. "NTN-B Principal 150835").

  3. Call get_current_rates for the latest snapshot of every bond.

  4. Call get_bond_stats for compact per-maturity summary statistics.

  5. Call get_yield_curve for ANBIMA's current real/nominal/inflation curve.

Important:

  • yield_bid is a decimal annual rate: 0.1183 means 11.83% p.a. yield_bid_pct and the *_pct statistics are already in percent.

  • Prices (price_bid) are in Brazilian reais (R$).

  • Asset codes end with the maturity date as DDMMYY, e.g. "LTN 010123".

  • Long daily series are truncated to the most recent max_rows rows; use frequency="monthly" or a narrower date range for long histories.

  • Cite the source as "Tesouro Transparente" (bond data) or "ANBIMA" (curve) and include the reference/retrieval date. Do not invent prices or yields; report what the tools return.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_bond_typesA

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.

get_bond_dataA

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.
get_current_ratesA

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.

get_bond_statsA

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.
get_yield_curveB

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`.

Prompts

Interactive templates invoked by user choice

NameDescription
analyze_bondPrompt an agent to analyze one bond family with this server's data.

Resources

Contextual data attached and managed by the client

NameDescription
bond_types_resourceStatic catalog of Tesouro Direto bond types and aliases.

TDQS

A3.9/5.0

Scored across 5 tools

Disambiguation4/5

Each tool targets a distinct data shape: bond type metadata, historical series, current snapshot, summary statistics, and the ANBIMA yield curve. There is mild overlap between get_current_rates and get_bond_stats (both expose latest yields) and between get_bond_stats and get_bond_data aggregation, but descriptions clearly steer selection.

Naming Consistency5/5

All names are snake_case with a predictable verb_noun structure (list_bond_types, get_bond_data, get_current_rates, get_bond_stats, get_yield_curve). The 'get_' retrieval prefix plus domain object makes intent obvious across the set.

Tool Count5/5

Five tools is well-scoped for a read-only market-data source, and each covers a genuinely different access pattern (metadata, history, snapshot, stats, curve). No tool looks redundant enough to remove.

Completeness4/5

The read-only lifecycle is covered end to end: discover bond types, pull history, get current quotes, summarize, and fetch the reference curve. Minor gaps exist — no lookup of a single bond by code/alias alias beyond list_bond_types, no fee/tax or liquidity/coupon-payment detail.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues