Skip to main content
Glama
cvm-mcp
by msperlin

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoHost for the HTTP transports.127.0.0.1
MCP_PORTNoPort for the HTTP transports.8000
MCP_TRANSPORTNoTransport mode: stdio, streamable-http or sse.stdio
CVMMCP_CACHE_DIRNoCache root for downloads and Parquet files.~/.cache/cvm-mcp
CVMMCP_REFRESH_HOURSNoRevalidation 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:

  1. Call search_company (or resolve) to turn a name, ticker or CNPJ into a cd_cvm. Codes, not tickers, are the key used by the corporate tools.

  2. Call list_datasets to see everything available, and describe_dataset with detail=True for column meanings, units and caveats.

  3. Prefer the curated tools (get_statement_summary, get_fund_nav, get_insider_trades, governance_score, ...) when they fit the question.

  4. Before run_query, call load_dataset to download and parse the period (it reuses fresh archives; refresh_cache is the forcing version).

  5. 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_datasets shows the view names.

Important:

  • DFP/ITR values: VL_CONTA is raw, VL_CONTA_BRL is 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_companyA

Find the CVM code (cd_cvm) of a company by name, CNPJ, ticker or code.

Accent- and case-insensitive. This is the entry point for every corporate tool: they key on cd_cvm, never on the ticker.

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 (VL_CONTA) and the value in reais (VL_CONTA_BRL).

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 role column (total_assets, equity, revenue, ebit, net_income, ...).

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 family (fi, fii, fidc, fiagro, fip) that tells which monthly report covers it — get_fund_nav routes automatically.

get_fund_navA

NAV time series for any fund, routed to the right CVM dataset.

  • FIF/FAPI: daily quota, net asset value, subscriptions, redemptions, unitholders.

  • FII: monthly net asset value, book value per share, unitholders, dividend yield.

  • FIDC: monthly net asset value and average NAV.

  • FIAGRO: monthly net asset value, unitholders, returns and fees.

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.

  • FIF/FIAGRO: CDA portfolio (asset, issuer, quantity, market value, cost).

  • FII: balance-sheet composition (properties, CRI, FII quotas, cash...).

  • FIDC: credit portfolio by segment (industrial, real estate, payroll...).

The output is long-form: one row per component, with its value in BRL.

get_fidc_reportA

Credit-fund dashboard: assets, portfolio, net asset value and delinquency.

inadimplencia_pct is the overdue credit over the total credit portfolio (tables I.2A.2 and I.2 of the FIDC monthly report).

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 id, a period granularity and one or more tables. Table ids are what describe_dataset and run_query use; SQL views are named <dataset>__<table>.

describe_datasetA

Show the tables, cached periods and columns of one dataset.

Columns come from the local cache; if a table was never queried, columns is empty — call the corresponding data tool once to populate it. With detail=True, column_details explains units and pitfalls (e.g. VL_CONTA vs VL_CONTA_BRL, or FRE percentages).

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_cache: it reuses archives that are still fresh and only builds the partitions that are missing. Call it before run_query so the SQL layer has the tables (and periods) it needs, and use describe_dataset(detail=True) for column meanings.

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 limit.

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.

valor_total is as reported by CVM; amounts from different decades are not inflation-adjusted.

league_tableB

Rank lead underwriters by total offering volume (the ECM/DCM league table).

Prompts

Interactive templates invoked by user choice

NameDescription
analyze_companyDraft a financial + governance profile of one Brazilian listed company.
analyze_fundDraft a performance and portfolio profile of one investment fund.

Resources

Contextual data attached and managed by the client

NameDescription
datasets_resourceThe full dataset registry.

TDQS

B3.1/5.0

Scored across 34 tools

Disambiguation3/5

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.

Naming Consistency3/5

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.

Tool Count2/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues