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.Notas explicativas are free text inside the full filing, not a CVM table:
get_dfp_notes/search_dfp_notesdownload and read the filing PDF linked fromdfp__documento.link_doc. Cite the PDF page they return.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. |
| get_dfp_documentA | Filing metadata and the download link of the full document. The link points to the CVM ZIP with the complete filing: an XML with the
statement numbers, a PDF with the notas explicativas and the company data.
Use |
| get_dfp_notesA | Read the explanatory notes of one company/year. Without |
| search_dfp_notesA | Search the extracted text of the filing, returning snippets with pages. Searches every page (not only the detected notes) so a hit is never lost to a segmentation failure. Each match carries the PDF page and, when known, the number of the note it belongs to. |
| 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 Heavy optional tables ( |
| 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 37 tools
Most tools target a distinct resource (funds vs filings vs offerings), and descriptions explicitly flag overlaps (get_fre_table is 'the generic workhorse; prefer the curated helpers'). However, several pairs genuinely overlap: search_company/resolve/get_tickers/list_companies all answer 'which company is this?', and get_financial_statements/get_statement_summary/get_account_history/run_query all serve statement retrieval. An agent must read descriptions carefully to pick correctly.
The dominant pattern is verb_noun (get_fund_nav, list_companies, search_offerings, rank_funds), applied consistently across the bulk of the 37 tools. A handful of noun-first outliers break the pattern: resolve, insider_summary, cache_status, governance_score, issuance_volume, league_table. Minor deviation, still readable.
37 tools is well past the heavy threshold, and while the CVM domain is genuinely broad, some tools are convenience wrappers over others (resolve duplicates search_company/get_tickers; curated FRE helpers layer on get_fre_table; run_query can approximate several tools). The surface feels like an accumulation of sub-products rather than a tightly scoped set.
Coverage is broad for a read-only regulatory-data server: identity resolution, DFP/ITR statements and notes, FRE corporate tables, all fund families (FI/FII/FIDC/FIAGRO), insider trading, offerings/issuance, governance, plus cache and SQL escape hatches. Minor gaps remain (e.g. dedicated quarterly ITR view, dividends/events, fund performance history beyond NAV), but agents can work around them via run_query.