EdgarTools
dgunning/edgartools · 2.3k stars · Python · MIT
MCP server Read and analyze SEC EDGAR filings in Python. 10-K, 8-K, XBRL financials, Form 3/4/5, 13F, ADV — clean API, well-typed, MIT-licensed.
Install
pip install edgartoolsThese repos do not share one command. When an entry shows a command, it was copied as published. Check the repo's README before you run it.
Files
EdgarTools — Python Library for SEC EDGAR Filings
EdgarTools is a Python library for accessing SEC EDGAR filings as structured data. Parse financial statements, insider trades, fund holdings, proxy statements, and 20+ other filing types with a consistent Python API — in a few lines of code. Free and open source.
Why EdgarTools?
SEC EDGAR has every filing back to 1994, free — and almost none of it is ready to use. EdgarTools turns any filing into a typed Python object, so a 10-K's revenue is one line instead of an afternoon of XBRL parsing.
# Apple's latest income statement — rendered, standardized, done
from edgar import Company
Company("AAPL").get_financials().income_statement()
Income, balance sheet, cash flow in one call XBRL-standardized for cross-company comparison Every Filing Type 13F holdings, Form 4 insiders, 8-K events, funds, proxies Typed objects + pandas DataFrames for 20+ forms Built for Pipelines & AI Rate-limit aware, smart caching, enterprise mirrors Built-in MCP server + LLM-ready text for RAG
How It Works
Everything starts with a Company or a Filing. Call .obj() and you get a typed object built for that form — its data ready as pandas DataFrames and clean text.
The same typed output that reads cleanly in a notebook drops straight into a pipeline: DataFrames for your warehouse, LLM-ready text and an MCP server for your AI stack, rate-limit and enterprise-mirror aware for scale.
Quick Start
1. Install
pip install edgartools
2. Identify yourself to the SEC — EDGAR requires an email with every request. No key, no signup, no rate-limit tier; set it once:
from edgar import *
set_identity("your.name@example.com")
3. Get data — every filing is now a few lines away:
# Standardized financial statements, straight from XBRL
Company("AAPL").get_financials().income_statement()
# The latest insider Form 4 as a structured object
Company("AAPL").get_filings(form="4").latest().obj()
Next: explore the Use Cases below, or dive into the documentation and Quick Guide.
Use Cases
Financial statements from 10-K and 10-Q filings
financials = Company("MSFT").get_financials()
financials.balance_sheet() # all line items
financials.income_statement() # revenue, net income, EPS
Insider trading from SEC Form 4
form4 = Company("TSLA").get_filings(form="4").latest().obj()
form4.to_dataframe() # insider buy/sell transactions
13F institutional holdings & hedge fund portfolios
thirteenf = get_filings(form="13F-HR").latest().obj()
thirteenf.holdings # every portfolio position as a DataFrame
Institutional Holdings guide →
8-K current reports & corporate events
eightk = get_filings(form="8-K").latest().obj()
eightk.items # reported event items
XBRL financial data across companies
facts = Company("AAPL").get_facts()
facts.query().by_concept("Revenue").to_dataframe() # revenue history as a DataFrame
Key Features
Financial data
- Income, balance sheet, cash flow — XBRL-standardized for cross-company comparison
- Individual line items, dimensional data, multi-period comparatives
- Company Facts API: time-series for any concept across years
Funds & ownership
- 13F holdings, N-PORT, N-MFP, N-CSR/N-CEN fund reports
- Form 3/4/5 insider transactions; Schedule 13D/G ownership
- Position tracking over time
Filings & text
- Typed objects for 20+ forms; complete history since 1994
- Section extraction (Risk Factors, MD&A), EX-21 subsidiaries, auditor info
- HTML → clean text + markdown for RAG; full-text search
- Ticker/CIK lookup, industry & exchange filtering
Built for production
- Configurable rate limiting + enterprise/academic mirrors
- Smart caching, type hints throughout, 1000+ tests
- Enterprise configuration →
EdgarTools supports all SEC form types including 10-K annual reports, 10-Q quarterly filings, 8-K current reports, 13F institutional holdings, Form 4 insider transactions, proxy statements (DEF 14A), S-1 registration statements, N-CSR fund reports, N-MFP money market data, N-PORT fund portfolios, Schedule 13D/G ownership, Form D offerings, Form C crowdfunding, and Form 144 restricted stock. Parse XBRL financial data, extract text sections, and convert filings to pandas DataFrames.
Comparison with Alternatives
EdgarTools is a Python library that talks directly to SEC EDGAR. sec-api is the best-known hosted API that returns JSON. Both parse filings — the difference is how you work with the data, and what it costs you.
Bottom line: in Python, EdgarTools gives you typed objects, AI-native output, and the full SEC corpus — free, open, and inspectable, with no keys or bills. pip install edgartools and you're querying filings in two lines.
Library or hosted?
EdgarTools is the open-source library — SEC-filing primitives you compose in your own code, free and self-run.
edgar.tools is the hosted platform built on that same open engine: the full SEC corpus as a managed service, so your team gets the data without running the pipeline — and without the black box of a closed API.
Reach for the library when you want control in your own stack; reach for edgar.tools when you'd rather not operate it yourself.
AI Integration
Use EdgarTools with Claude Code & Claude Desktop
EdgarTools includes an MCP server and AI skills for Claude Desktop and Claude Code. Ask questions in natural language and get answers backed by real SEC data.
- "Compare Apple and Microsoft's revenue growth rates over the past 3 years"
- "Which Tesla executives sold more than $1 million in stock in the past 6 months?"
Option 1: AI Skills (Recommended)
Install the EdgarTools skill for Claude Code or Claude Desktop:
pip install "edgartools[ai]"
python -c "from edgar.ai import install_skill; install_skill()"
This adds SEC analysis capabilities to Claude, including 3,450+ lines of API documentation, code examples, and form type reference.
Option 2: MCP Server
Run EdgarTools as an MCP server for any AI client -- Claude Desktop, Cline, or your own containerized deployment.
Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"edgartools": {
"command": "uvx",
"args": ["--from", "edgartools[ai]", "edgartools-mcp"],
"env": {
"EDGAR_IDENTITY": "Your Name your.email@example.com"
}
}
}
}Facts
- Kind
- MCP server
- Repo
- dgunning/edgartools
- Group
- Uncategorized
- Stars
- 2.3k
- License
- MIT
- Language
- Python
- Last push
- 2026-10-08
- Forks
- 502
- Homepage
- edgartools.readthedocs.io
- Topics
- 10-k, 10-q, 13-f, 8-k, balance-sheet, bdc, cashflow-statement, company, cusip, edgar, filings, financials, form-4, income-statement, insider-trading, sec
- 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
- 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
- 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
- 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
- 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k