cvm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Host for the HTTP transports. | 127.0.0.1 |
| MCP_PORT | No | Port for the HTTP transports. | 8000 |
| MCP_TRANSPORT | No | Transport mode: stdio, streamable-http or sse. | stdio |
| CVMMCP_CACHE_DIR | No | Cache root for downloads and Parquet files. | ~/.cache/cvm-mcp |
| CVMMCP_REFRESH_HOURS | No | Revalidation window in hours for CVM archives; 0 disables revalidation. | 12 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
One MCP server for the whole CVM open-data repository (dados.cvm.gov.br): financial statements, corporate filings, fund portfolios, insider trading, governance, public offerings and sanctioning proceedings.
How to work with this server:
Call
search_company(orresolve) to turn a name, ticker or CNPJ into acd_cvm. Codes, not tickers, are the key used by the corporate tools.Call
list_datasetsto see everything available, anddescribe_datasetwithdetail=Truefor column meanings, units and caveats.Prefer the curated tools (
get_statement_summary,get_fund_nav,get_insider_trades,governance_score, ...) when they fit the question.Before
run_query, callload_datasetto download and parse the period (it reuses fresh archives;refresh_cacheis the forcing version).Use
run_query(DuckDB SQL, read-only) to cross datasets. Views are named<dataset>__<table>, e.g.dfp__dre_con,fi_inf_diario__informe,vlmo__transacoes.list_datasetsshows the view names.
Important:
DFP/ITR values:
VL_CONTAis raw,VL_CONTA_BRLis already scaled by ESCALA_MOEDA (thousands) and is the number to report.FRE and the newer datasets use snake_case columns; DFP/ITR keep CVM's uppercase names for compatibility with the standalone servers.
Data is cached locally on first use; the first call for a period downloads and parses an archive (seconds to a minute, the CDA months are large).
Fund tools route by instrument: FIF/FAPI report daily, FII/FIDC/FIAGRO monthly, FIP quarterly (not yet available).
Do not invent numbers: every figure must come from a tool result. Cite "CVM/DFP", "CVM/FRE", "CVM/FI" or "CVM" with the reference period.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_companyA | Find the CVM code ( Accent- and case-insensitive. This is the entry point for every corporate
tool: they key on |
| resolveB | Resolve any identifier to the CVM keys (cd_cvm, CNPJ, ticker, name). |
| list_companiesB | Browse the CVM company registry, optionally filtered by sector. |
| get_tickersC | Map tickers (PETR4, VALE3) to CVM codes and company names. |
| list_account_codesA | List the curated account codes and role names understood by this server. |
| get_financial_statementsB | Full statement lines for one or more companies, as CSV. One row per reported account, with the raw value ( |
| get_account_historyB | Follow one account over time for one or more companies (a compact series). |
| get_statement_summaryB | Compact headline view of one company-year: totals, equity, revenue, profit. Returns the top-level accounts with a |
| list_fre_tablesB | List the 36 FRE corporate tables understood by this server. |
| get_fre_tableB | Read rows from one FRE table, filtered by company and year. The generic workhorse; prefer the curated helpers when they fit. |
| get_company_overviewA | Show which FRE tables have data for one company-year. Downloads and parses the whole year once (the first call can take a while). |
| get_shareholdersC | Shareholder position: who owns the company and how much. |
| get_compensationC | Compensation of the board, officers and fiscal council. |
| get_boardC | Board, officers and fiscal council composition. |
| get_capitalB | Share capital events: amounts, approvals and share counts. |
| get_insider_tradesB | Transactions by controllers, officers and board members (CVM/VLMO). Returns who traded, the role, the movement type, date, quantity, unit price and volume. This is the insider-trading signal dataset (Instruction 358). |
| insider_summaryB | Net insider buying/selling by year and role (aggregate of VLMO). |
| governance_practicesB | Explain-or-comply governance report: each practice and whether it was adopted. |
| governance_scoreC | Adoption rate of the recommended governance practices, overall and by chapter. |
| search_fundA | Find a fund or class and get the CNPJ used by every fund tool. The CVM keys fund data on the class CNPJ. The result carries a |
| get_fund_navA | NAV time series for any fund, routed to the right CVM dataset.
|
| get_fund_flowsA | Monthly subscriptions, redemptions and net flow for one FI fund. Only FIF/FAPI report daily subscriptions and redemptions (Informe Diário). FII, FIDC and FIAGRO do not publish a flow series in the monthly report. |
| get_fund_portfolioA | Holdings of any fund, routed to the right dataset.
The output is long-form: one row per |
| get_fidc_reportA | Credit-fund dashboard: assets, portfolio, net asset value and delinquency.
|
| rank_fundsB | Rank FI funds in one month by net asset value, net flow, return or unitholders. |
| list_datasetsA | List every CVM dataset this server understands. This is the entry point: each dataset has an |
| describe_datasetA | Show the tables, cached periods and columns of one dataset. Columns come from the local cache; if a table was never queried, |
| cache_statusB | What is already downloaded and parsed locally, per dataset. |
| load_datasetA | Download and parse a dataset/period into the local cache. This is the non-destructive counterpart of |
| refresh_cacheA | Force a re-download and rebuild of cached partitions. CVM rewrites the current period in place, so use this when the latest month looks stale. |
| run_queryA | Run SQL across cached CVM tables (DuckDB engine). Use it for questions that combine datasets, for aggregates the curated tools
do not expose, and to inspect a table before writing a longer query. Only
SELECT/WITH is allowed; the result is capped by |
| search_offeringsB | Search registered, exempt and restricted public offerings since 1988. |
| issuance_volumeA | Total offering volume, grouped by year, asset type, issuer, lead or rite.
|
| league_tableB | Rank lead underwriters by total offering volume (the ECM/DCM league table). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| analyze_company | Draft a financial + governance profile of one Brazilian listed company. |
| analyze_fund | Draft a performance and portfolio profile of one investment fund. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| datasets_resource | The full dataset registry. |
TDQS
Scored across 34 tools
Several tools overlap in purpose: resolve, search_company, and get_tickers all map identifiers to CVM codes, and governance_practices vs governance_score, list_datasets vs list_fre_tables, and load_dataset vs refresh_cache require reading descriptions to separate. The financial-statement family (get_financial_statements, get_statement_summary, get_account_history, get_fre_table) is distinguishable but only after careful reading. Descriptions do help, but an agent could easily misselect within these clusters.
Names are uniformly snake_case, which is good, but verb conventions are mixed: get_/list_/search_ prefixes coexist with verbless nouns (insider_summary, governance_practices, governance_score, cache_status, league_table) and bare verbs (resolve). The result is readable but not a predictable verb_noun pattern throughout.
34 tools exceeds the heavy threshold, and while the server genuinely spans multiple domains (corporate filings, FRE, funds, offerings, governance, insider trading, raw SQL), the surface is large enough that a generic run_query plus several overlapping helpers make the set feel overloaded for one server.
Coverage is extensive: company registry, financial statements, FRE tables, shareholders, board/compensation, capital, insider trades, governance, FIDC, multi-type fund NAV/flows/portfolio, offerings, and a SQL escape hatch. The run_query tool lets agents reach anything the curated helpers miss, so remaining gaps (e.g. specific event/calendar datasets) are minor.