← All Python code MCP Servers Hub
tesourodireto-mcp
An MCP server for Brazilian government bonds (Tesouro Direto): historical prices and yields, current rates, per-maturity statistics and the ANBIMA yield curve. It is the Python counterpart of the R package GetTDData.
Monthly downloads
139
PyPI downloads in the last 30 days.
All-time downloads
139
Cumulative downloads tracked from PyPI.
GitHub stars
★ 4
1 forks.
Last GitHub push
2026-11-10
Stats updated 2026-11-15
Install
Quickstart
# Run directly with uvx (recommended for MCP clients)
uvx tesourodireto-mcp
# Or install from PyPI
pip install tesourodireto-mcp
MCP Client Configuration
Add this entry to your claude_desktop_config.json or .cursor/mcp.json (or see the MCP Servers Hub for all three servers together):
{
"mcpServers": {
"tesourodireto": {
"command": "uvx",
"args": [
"tesourodireto-mcp"
]
}
}
}
What AI Agents Can Query
- Historical daily prices and yields for Brazilian sovereign bonds (Tesouro Direto)
- Current Tesouro Direto purchase and redemption rates across available maturities
- Per-maturity yield statistics and the ANBIMA sovereign yield curve
Example Prompts
-
“Show current Tesouro IPCA+ (NTN-B) real yields across all available maturities and highlight the longest duration bond.”
-
“Fetch historical yields for Tesouro Prefixado 2029 and plot how spreads evolved over the last 12 months.”
-
“Retrieve the latest ANBIMA yield curve and summarize the term structure slope between 2-year and 10-year rates.”
Companion & Counterpart Software
- R GetTDData — R package counterpart for Tesouro Direto sovereign bonds
Related Datasets
- GetTDData — Prices and Yields of Brazilian Bonds
Related Publications
Cite this package
@manual{perlin_tesourodireto_mcp,
author = {Perlin, Marcelo S.},
title = {tesourodireto-mcp: An MCP server for Brazilian government bonds (Tesouro Direto): historical prices and yields, current rates, per-maturity statistics and the ANBIMA yield curve. It is the Python counterpart of the R package GetTDData.},
year = {2026},
note = {Python Model Context Protocol (MCP) server},
url = {https://github.com/msperlin/tesourodireto-mcp}
}