Tesouro Direto MCP Server

Model Context Protocol (MCP) server for Tesouro Direto API integration

Local serverstdio

What is the Tesouro Direto MCP MCP server?

Tesouro Direto MCP MCP server exists for a simple reason — assistants are far more useful when they can act on Tesouro Direto MCP directly instead of describing what you should do. Model Context Protocol (MCP) server for Tesouro Direto API integration.

What you get

A Model Context Protocol (MCP) server implementation for integrating with the Tesouro Direto API, enabling natural language access to Brazilian treasury bond data.

  • market_data: Retrieve general treasury bond market data (opening/closing times, status)
  • bond_data: Get detailed information about a specific bond
  • search_bonds: Search/filter bonds by type, maturity, and other criteria
  • Smart caching — 10-minute in-memory cache based on API update timestamps to reduce calls while ensuring data freshness

Setting it up

Installation goes through your MCP client rather than a global install: point it at @smithery/cli on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

What the assistant can call

Once Tesouro Direto MCP is connected, these are the calls the assistant has available:

  • market_data — Retrieve general market data, including opening/closing times and current status
  • bond_data — The bond_data tool exposed by this server
  • search_bonds — Search and filter bonds by type (SELIC, IPCA, PREFIXADO), maturity date, and more

Configuration and credentials

You will need one environment variable: USE_MCP_CACHE. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the tesouro direto mcp mcp server does with a few real requests.

Choosing this one

Among the knowledge and memory options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Tesouro Direto MCP's toolset — market_data, bond_data, search_bonds — is a fair guide to whether it matches your workflow. It is maintained by AtilioA; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
market_dataRetrieve general market data, including opening/closing times and current status.
bond_dataThe bond_data tool exposed by this server.
search_bondsSearch and filter bonds by type (SELIC, IPCA, PREFIXADO), maturity date, and more.

How to install the Tesouro Direto MCP MCP server

{
  "mcpServers": {
    "tesouro-direto": {
      "command": "npx",
      "args": ["-y", "@smithery/cli"],
      "env": {
        "USE_MCP_CACHE": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
USE_MCP_CACHEConfiguration value read at startup.Optional

Example prompts to try

  • Use Tesouro Direto MCP to market data.
  • Use Tesouro Direto MCP to bond data.
  • Use Tesouro Direto MCP to search bonds.

Frequently asked questions

It connects Tesouro Direto MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (market_data, bond_data, search_bonds) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Tesouro Direto MCP directly.