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

- **Ecosystem:** Python (PyPI)
- **Page URL:** https://msperlin.com/code/python/tesourodireto-mcp
- **GitHub:** https://github.com/msperlin/tesourodireto-mcp
- **PyPI:** https://pypi.org/project/tesourodireto-mcp/
- **Monthly downloads:** 139
- **All-time downloads:** 139
- **GitHub stars:** 4
- **Last push:** 2026-11-10

## Installation

```bash
uvx tesourodireto-mcp
```

```bash
pip install tesourodireto-mcp
```

## Quickstart

```bash
# Run directly with uvx (recommended for MCP clients)
uvx tesourodireto-mcp

# Or install from PyPI
pip install tesourodireto-mcp
```

## MCP Client Configuration

```json
{
  "mcpServers": {
    "tesourodireto": {
      "command": "uvx",
      "args": [
        "tesourodireto-mcp"
      ]
    }
  }
}
```

## Related Datasets

- [GetTDData](https://msperlin.com/data/gettddata) (DOI: 10.7910/DVN/SCSQUF)

## Related Publications

- 2016 — [A Microestrutura do Tesouro Direto: Sazonalidade do Fluxo de Ordens e a Formação de Spreads](https://msperlin.com/publications/2016-rbfin-a-microestrutura-do-tesou)

## Citation

```bibtex
@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}
}
```
