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.
market_data
: Retrieve general treasury bond market data (opening/closing times, status)bond_data
: Get detailed information about a specific bondsearch_bonds
: Search/filter bonds by type, maturity, and other criteriaIn a MCP-compatible client, you can use the following prompts:
To install Tesouro Direto MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @AtilioA/tesouro-direto-mcp --client claude
With npx, add this to your ~/.cursor/mcp.json
, or claude_desktop_config.json
if 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:
node dist/index.js
Or use it with any MCP-compatible client (e.g., MCP Inspector):
npx @modelcontextprotocol/inspector dist/index.js
market_data
Retrieve general market data, including opening/closing times and current status.
bond_data
Get detailed information for a specific bond by its code.
search_bonds
Search and filter bonds by type (SELIC, IPCA, PREFIXADO), maturity date, and more.
Variable | Description | Default |
---|---|---|
USE_MCP_CACHE | Enable the in-memory cache for API responses | true |
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 projectpnpm start
/ npm start
: Start the serverpnpm run dev
/ npm run dev
: Start the server in development mode with auto-reloadContributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.
A read-only MCP server for CSV files from CData, requiring an external JDBC driver for connection.
Leverages your Schemas and Access Patterns to interact with your DynamoDB Database using natural language.
Interact with Tinybird serverless ClickHouse platform
MCP server for libSQL databases with comprehensive security and management tools. Supports file, local HTTP, and remote Turso databases with connection pooling, transaction support, and 6 specialized database tools.
Securely query and retrieve data from your ThoughtSpot instance.
Integrates with Trino and Iceberg for advanced data exploration, querying, and table maintenance.
Access real-time stock prices, company information, and financial data from Yahoo Finance.
Provides programmatic access to Borsa Istanbul (BIST) stock data, financials, news, and analysis using KAP and Yahoo Finance.
A read-only MCP server for querying live data from Square using the CData JDBC Driver.
Interact with the Stellar blockchain to manage wallets, list tokens, query balances, and transfer funds.