SEC EDGAR MCP

Pulls US company filings, XBRL financial statements and insider trades from SEC EDGAR

By Stefano Amorelli (individual) Python Local · stdio Finance and paymentsData and analytics

60 popularity score ★ 386 ↓ 2.5k/mo

Connect your client

Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs SEC_EDGAR_USER_AGENT. Replace each <NAME> with your value.

FirstTerminal
pip install sec-edgar-mcp
Claude CodeTerminal
claude mcp add sec-edgar -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> -- python -m sec_edgar_mcp.server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "sec-edgar": {
      "command": "python",
      "args": [
        "-m",
        "sec_edgar_mcp.server"
      ],
      "env": {
        "SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "sec-edgar": {
      "command": "python",
      "args": [
        "-m",
        "sec_edgar_mcp.server"
      ],
      "env": {
        "SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "sec-edgar": {
      "type": "stdio",
      "command": "python",
      "args": [
        "-m",
        "sec_edgar_mcp.server"
      ],
      "env": {
        "SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.sec-edgar]
command = "python"
args = ["-m", "sec_edgar_mcp.server"]

[mcp_servers.sec-edgar.env]
SEC_EDGAR_USER_AGENT = "<SEC_EDGAR_USER_AGENT>"
Gemini CLITerminal
gemini mcp add --scope user -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> sec-edgar python -- -m sec_edgar_mcp.server
Local (container)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs SEC_EDGAR_USER_AGENT. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add sec-edgar -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> -- docker run -i --rm -e SEC_EDGAR_USER_AGENT stefanoamorelli/sec-edgar-mcp:latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "sec-edgar": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SEC_EDGAR_USER_AGENT",
        "stefanoamorelli/sec-edgar-mcp:latest"
      ],
      "env": {
        "SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "sec-edgar": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SEC_EDGAR_USER_AGENT",
        "stefanoamorelli/sec-edgar-mcp:latest"
      ],
      "env": {
        "SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "sec-edgar": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SEC_EDGAR_USER_AGENT",
        "stefanoamorelli/sec-edgar-mcp:latest"
      ],
      "env": {
        "SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.sec-edgar]
command = "docker"
args = ["run", "-i", "--rm", "-e", "SEC_EDGAR_USER_AGENT", "stefanoamorelli/sec-edgar-mcp:latest"]

[mcp_servers.sec-edgar.env]
SEC_EDGAR_USER_AGENT = "<SEC_EDGAR_USER_AGENT>"
Gemini CLITerminal
gemini mcp add --scope user -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> sec-edgar docker -- run -i --rm -e SEC_EDGAR_USER_AGENT stefanoamorelli/sec-edgar-mcp:latest

Settings 1

SEC_EDGAR_USER_AGENT Required: Your name and email, e.g. "Jane Doe (jane@example.com)", sent to the SEC with each request.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

SEC EDGAR MCP gives an assistant read access to the US Securities and Exchange Commission's public EDGAR filing system. It resolves tickers to CIK numbers, searches companies by name, lists recent filings for one company or for all filers, and returns the text of a filing in pages (50,000 characters per call by default, moved through with offset and max_chars).

Financial tools parse XBRL data straight from the filings: balance sheet, income statement and cash flow, segment figures, chosen key metrics and comparisons of one metric across years. A second group covers insider trading on Forms 3, 4 and 5, with per-filing Form 4 detail and summaries over a time window. Answers carry the SEC URL of the source filing, and the financial tools tell the assistant to keep the numbers unrounded and cite that URL.

The server is built on its author's sec-edgar-toolkit library and runs locally over stdio, or over streamable HTTP with --transport streamable-http. Version 1.1.0 registers 21 tools in server.py, more than the four broad groups the README names, including a get_recommended_tools helper that suggests which tools to use for a given form type. It is an independent project, not made or endorsed by the SEC.

What it needs

RuntimeDockerorPython 3.11+

Python 3.11 or later with pip, or Docker for the published image. Internet access to the SEC's EDGAR services. The SEC_EDGAR_USER_AGENT environment variable must hold your name and email address (for example "Jane Doe (jane@example.com)"); the SEC asks automated clients to identify themselves this way. No account or API key is needed.

Limits

Read-only: it fetches public EDGAR data and cannot file anything. The server raises an error if SEC_EDGAR_USER_AGENT is unset (config.py). The SEC caps automated access at about 10 requests per second and its docs warn that EDGAR may temporarily rate-limit requests. In v1.1.0 get_recent_filings looks back 30 days and returns 40 filings by default, although its own description says 50; insider transaction tools default to 90 days and 50 results. The docs' uvx example installs from the GitHub main branch rather than the released PyPI version. Licensed AGPL-3.0, with a separate commercial licence offered by the author.

Who it suits

Suits analysts, researchers and developers who want an assistant to read US public-company filings, statement figures and insider trades with links back to the source filing, at no cost and without an API key. It only covers SEC EDGAR, so it is not a source for live market prices, non-US filers' home-country filings or private companies. Because it reads data and changes nothing, it fits local use; teams that want a hosted endpoint instead may look at other EDGAR servers in the directory, such as sec-edgar-3, which offers one.

Tools 21

get_cik_by_ticker
Turns a stock ticker into the company's SEC CIK number
get_company_info
Returns a company's name, CIK, SIC code, exchange and fiscal year end
search_companies
Finds companies by name, 10 results by default
get_company_facts
Lists the XBRL facts a company has reported, with latest values
get_recent_filings
Lists recent filings for one company or all filers, filterable by form type
get_filing_content
Returns a filing's text in pages, 50,000 characters per page by default
analyze_8k
Breaks down which material-event items an 8-K reports
get_filing_sections
Extracts named sections from a 10-K, 10-Q or other filing
get_financials
Returns balance sheet, income statement and cash flow from XBRL data
get_segment_data
Returns segment figures, geographic by default
get_key_metrics
Fetches chosen financial metrics for a company
compare_periods
Compares one metric between a start year and an end year
discover_company_metrics
Lists which metrics a company reports, optionally filtered by a term
get_xbrl_concepts
Reads specific XBRL concept values for a company
discover_xbrl_concepts
Explores the XBRL concepts available in a company's filings
get_insider_transactions
Lists Form 3, 4 and 5 insider transactions, 90 days and 50 results by default
get_insider_summary
Summarises a company's insider activity over 180 days by default
get_form4_details
Returns the details of one Form 4 filing
analyze_form4_transactions
Analyses Form 4 transactions over a recent window
analyze_insider_sentiment
Gauges net insider buying or selling over six months by default
get_recommended_tools
Suggests which of its tools to use for a given SEC form type

Similar servers