Skip to main content
Glama

FinResearch MCP

FinResearch MCP is a production-oriented Model Context Protocol server for SEC EDGAR Company Facts research, financial analysis, valuation, and plot-ready data. It is designed as a transparent foundation for AI-assisted equity research—not as investment advice.

Highlights

  • Reusable, rate-limited SEC client with timeouts, transient retries, response validation, and a five-minute in-memory Company Facts cache.

  • Normalized annual financial histories for income statement, cash-flow, and balance-sheet metrics.

  • Profitability, liquidity, leverage, efficiency, and cash-conversion ratios.

  • Assumption-driven CAPM, WACC, DCF, enterprise value, equity value, intrinsic value, and sensitivity analysis tools.

  • High-level company analysis, peer comparison, and structured chart data.

  • Provider-neutral RAG contracts for future 10-K/10-Q, MD&A, and risk-factor retrieval.

Related MCP server: SEC EDGAR MCP Server

Installation and usage

Requirements: Python 3.12+, uv, and a contact email address for SEC requests.

uv sync
uv run mcp dev main.py

mcp dev main.py launches MCP Inspector. The exported main:mcp object also works with stdio-based MCP clients. Set FINRESEARCH_LOG_LEVEL=DEBUG for diagnostic logs; logs use stderr so MCP stdio remains clean.

Tools

Area

Tools

Existing tools

calculate_cagr, get_sec_company_facts, get_financial_fact

Financial data

get_company_financials, get_financial_ratios

Analysis

analyze_company, get_company_chart_data, compare_companies

Valuation

calculate_capm_cost_of_equity, calculate_wacc_rate, calculate_dcf_valuation, calculate_enterprise_value, calculate_equity_value_from_enterprise_value, calculate_intrinsic_value_per_share, run_dcf_sensitivity_analysis

Version 2 platform

ai_analyze_company, index_sec_filing, search_sec_filing_rag, analyze_portfolio, get_market_snapshot, get_market_price_history, get_dashboard_data, export_company_report_markdown, export_company_report_pdf

get_company_financials covers revenue, revenue history, net income, operating income/EBIT, gross profit, EBITDA when depreciation data is reported, EPS, diluted EPS, operating cash flow, free cash flow, CapEx, cash, debt, current assets/liabilities, total assets/liabilities, equity, and book value. Market capitalization and market-derived enterprise value are explicitly null because SEC Company Facts is not a market-data service.

Data and calculation notes

  • Annual duration facts are 10-K records between 330 and 380 days; when a period has multiple filings, the most recently filed observation is used.

  • Instant balance-sheet facts use their latest 10-K period end.

  • Unreported or non-standard company concepts return null; the server does not fabricate estimates.

  • Ratio calculations use reported latest values. ROIC assumes a 21% tax rate where tax expense is not consistently available.

  • DCF tools require explicit assumptions and return structured intermediate projections for auditability.

Development

.venv/bin/python -m compileall -q main.py clients models rag tools utils tests
.venv/bin/python -m unittest discover -s tests -v

The tests use mocked HTTP transports and never call SEC EDGAR. See architecture documentation, RAG preparation, and example prompts. See Version 2 platform documentation for filing RAG, market-data limitations, dashboard payloads, portfolios, and report exports.

Folder structure

clients/   SEC API integration
models/    typed financial domain models
tools/     MCP tool groups
utils/     extraction, ratios, valuation, logging, constants
rag/       future filing-retrieval interfaces
tests/     offline unit tests
docs/      architecture and RAG design
examples/  prompts for MCP clients

Available Tools

24 tools
ai_analyze_companyC

Generate an attributable AI-ready research brief from financials and indexed filings.

Inputs: cik (required), contact_email (required), filing_query. Returns: object

analyze_companyC

Generate a comprehensive, deterministic financial-health analysis from SEC data.

Inputs: cik (required), contact_email (required), years. Returns: object

analyze_portfolioB

Analyze position weights, market value, unrealized return, and concentration.

Inputs: positions (required). Returns: object

calculate_cagrC

Calculate compound annual growth rate (CAGR) as a percentage.

Inputs: years (required), ending_value (required), beginning_value (required). Returns: result

calculate_capm_cost_of_equityB

Calculate CAPM cost of equity as a decimal rate.

Inputs: beta (required), risk_free_rate (required), expected_market_return (required). Returns: result

calculate_dcf_valuationC

Calculate enterprise value with a constant-growth discounted cash flow model.

Inputs: growth_rate (required), discount_rate (required), free_cash_flow (required), terminal_growth_rate (required), +1 more. Returns: object

calculate_enterprise_valueA

Calculate enterprise value from market capitalization, debt, and cash.

