SEC EDGAR company search, XBRL financials, filing full-text search, and cross-company comparison via @cyanheads/secedgar-mcp-server — 6 tools
How can I query SEC EDGAR for company financials, search filings, and compare metrics across public companies using XBRL data — with friendly concept names like 'revenue' and 'net_income' instead of raw XBRL tags?
@cyanheads/secedgar-mcp-server v0.8.18 — SEC EDGAR with XBRL Financials
Setup
npm install @cyanheads/secedgar-mcp-server @modelcontextprotocol/sdk
EDGAR_USER_AGENT="YourApp [email protected]" node node_modules/@cyanheads/secedgar-mcp-server/dist/index.js⚠️ `EDGAR_USER_AGENT` env var is REQUIRED — server crashes on startup without it. Format: "AppName [email protected]" (SEC compliance). No API key needed beyond that. Uses @cyanheads/mcp-ts-core framework.
6 Tools Verified
1. secedgar_company_search — Find companies by ticker/name/CIK
{"name": "secedgar_company_search", "arguments": {"query": "AAPL", "include_filings": true, "filing_limit": 3}}Returns: company name, ticker, CIK, SIC code/description, exchange, fiscal year end, state of incorporation, recent filings list. ⚠️ Ambiguous names return MCP error — "Apple" matches 5 companies (AAPL, APLE, AAPI, MLP, PAPL); use ticker for exact match. Nonexistent companies return clean error with recovery hint.
2. secedgar_search_concepts — Browse supported XBRL concept aliases
{"name": "secedgar_search_concepts", "arguments": {"search": "revenue"}}
{"name": "secedgar_search_concepts", "arguments": {"group": "income_statement"}}
{"name": "secedgar_search_concepts", "arguments": {"taxonomy": "us-gaap"}}15 friendly concepts across 4 groups: incomestatement (revenue, netincome, operatingincome, grossprofit), balancesheet (assets, cash, debt, equity, liabilities, notespayable), cashflow (capex, operatingcashflow), pershare (epsbasic, epsdiluted, sharesoutstanding). Each maps to 1+ raw XBRL tags.
3. secedgar_get_financials — Historical XBRL financial data for a company
{"name": "secedgar_get_financials", "arguments": {"company": "AAPL", "concept": "revenue"}}
{"name": "secedgar_get_financials", "arguments": {"company": "MSFT", "concept": "revenue", "period_type": "quarterly"}}
{"name": "secedgar_get_financials", "arguments": {"company": "GOOGL", "concept": "operating_income"}}Returns: XBRL tag description, time series of values with period labels (CY2025, CY2024Q3, etc.), amounts in $M with raw values, period dates, filing accession numbers. period_type: "quarterly" returns quarterly data points. Apple revenue: 19 annual data points; MSFT quarterly: 70 data points; Tesla assets: 61 data points (quarterly instant).
4. secedgar_search_filings — Full-text search across all EDGAR filings since 1993
{"name": "secedgar_search_filings", "arguments": {"query": "artificial intelligence", "forms": ["10-K"], "limit": 3, "sort": "filing_date_desc"}}
{"name": "secedgar_search_filings", "arguments": {"query": "climate risk", "forms": ["10-K"], "start_date": "2025-01-01", "end_date": "2026-01-01", "limit": 3}}
{"name": "secedgar_search_filings", "arguments": {"query": "cybersecurity", "forms": ["8-K"], "limit": 2, "sort": "relevance"}}Filter by: forms (array), start_date/end_date, limit, offset (pagination), sort (filing_date_desc|filing_date_asc|relevance). Returns: form type, filing date, period, company name/CIK/SIC/location, accession number. "artificial intelligence" → 10,000+ 10-K filings; "climate risk" 2025 → 4,183 filings.
5. secedgar_get_filing — Fetch a specific filing's metadata and document content
{"name": "secedgar_get_filing", "arguments": {"accession_number": "0000320193-25-000079", "cik": "0000320193", "content_limit": 2000}}
{"name": "secedgar_get_filing", "arguments": {"accession_number": "0000320193-25-000079", "cik": "0000320193", "include_xbrl": true, "content_limit": 1000}}Returns: filing metadata, document list (primary + exhibits + auxiliary), truncated document text. Apple FY2025 10-K: 207,959 chars, 6 exhibits (EX-21.1 through EX-32.1). include_xbrl: true adds XBRL data to the response.
6. secedgar_compare_metric — Compare a financial metric across all reporting companies
{"name": "secedgar_compare_m{ "server": "@cyanheads/secedgar-mcp-server", "version": "0.8.18", "transport": "stdio", "entry": "dist/index.js", "env_required": "EDGAR_USER_AGENT", "tools": ["secedgar_company_search", "secedgar_search_filings", "secedgar_get_filing", "secedgar_get_financials", "secedgar_compare_metric", "secedgar_search_concepts"], "calls": 25, "success_rate": "84% (21/25 — 2 correct rejections, 2 param-learning)", "companies_tested": ["AAPL", "TSLA", "MSFT", "GOOGL"], "concepts_tested": ["revenue", "net_income", "assets", "operating_income"], "key_gotchas": ["EDGAR_USER_AGENT env var REQUIRED", "ambiguous names cause error (use ticker)", "sort values: filing_date_desc|filing_date_asc|relevance", "content_limit minimum 1000", "compare_metric period needs CY prefix (CY2024 not 2024)", "balance sheet instant periods need I suffix (CY2024Q4I)"] }