Skip to main content
Glama

FilingLens — Python client & MCP server

Ask any 10-K. Get the number, the sentence, and the citation.

FilingLens answers questions about US public companies from their SEC filings. Financial figures come straight from the company's XBRL submission (exact, with the tag and accession number); narrative answers cite the filing section with a link to sec.gov. Retrieval is scoped per company — no cross-company mixing.

Install

pip install filinglens        # or: uv add filinglens

Related MCP server: edgar-mcp

MCP server (Claude Desktop · Claude Code · Cursor · any MCP client)

{
  "mcpServers": {
    "filinglens": {
      "command": "uvx",
      "args": ["--from", "filinglens", "filinglens-mcp"],
      "env": { "FL_API_KEY": "fl_your_key" }
    }
  }
}

Claude Code: claude mcp add filinglens -e FL_API_KEY=fl_your_key -- uvx --from filinglens filinglens-mcp

Tools: search_company · get_financials · list_metrics · index_company · ingest_status · ask_filing · compare_companies

Without FL_API_KEY the shared demo key is used (20 questions/month). Get a free key at https://filinglens.ai.

Python

from filinglens import FilingLens

fl = FilingLens(api_key="fl_...")

fl.facts("NVDA", metrics=["revenue", "free_cash_flow", "gross_margin"], years=5)
# {'ticker': 'NVDA', 'facts': [{'metric': 'revenue', 'fiscal_year': 2026, 'display': '$215.94B',
#   'tag': 'us-gaap:Revenues', 'accn': '0001045810-26-000021', ...}, ...]}

r = fl.ask("How did data center revenue change and what drove it?", tickers=["NVDA"])
print(r["answer"])
for c in r["citations"]:
    print(c["ticker"], c["form"], c["fiscal_year"], c["section"], c["url"])

fl.compare(
    ["AAPL", "MSFT", "NVDA"],
    metrics=["revenue", "net_margin", "free_cash_flow"],
    question="Compare margin trends in the latest fiscal year.",
)

Async: from filinglens import AsyncFilingLens.

Pricing

Free (20 questions/mo) · Pro from $15–49/mo by region · API $0.08–0.25 per question · Enterprise with private deployment. Details: https://filinglens.ai/#pricing

Disclaimer

FilingLens summarises and cites public SEC filings. It is not investment, legal, tax or accounting advice. Figures are reproduced from company XBRL filings and may be restated; verify with the original filing before relying on them.

MIT licensed. The hosted service is proprietary.

Available Tools

7 tools
ask_filingA

Answer a question from one or more companies' SEC filings with citations (section, form, fiscal year, sec.gov URL). Figures come from XBRL. Requires the ticker to be indexed.

Inputs: tickers (required), question (required), fiscal_years.

compare_companiesB

Side-by-side XBRL comparison of 2–10 companies, optionally with a cited narrative answer.

Inputs: tickers (required), metrics, question.

get_financialsB

Exact fiscal-year financials from the company's XBRL filings (revenue, net_income, operating_income, gross_profit, total_assets, total_liabilities, stockholders_equity, cash, operating_cash_flow, capex, free_cash_flow, rnd, sga, eps_diluted, long_term_debt, buybacks, dividends_paid, gross_margin, operating_margin, net_margin, ...). Each value carries its XBRL tag and filing accession number.

Inputs: ticker (required), years, metrics.

index_companyA

Index the latest filings (default: most recent 10-K) for a ticker so ask_filing can use it. Returns a job id; indexing takes ~20–60 seconds. Poll with ingest_status.

Inputs: ticker (required), forms, limit.

ingest_statusC

Check an index_company job.

Inputs: job_id (required).

list_metricsA

List every metric key get_financials understands.

Inputs: no named parameters.

search_companyA

Find a US-listed company's ticker and CIK by name or ticker fragment.

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool targets a distinct step of the filing-analysis workflow (discover company, index, poll, query, exact numbers, compare). The only real overlap is ask_filing vs get_financials, since a numeric question could plausibly route to either, and get_financials vs compare_companies differ mainly by company count.

    Naming Consistency4/5

    Names are uniformly snake_case and mostly follow a verb_noun pattern (list_metrics, index_company, ask_filing, search_company, get_financials, compare_companies). ingest_status is the one mild deviation, being a noun-style status check rather than an explicit verb_object.

    Tool Count5/5

    Seven tools is well-scoped for an SEC-filing analysis server, with each tool owning a clear stage of the workflow (search, index, poll, QA, financials, comparison). No tool feels redundant or superfluous.

    Completeness4/5

    The surface covers the full pipeline: company lookup, indexing, job polling, cited QA, exact financials, metric discovery, and multi-company comparison. Minor gaps remain, such as no way to list already-indexed companies, inspect stored filings, or delete/re-index stale data.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Provides access to SEC filings and detailed XBRL financial data for all publicly traded U.S. companies. It enables users to search for company info, retrieve historical metrics like revenue and assets, and compare financial performance across different industries.
      6
      1
      -
    • A
      license
      A
      quality
      B
      maintenance
      Provides access to SEC EDGAR financial data, enabling AI agents to fetch company filings, financial metrics, and narrative sections. It supports natural-language metric searching and extracts structured data from 10-K, 10-Q, and 8-K reports.
      6
      125 PyPI
      MIT
    • 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
      Enables AI agents to query US public company financial data from SEC filings, with tools for resolving tickers, listing filings, retrieving financial concepts, comparing companies, extracting filing sections, and full-text search. It surfaces data ambiguities like tag variations, restatements, and fiscal-year misalignment rather than hiding them.
      6
      MIT