secEdgarMCP

An MCP server that allows a client to fetch data from the SEC EDGAR API and pull documents into terminal rendering

SEC EDGAR MCP Server

An MCP server for querying SEC EDGAR financial data — company info, financial statements, XBRL metrics, filings, insider trading, and more. Built with Go.

Prerequisites

  • Docker (recommended, no local toolchain needed) or Go 1.21+
  • For view_filing: native (non-Docker) server + w3m + ghostty or konsole terminal

Getting Started

Option A: Docker

git clone https://github.com/ChinmayKhachane/SecEdgarMCP.git
cd SecEdgarMCP
./run.sh build

Add to your .mcp.json:

{
  "mcpServers": {
    "sec-edgar": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "--platform", "linux/amd64",
               "-e", "SEC_EDGAR_USER_AGENT=Your Name ([email protected])",
               "sec-edgar-mcp"]
    }
  }
}

If you see a permissions error, run sudo usermod -aG docker $USER and re-login.

Option B: Native Binary (required for view_filing)

git clone https://github.com/ChinmayKhachane/SecEdgarMCP.git
cd SecEdgarMCP
./run.sh build-local          # compiles ./sec-edgar-mcp

Add to your .mcp.json:

{
  "mcpServers": {
    "sec-edgar-local": {
      "command": "/absolute/path/to/SecEdgarMCP/sec-edgar-mcp",
      "env": {
        "SEC_EDGAR_USER_AGENT": "Your Name ([email protected])"
      }
    }
  }
}

The repo ships a .mcp.json you can edit in place — it already has both entries.

run.sh commands

CommandDescription
./run.sh buildBuild the Docker image
./run.sh runRun the server via Docker (stdio)
./run.sh build-localCompile the native Go binary
./run.sh localBuild (if needed) and run natively

Environment Variables

VariableRequiredDescription
SEC_EDGAR_USER_AGENTYesYour identity for SEC EDGAR — "Name (email)"
SEC_EDGAR_LOG_FILENoLog file path (default: sec-edgar-mcp.log)
SEC_EDGAR_TERMINALNoTerminal emulator for view_filing (default: auto-detect ghostty/konsole)

Available Tools

Company

ToolDescription
get_company_infoName, ticker, SIC, exchange, state, fiscal year end
get_cik_by_tickerResolve a ticker to its SEC CIK
search_companiesSearch companies by name or ticker
get_company_factsAll XBRL facts reported by a company

Filings

ToolDescription
get_recent_filingsRecent filings, optionally filtered by form type and date window
get_latest_filingSingle most recent filing of a given type (10-K, 10-Q, 8-K, …)
get_filing_contentRaw text of a filing with pagination
get_filing_sectionsExtract named sections from 10-K/10-Q (MD&A, Risk Factors, etc.)
analyze_8kParse an 8-K for material event items
view_filingOpen a filing in a new terminal window via w3m (native server only)

view_filing accepts either a direct url (primary-document URL from get_recent_filings) or a form_type to auto-resolve the latest filing. It strips inline XBRL and CSS before rendering.

Financials

ToolDescription
get_financialsIncome statement, balance sheet, or cash flow data
get_key_metricsRevenue, net income, EPS, and other key metrics
compare_periodsYear-over-year or quarter-over-quarter comparison
get_quarterly_distributionMetric values broken down by quarter
discover_company_metricsList all reported financial metrics for a company
get_xbrl_conceptsFetch data for a specific XBRL concept
discover_xbrl_conceptsSearch for XBRL concept names

Insider Trading

ToolDescription
get_insider_transactionsRecent Form 4 transactions
get_insider_summaryAggregated buy/sell activity by insider
get_form4_detailsFull details of a specific Form 4 filing
analyze_form4_transactionsParse and classify transactions in a Form 4
analyze_insider_sentimentOverall insider buying/selling sentiment

License

MIT

Máy chủ liên quan

NotebookLM Web Importer

Nhập trang web và video YouTube vào NotebookLM chỉ với một cú nhấp. Được tin dùng bởi hơn 200.000 người dùng.

Cài đặt tiện ích Chrome