Skip to main content
Glama
mcp-mercado-financeiro-brasil

mcp-mercado-financeiro-brasil

by vinibeni2801

mcp-mercado-financeiro-brasil

🚧 В разработке (Фаза 1). Проект активно развивается — API инструментов и каталог источников ещё могут измениться. Используйте с осторожностью и следите за дорожной картой ниже.

Сервер MCP (Model Context Protocol), который подключает ИИ-ассистентов (Claude Desktop, Claude Code, Cursor, Windsurf) к данным бразильского финансового рынка через публичные источники. Ядро без регистрации, async, с кэшем и плавной деградацией.

ПРЕДУПРЕЖДЕНИЕ: информационный/образовательный контент. Не является рекомендацией по инвестированию. Прошлая доходность не гарантирует будущих результатов.

Инструменты (Фаза 1)

Модуль

Инструменты

indicadores

get_selic, get_cdi, get_ipca, get_igpm, get_poupanca, get_serie_sgs, rentabilidade_real

cambio

get_cotacao (PTAX), historico_cambio

renda_fixa

listar_titulos_tesouro, get_titulo_tesouro, simular_tesouro

calculadoras

juros_compostos, converter_taxa, rentabilidade_vs_cdi, imposto_renda_renda_fixa

meta

health_check, fontes_de_dados

Источники: BACEN SGS, BACEN PTAX (Olinda), Tesouro Transparente — все без ключа. Акции/FIIs (brapi.dev) и криптовалюта (CoinGecko) появятся на фазах 2/3 как опциональные через токен.

Related MCP server: Bolsai

Установка

# execução efêmera (recomendado)
uvx mcp-mercado-financeiro-brasil

# ou permanente
pip install mcp-mercado-financeiro-brasil

Claude Desktop / Cursor

{
  "mcpServers": {
    "mercado-financeiro-brasil": {
      "command": "uvx",
      "args": ["mcp-mercado-financeiro-brasil"]
    }
  }
}

Разработка

uv sync --extra dev
uv run pytest          # testes unitários (mockados)
uv run pytest -m integration  # testes que batem nas APIs reais
uv run ruff check .
uv run mypy src

Переменные окружения (опциональные)

Переменная

По умолчанию

Назначение

MCP_MFB_LOG_LEVEL

INFO

Уровень логирования

MCP_MFB_HTTP_TIMEOUT

20

Таймаут HTTP (с)

MCP_MFB_CACHE_TTL

300

TTL кэша (с)

MCP_MFB_BRAPI_TOKEN

—

Активирует акции/FIIs (фаза 2)

MCP_MFB_COINGECKO_KEY

—

Активирует криптовалюту (фаза 2)

Лицензия

MIT

Available Tools

18 tools
converter_taxaC

Converte taxa entre 'anual' e 'mensal' (juros compostos equivalentes).

Inputs: taxa_pct (required), de, para.

fontes_de_dadosA

Lista as fontes de dados usadas e se exigem chave.

Inputs: no named parameters.

get_cdiA

CDI diário mais recente (% ao dia). Referência de renda fixa pós-fixada.

Inputs: no named parameters.

get_cotacaoA

Cotação PTAX oficial de uma moeda frente ao Real (compra/venda).

moeda: USD, EUR, GBP, JPY, CHF, CAD, AUD. data: 'aaaa-mm-dd' (padrão: procura o último dia útil disponível a partir de hoje).

Inputs: data, moeda.

get_igpmB

IGP-M — variação mensal (%). Usado em reajuste de aluguéis/contratos.

Inputs: ultimos.

get_ipcaA

IPCA (inflação oficial) — variação mensal (%). ultimos: nº de meses.

Inputs: ultimos.

get_poupancaC

Rendimento mensal da poupança (%).

Inputs: ultimos.

get_selicA

Meta SELIC atual (taxa básica de juros, % ao ano) definida pelo COPOM.

Inputs: no named parameters.

