OpenFinData MCP server
Commit Nov 9, 2026Provides access to Brazilian public financial data through an MCP server, REST API, and Python library.
Also known as robertoecf/OpenFinData
- Stars
- 13
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 9, 2026
- License
- MIT
What is OpenFinData MCP?
OpenFinData provides access to Brazilian public financial data through an MCP server, REST API, and Python library.
Summary generated from the project's README
About OpenFinData MCP server
OpenFinData provides a unified layer for accessing Brazilian public financial information. It serves analysts, researchers, and developers by aggregating data from multiple official sources like BCB, CVM, B3, and IBGE into a single interface. The system functions as an MCP server, a REST API, and an asynchronous Python library, allowing users to integrate financial data into various workflows.
Users can run the server locally using the findata serve command to host the MCP endpoint at localhost:8000/mcp. The infrastructure includes a local registry to resolve CNPJ numbers, tickers, and names. Most primary data sources do not require API keys, making it easy to set up for local development or research. The project also features a Chart Lab for visual data representation and supports multiple rendering formats like SVG and PNG.
What you can do with it
- 1Retrieve central bank interest ratesAsk the AI to fetch the latest Selic rates from the BCB source.
- 2Search for specific company informationRequest a search for a company like Petrobras within the CVM database.
- 3Resolve financial identifiersUse the registry to look up details for a specific ticker or CNPJ.
- 4Get stock market quotesQuery the B3 for current price quotes of a specific asset.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablerobertoecf/openfindata is public and reachablegithub.com/robertoecf/openfindata ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-09github.com/robertoecf/openfindata ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubDados Financeiros Abertos
Infraestrutura open source para consultar dados financeiros públicos do Brasil em Python, REST, CLI e MCP.
O que é
O projeto agrega fontes públicas brasileiras em uma camada única e auditável para analistas, desenvolvedores, pesquisadores e agentes:
- biblioteca Python assíncrona;
- API REST com Swagger e ReDoc;
- CLI
findata; - servidor MCP em
/mcp; - registro local para resolver CNPJ, ticker e nome.
As fontes principais não exigem chaves de API e os testes unitários não acessam a
rede. O slug de distribuição é openfindata; o pacote importável e a
CLI continuam sendo findata.
Instalação
pip install openfindata
Para desenvolvimento local:
git clone https://github.com/robertoecf/openfindata.git
cd openfindata
pip install -e '.[dev]'
bash scripts/git/install-hooks.sh
Uso rápido
CLI
findata bcb get selic -n 10
findata bcb ptax
findata cvm search Petrobras
findata b3 quote PETR4
findata registry lookup 33000167000101
findata serve
Python
import asyncio
from findata.registry import lookup
from findata.sources.bcb import sgs
async def main() -> None:
selic = await sgs.get_series_by_name("selic", n=5)
print(selic)
entity = await lookup("PETR4")
print(entity.entities[0])
asyncio.run(main())
REST e MCP
findata serve
curl 'http://localhost:8000/bcb/series/name/selic?n=5'
curl 'http://localhost:8000/registry/lookup?q=PETR4'
- Site local:
http://localhost:8000/ - Chart Lab:
http://localhost:8000/charts - Swagger:
http://localhost:8000/api/docs - ReDoc:
http://localhost:8000/redoc - MCP:
http://localhost:8000/mcp
O Chart Lab é a referência visual e informacional para gráficos do projeto, mas o renderer pode ser SVG, PNG, HTML inline ou TradingView Lightweight Charts. O contrato detalhado fica em docs/CHART_STANDARDS.md.
Fontes suportadas
O README mantém só o mapa de alto nível. A matriz completa de fontes, endpoints, notas de autenticação e exemplos de consulta fica em docs/SOURCES_AND_ENDPOINTS.md.
Fontes hoje expostas: BCB, Base dos Dados, CVM, Tesouro, IBGE, IPEA, Open Finance Brasil, B3, Yahoo Finance experimental, ANBIMA, Receita Federal, ANEEL, SUSEP e o registro offline CNPJ/ticker/nome.
Documentação
- Fontes e endpoints
- Padrão de gráficos
- Deploy público
- Open Finance público
- Fontes com autenticação
- Prioridades de fontes
- Manifesto
- Contribuição
Qualidade
Antes de propor merge ou release, rode pelo menos:
ruff format --check src/ tests/ scripts/
ruff check src/ tests/ scripts/
mypy src/findata
pytest tests/ -q
Os testes de integração contra APIs públicas reais ficam separados por marcador:
pytest -m integration
Escopo
Este projeto consulta dados públicos. Ele não consulta dados privados de clientes, não armazena credenciais de usuário e não depende de fornecedores comerciais como camada central.
Licença
MIT.
OpenFinData MCP questions
What kind of data does OpenFinData provide?
It aggregates Brazilian public financial sources including BCB, CVM, B3, Tesouro, IBGE, and others into a single layer.
Does using this server require API keys?
The main sources do not require API keys.
How can I install the package?
You can install it using pip with the command pip install openfindata.
Does the project handle private customer data?
No, the project only queries public data and does not store user credentials or rely on commercial providers as a central layer.