Tesouro Direto MCP Server

by atilioa

Not rated
GitHub

About

Provides natural language access to Brazilian treasury bond data from the Tesouro Direto API, allowing users to query market data and bond details.

Details

Author
atilioa
Categories
Database, Finance, Other, API
Tags
#data-analysis

Example JSON for MCP client configuration (Cursor/Claude)

With](https://smithery.ai/server/@AtilioA/tesouro-direto-mcp)npx, add this to your~/.cursor/mcp.json, orclaude_desktop_config.jsonif you are using its desktop app:

{ "mcpServers": { "tesouro-direto": { "command": "npx", "args": [ "-y", "tesouro-direto-mcp" ], "env": { "USE_MCP_CACHE": "true" } } } }
# Clone the repository git clone https://github.com/AtilioA/tesouro-direto-mcp.git cd tesouro-direto-mcp # Install dependencies pnpm install # Build the project pnpm run build

You can run the MCP server directly after building:

Or use it with any MCP-compatible client (e.g., MCP Inspector):

npx @modelcontextprotocol/inspector dist/index.js

Retrieve general market data, including opening/closing times and current status.

Get detailed information for a specific bond by its code.

Search and filter bonds by type (SELIC, IPCA, PREFIXADO), maturity date, and more.

Set these in your environment or in your MCP client configuration.

src/ ├── api/ # API client for Tesouro Direto │ └── tesouroDireto.ts ├── cache/ # Caching implementation │ └── apiCache.ts ├── resources/ # MCP resources implementation │ └── index.ts ├── tools/ # MCP tools implementation │ ├── bondData.ts │ ├── marketData.ts │ └── searchBonds.ts ├── types/ # Type definitions │ └── index.ts ├── utils/ # Utility functions │ ├── errorHandler.ts │ └── logger.ts ├── client.ts # Example MCP client ├── index.ts # Entry point └── server.ts # MCP server implementation

- pnpm run build/npm run build: Build the project
- pnpm start/npm start: Start the server
- pnpm run dev/npm run dev: Start the server in development mode with auto-reload

Contributions are welcome! Please open an issue or submit a pull request onGitHub.

This project is licensed under the GNU Affero General Public License v3.0. See theLICENSEfile for details.

Provides real-time financial market data using the Alpha Vantage API.

A stock market data service for querying A-share market data from Sina and Tencent Finance.

Perform financial analysis using the DART API and Claude.

Funding rounds, acquisitions & exec moves — deduped, enriched, typed. Query over REST, stream over webhooks, or hand to your agent over MCP. 50 free credits.

Access financial datasets from the Federal Reserve Economic Data (FRED) API.

Provides real-time financial data using the Tushare API.

Provides real-time financial data from Yahoo Finance.

Access US Treasury data via the Fiscal Data API to fetch statements, historical data, and generate reports.

Real-time forex macroeconomic API for all major currency pairs sourced from central bank announcements.

Retrieve and process economic data from the International Monetary Fund (IMF) API, including datasets, time series, indicators, and countries.

Provides natural language access to Brazilian treasury bond data from the Tesouro Direto API, allowing users to query market data and bond details.

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

Query market data, bond details, and search/filter bonds using everyday language through MCP-compatible clients.

- MCP tools:

- 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

In a MCP-compatible client, you can use the following prompts:

- "Show all available Tesouro Direto bonds"
- "Get details for the bond IPCA+ 2029"
- "Search for IPCA bonds maturing after 2045"
- "What is the current treasury bond market status?"
- "Provide a detailed analysis of the top three bonds with the highest yields for both IPCA and fixed-rate bonds."

To install Tesouro Direto MCP Server for Claude Desktop automatically viaSmithery:

npx -y @smithery/cli install @AtilioA/tesouro-direto-mcp --client claude

Example JSON for MCP client configuration (Cursor/Claude)

Withnpx, add this to your~/.cursor/mcp.json, orclaude_desktop_config.jsonif you are using its desktop app:

{ "mcpServers": { "tesouro-direto": { "command": "npx", "args": [ "-y", "tesouro-direto-mcp" ], "env": { "USE_MCP_CACHE": "true" } } } }
# Clone the repository git clone https://github.com/AtilioA/tesouro-direto-mcp.git cd tesouro-direto-mcp # Install dependencies pnpm install # Build the project pnpm run build

You can run the MCP server directly after building:

Or use it with any MCP-compatible client (e.g., MCP Inspector):

npx @modelcontextprotocol/inspector dist/index.js

Retrieve general market data, including opening/closing times and current status.

Get detailed information for a specific bond by its code.

Search and filter bonds by type (SELIC, IPCA, PREFIXADO), maturity date, and more.

Set these in your environment or in your MCP client configuration.

src/ ├── api/ # API client for Tesouro Direto │ └── tesouroDireto.ts ├── cache/ # Caching implementation │ └── apiCache.ts ├── resources/ # MCP resources implementation │ └── index.ts ├── tools/ # MCP tools implementation │ ├── bondData.ts │ ├── marketData.ts │ └── searchBonds.ts ├── types/ # Type definitions │ └── index.ts ├── utils/ # Utility functions │ ├── errorHandler.ts │ └── logger.ts ├── client.ts # Example MCP client ├── index.ts # Entry point └── server.ts # MCP server implementation

- pnpm run build/npm run build: Build the project
- pnpm start/npm start: Start the server
- pnpm run dev/npm run dev: Start the server in development mode with auto-reload

Contributions are welcome! Please open an issue or submit a pull request onGitHub.

This project is licensed under the GNU Affero General Public License v3.0. See theLICENSEfile for details.

Provides real-time financial market data using the Alpha Vantage API.

A stock market data service for querying A-share market data from Sina and Tencent Finance.

Perform financial analysis using the DART API and Claude.

Funding rounds, acquisitions & exec moves — deduped, enriched, typed. Query over REST, stream over webhooks, or hand to your agent over MCP. 50 free credits.

Access financial datasets from the Federal Reserve Economic Data (FRED) API.

Provides real-time financial data using the Tushare API.

Provides real-time financial data from Yahoo Finance.

Access US Treasury data via the Fiscal Data API to fetch statements, historical data, and generate reports.

Real-time forex macroeconomic API for all major currency pairs sourced from central bank announcements.

Retrieve and process economic data from the International Monetary Fund (IMF) API, including datasets, time series, indicators, and countries.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.