get_serie_sgsA

Série genérica do SGS do Banco Central por código numérico.

Ex.: 433=IPCA, 432=SELIC meta, 12=CDI, 1=dólar. ultimos: nº de pontos.

Inputs: codigo (required), ultimos.

get_titulo_tesouroA

Busca títulos cujo tipo contém nome (ex.: 'IPCA', 'Selic', 'Prefixado').

Inputs: nome (required).

health_checkA

Status do servidor e quais fontes opcionais estão configuradas.

Inputs: no named parameters.

historico_cambioC

Série histórica PTAX de uma moeda. Datas no formato 'aaaa-mm-dd'.

Inputs: fim (required), moeda (required), inicio (required).

imposto_renda_renda_fixaB

IR sobre rendimento de renda fixa pela tabela regressiva, por prazo (dias).

Inputs: rendimento (required), dias_aplicado (required).

juros_compostosB

Montante com juros compostos e aportes periódicos ao fim de cada período.

Inputs: periodos (required), principal (required), taxa_periodo_pct (required), aporte.

listar_titulos_tesouroB

Lista os títulos do Tesouro Direto disponíveis com taxa e preço mais recentes.

Inputs: no named parameters.

rentabilidade_realA

Rentabilidade real: desconta a inflação (IPCA) da taxa nominal.

Fórmula de Fisher: (1+nominal)/(1+inflação) - 1. Taxas em % ao ano.

Inputs: ipca_anual (required), taxa_nominal_anual (required).

rentabilidade_vs_cdiC

Quanto o investimento rende como % do CDI.

Inputs: cdi_anual (required), taxa_investimento_anual (required).

simular_tesouroA

Simula o montante bruto de um título prefixado/indexado.

taxa_anual em % a.a. (use a Taxa Compra do título). Não considera IR, taxa de custódia (0,20% a.a. B3) nem marcação a mercado no resgate antecipado.

Inputs: anos (required), taxa_anual (required), valor_investido (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 18 tools

    Disambiguation3/5

    Most tools target distinct indicators or calculations, but get_serie_sgs overlaps with get_selic, get_cdi, get_ipca, and get_cotacao by exposing the same underlying SGS series through raw codes. listar_titulos_tesouro and get_titulo_tesouro also share a similar boundary, though descriptions help clarify one is a full list and the other is a search.

    Naming Consistency2/5

    The tool names mix English and Portuguese conventions without a consistent pattern: get_selic and get_cotacao follow English get_*, but listar_titulos_tesouro and simular_tesouro use Portuguese verbs, while historico_cambio, juros_compostos, and imposto_renda_renda_fixa are bare noun phrases. The naming is readable but inconsistent enough to make the overall surface feel unpolished.

    Tool Count4/5

    With 18 tools, the server sits slightly above the typical well-scoped range, but the count is reasonable given the breadth of Brazilian financial data covered: macro indicators, FX, Tesouro Direto, financial calculations, and operational health. A few tools could be consolidated, but none feel superfluous.

    Completeness4/5

    The server covers the main Brazilian economic indicators, official FX rates, Tesouro Direto browsing and simulation, and common fixed-income calculations such as compounding, rate conversion, real return, CDI comparison, and IR. Minor gaps exist, like no dedicated historical wrapper for IGP-M or accumulated CDI, though get_serie_sgs can partially fill those needs.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language access to Brazilian treasury bond data through the Tesouro Direto API. Query market data, bond details, and search bonds by type, maturity, and other criteria.
      23 npm
      5
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides point-in-time Brazilian market data and official statistics, enabling accurate backtesting and AI agent access to vintage, unrevised data, as well as Brazilian financial primitives like PIX code generation and business day calculations.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to query Brazilian public data from IBGE, Banco Central, INMET, and Câmara dos Deputados, including population, economic indicators, weather observations, and legislative information, without requiring API keys for most tools.
      14
      48 PyPI
      3
      MIT