Skip to main content
Glama
sareegpt

EdgarTools MCP

by sareegpt

EdgarTools is a Python library for downloading and analyzing SEC EDGAR filings. Extract 10-K, 10-Q, 8-K reports, parse XBRL financial statements, and access insider trading data (Form 4) with a simple Python API. Free and open-source.

EdgarTools SEC filing data extraction demo

Why EdgarTools?

EdgarTools is the fastest, most powerful open-source library for SEC EDGAR data extraction. Built for financial analysts, data scientists, and AI developers who need reliable, production-ready access to SEC filings.

How It Works

# Install the SEC EDGAR Python library
pip install edgartools

# Set your identity (required by SEC regulations)
from edgar import *
set_identity("your.name@example.com")

# Get SEC 10-K, 10-Q filings and XBRL financial statements
balance_sheet = Company("AAPL").get_financials().balance_sheet()

# Access any company's SEC filings
company = Company("MSFT")

# Parse Form 4 insider trading transactions
filings = company.get_filings(form="4")
form4_filing = filings[0]
form4 = form4_filing.obj()

Apple SEC Form 4 insider transaction data extraction with Python

Use Cases

Analyze 13F Institutional Holdings & Hedge Fund Portfolios

Track what hedge funds and institutional investors own by parsing SEC 13F filings. EdgarTools extracts complete portfolio holdings with position sizes, values, and quarter-over-quarter changes.

from edgar import get_filings
thirteenf = get_filings(form="13F-HR")[0].obj()
thirteenf.holdings  # DataFrame of all portfolio positions

Track Insider Trading with SEC Form 4

Monitor insider buying and selling activity from SEC Form 4 filings. See which executives are purchasing or selling shares, option exercises, and net position changes.

company = Company("TSLA")
form4 = company.get_filings(form="4")[0].obj()
form4.transactions  # Insider buy/sell transactions

Extract Financial Statements from 10-K and 10-Q Filings

Get income statements, balance sheets, and cash flow statements from SEC annual and quarterly reports. Data is parsed from XBRL with standardized labels for cross-company comparison.

financials = Company("MSFT").get_financials()
financials.balance_sheet()   # Balance sheet with all line items
financials.income_statement()  # Revenue, net income, EPS

Parse 8-K Current Reports for Corporate Events

Access material corporate events as they happen -- earnings releases, acquisitions, executive changes, and more. EdgarTools parses 8-K filings into structured items with full text extraction.

eightk = get_filings(form="8-K")[0].obj()
eightk.items  # List of reported event items

Query XBRL Financial Data Across Companies

Access structured XBRL financial facts for any SEC filer. Query specific line items like revenue or total assets over time, and compare across companies using standardized concepts.

facts = Company("AAPL").get_facts()
facts.to_pandas("us-gaap:Revenues")  # Revenue history as DataFrame

Comprehensive SEC Data Access

Financial Statements (XBRL)

  • Balance Sheets, Income Statements, Cash Flows

  • Individual line items via XBRL tags

  • Multi-period comparisons with comparative periods

  • Standardized cross-company data

  • Automatic unit conversion

  • Metadata columns (dimensions, members, units)

  • Complete dimensional data support

Fund Holdings (13F)

  • Complete 13F filing history

  • Portfolio composition analysis

  • Position tracking over time

  • Ownership percentages

  • Value calculations

Company Dataset & Reference Data

  • Industry and state filtering

  • Company subsets with metadata

  • Standardized industry classifications

  • SEC ticker/CIK lookups

  • Exchange information

Insider Transactions

  • Form 3, 4, 5 structured data

  • Transaction history by insider

  • Ownership changes

  • Grant and exercise details

  • Automatic parsing

Filing Intelligence

  • Any form type (10-K, 10-Q, 8-K, S-1, etc.)

  • Complete history since 1994

  • Smart data objects for each form

  • Automatic HTML to clean text

  • Section extraction (Risk Factors, MD&A)

Performance & Reliability

  • 10-30x faster than alternatives

  • Configurable rate limiting (enterprise mirrors supported)

  • Custom SEC data sources (corporate/academic mirrors)

  • Smart caching (30-second fresh filing cache)

  • Robust error handling

  • SSL verification with fail-fast retry

  • Type hints throughout

  • Enterprise configuration →

Developer Experience

  • Intuitive, consistent API

  • Pandas DataFrame integration

  • Rich terminal output

  • Comprehensive documentation

  • 1000+ tests

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), and S-1 registration statements. Parse XBRL financial data, extract text sections, and convert filings to pandas DataFrames.

Comparison with Alternatives

Feature

EdgarTools

sec-api (paid)

OpenEDGAR

Manual Scraping

AI/MCP Integration

Cost

Free

$150+/mo

Free

Free

Speed

10-30x baseline

Fast (API)

Slow

Slow

XBRL Support

Full

Partial

Financial Statements

Parsed

Parsed

Basic

DIY

LLM-Ready Output

Type Hints

Rate Limiting

Auto

N/A (API)

Manual

Manual

Open Source

MIT

Proprietary

Apache

N/A

Use EdgarTools with Claude Code & Claude Desktop

EdgarTools provides AI Skills that enable Claude and other AI assistants to perform sophisticated SEC filing analysis. Once configured, you can ask Claude questions like:

  • "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?"

  • "Find all technology companies that filed proxy statements with executive compensation changes"

Claude will write the Python code, execute it, and explain the results - all powered by EdgarTools.

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 Claude Code or Claude Desktop:

pip install "edgartools[ai]"
python -m edgar.ai

Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "edgartools": {
      "command": "python",
      "args": ["-m", "edgar.ai"],
      "env": {
        "EDGAR_IDENTITY": "Your Name your.email@example.com"
      }
    }
  }
}

See AI Integration Guide for complete documentation.

Support AI Powered Development

I build and maintain EdgarTools solo using AI-assisted development. Your support directly funds the Claude Max subscription that makes this extraordinary velocity possible.

The Virtuous Cycle

Real Impact: Last 60 Days

Recent Examples

Feature

Traditional Estimate

With AI

Speedup

XBRL Period Selection

3-4 weeks

5 days

7x faster

MCP Workflow Tools

2-3 weeks

2 days

10x faster

HTML Parsing Rewrite

2 weeks

3 days

4x faster

Standardized Concepts API

2 weeks

2-3 days

5x faster

What your support enables:

  • Claude Max subscription (AI agents that write, test, and document code)

  • Continued 3-10x development velocity (features in days, not weeks)

  • Rapid response to SEC format changes and bug reports

  • New features based on community needs

  • Free access for everyone, forever (no API keys, no rate limits)

Alternative ways to support:

  • Star the repo on GitHub

  • Report bugs and contribute fixes

  • Improve documentation

  • Answer questions in Discussions

  • Share EdgarTools with colleagues

Corporate users: If your organization depends on EdgarTools for SEC compliance or regulatory reporting, GitHub Sponsors offers strategic sponsorship options designed for mission-critical dependencies.

Documentation & Resources

Get Help & Connect

Contributing

We welcome contributions from the community! Here's how you can help:

  • Code: Fix bugs, add features, improve documentation

  • Examples: Share interesting use cases and examples

  • Feedback: Report issues or suggest improvements

  • Spread the Word: Star the repo, share with colleagues

See our Contributing Guide for details.


Star History

Star History Chart

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sareegpt/edgartools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server