Inputs: cash (required), debt (required), market_cap (required). Returns: result

calculate_equity_value_from_enterprise_valueB

Calculate equity value from enterprise value, cash, and debt.

Inputs: cash (required), debt (required), enterprise_value (required). Returns: result

calculate_intrinsic_value_per_shareB

Calculate intrinsic value per diluted share.

Inputs: equity_value (required), diluted_shares_outstanding (required). Returns: result

calculate_wacc_rateB

Calculate WACC as a decimal rate from market-value capital weights.

Inputs: tax_rate (required), cost_of_debt (required), cost_of_equity (required), market_value_debt (required), +1 more. Returns: result

compare_companiesC

Compare revenue, margins, returns, cash flow, debt, growth, and valuation availability.

Inputs: first_cik (required), second_cik (required), contact_email (required). Returns: object

export_company_report_markdownC

Create a Markdown company research report at a relative project path.

Inputs: cik (required), contact_email (required), output_path. Returns: object

export_company_report_pdfC

Create a PDF company research report at a relative project path.

Inputs: cik (required), contact_email (required), output_path. Returns: object

get_company_chart_dataC

Return structured revenue, income, cash-flow, debt, and growth data for plotting.

Inputs: cik (required), contact_email (required), years. Returns: object

get_company_financialsC

Return supported annual financial metrics and plot-ready histories for a company.

Inputs: cik (required), contact_email (required), years. Returns: object

get_dashboard_dataB

Aggregate company analysis, financial trends, and optional market data for a dashboard.

Inputs: cik (required), contact_email (required), years, ticker. Returns: object

get_financial_factC

Retrieve annual US-GAAP financial history from SEC EDGAR.

Inputs: cik (required), concept (required), contact_email (required), unit, +1 more. Returns: object

get_financial_ratiosC

Calculate profitability, liquidity, leverage, and efficiency ratios from SEC data.

Inputs: cik (required), contact_email (required). Returns: object

get_market_price_historyB

Return delayed plot-ready market OHLCV history for a ticker.

Inputs: ticker (required), range, interval. Returns: result

get_market_snapshotA

Return delayed public market-price metadata for a ticker.

Inputs: ticker (required). Returns: object

get_sec_company_factsC

Retrieve XBRL company facts metadata from SEC EDGAR.

Inputs: cik (required), contact_email (required). Returns: object

index_sec_filingB

Fetch, chunk, and index a known SEC filing document for RAG retrieval.

Inputs: cik (required), form_type (required), filing_date (required), contact_email (required), +3 more. Returns: object

run_dcf_sensitivity_analysisB

Return a structured DCF sensitivity grid for charting or tabulation.

Inputs: growth_rate (required), discount_rates (required), free_cash_flow (required), terminal_growth_rates (required), +1 more. Returns: result

search_sec_filing_ragC

Search locally indexed SEC filing chunks with attributable lexical retrieval.

Inputs: cik (required), query (required), limit. Returns: object

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 24 tools

    Disambiguation4/5

    Most tools have distinct purposes (e.g., calculate_cagr vs calculate_dcf_valuation), but some overlap exists: get_financial_fact, get_company_financials, and get_sec_company_facts all retrieve SEC financial data, and analyze_company, ai_analyze_company, and get_dashboard_data produce overlapping analytical outputs. Descriptions help but boundaries could be clearer.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (calculate_*, get_*, run_*, analyze_*, compare_*, index_*, search_*, export_*). There are minor prefixes like 'ai_' and suffixes like '_rag', but they are applied consistently and do not break the overall convention.

    Tool Count4/5

    With 24 tools, the server is on the high end of the typical range, but the count is justified by the comprehensive scope covering financial data retrieval, ratio analysis, valuation models, portfolio analytics, market data, reporting, and RAG-based search. Each tool addresses a distinct need, though the set could be slightly consolidated.

    Completeness4/5

    The tool surface covers the full financial research workflow: fetching SEC data, calculating metrics and valuations, running sensitivity analysis, comparing companies, analyzing portfolios, retrieving market data, and exporting reports. Missing a direct tool for listing filings or comparing against industry benchmarks, but these are minor gaps that can be worked around with existing tools.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI clients to search and analyze SEC filings, financial statements, insider trades, and institutional holdings through natural language tools.
      9
      6 npm
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables to search and retrieve SEC EDGAR filings, insider transactions, major shareholders, and executive compensation data through natural language.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables querying of SEC EDGAR filings and financial data via natural language, offering tools for company lookup, filing retrieval, XBRL data, and full-text search.
      146 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      An MCP server for SEC EDGAR written in Rust: company filings, full-text search, XBRL financials, insider transactions and company info. A single native binary; no API key.
      32
      14
      MIT