How sareegpt/edgartools-mcp works
EdgarTools is a Python library for retrieving SEC EDGAR filings and turning them into structured company, filing, ownership, fund, and financial data. The principal workflow is to identify a company or request filings, retrieve filing content, parse it into domain objects, then analyze or render the results. The README also documents XBRL statements and cross-company facts, specialized form parsers, document search, and an MCP interface for AI agents. Connections beyond the excerpts rely on README statements or SOURCE INDEX references; unsampled internals are not treated as inspected.
Main entry points: _filings.py Filing retrieval · __init__.py Python API · core.py Company identity · httpclient.py HTTP client
Components 23
SEC access
- Python API
edgar/__init__.py - SEC EDGAR
- HTTP client
edgar/httpclient.py - Filing storage
edgar/filesystem.py
Company and filings
- Company identity
edgar/entity/core.py - Ticker lookup
edgar/reference/tickers.py - Filing retrieval
edgar/_filings.py - Current filings
edgar/current_filings.py - Filing documents
edgar/files/html_documents.py - Result formatting
edgar/display/formatting.py
Financial analysis
- Company facts
edgar/entity/entity_facts.py - Fact queries
edgar/entity/query.py - XBRL statements
edgar/xbrl/statements.py - Financial reports
edgar/financials.py
Specialized filings
- Form data objects
edgar/company_reports/current_report.py - Insider ownership
edgar/ownership/ownershipforms.py - 13F holdings
edgar/thirteenf/models.py - Fund reports
edgar/funds/reports.py
AI and documents
- Document search
edgar/documents/search.py - Text search
edgar/search/textsearch.py - MCP server
edgar/ai/mcp/server.py - MCP tools
edgar/ai/mcp/tools/base.py
Other components
- Analyst or agent
Connections 25
- Analyst or agent → Python API: uses
- Python API → Company identity: finds company
edgar/__init__.py - Company identity → Ticker lookup: resolves ticker
- Analyst or agent → Python API: requests filings
- Python API → Filing retrieval: gets filings
edgar/__init__.py - Python API → Current filings: gets latest
edgar/__init__.py - Filing retrieval → HTTP client: requests content
edgar/_filings.py - HTTP client → SEC EDGAR: fetches SEC data
- Filing retrieval → Filing storage: uses storage
edgar/_filings.py - Filing retrieval → Filing documents: opens documents
edgar/_filings.py - Filing documents → Document search: searches parsed text
- Analyst or agent → Document search: searches documents
edgar/documents/search.py - Analyst or agent → Text search: searches text
edgar/search/textsearch.py - Company identity → Company facts: accesses facts
edgar/entity/__init__.py - Company facts → Fact queries: filters facts
edgar/entity/query.py - Analyst or agent → Financial reports: requests statements
- Financial reports → XBRL statements: parses XBRL
- Analyst or agent → Form data objects: parses 8-K
- Filing retrieval → Insider ownership: parses Form 4
edgar/_filings.py - Analyst or agent → 13F holdings: reads holdings
- Analyst or agent → Fund reports: reads fund reports
- Filing retrieval → Result formatting: renders results
edgar/_filings.py - Analyst or agent → MCP server: connects via MCP
- MCP server → MCP tools: routes tools
edgar/ai/mcp/server.py - MCP tools → Company identity: queries company
edgar/ai/mcp/tools/base.py