EdgarTools

io.github.dgunning由 GitHub 账号 dgunning 发布v5.62.1更新于 Oct 24, 2026

Open-source SEC EDGAR toolkit — 13 tools, 7 prompts, every filing type. No API key required.

发布方自己的服务:edgar.tools SEC Intelligence

概览

AI 生成的概览

本地 MCP 服务器,把 SEC EDGAR 文件转为结构化数据:全文检索、财务报表、内部人交易、13F 与基金持仓。

可以做什么
  • 检索文件正文,并按表单类型、条目或日期范围筛选,也可用 accession 编号、CIK 或股票代码定位文件
  • 获取跨年度、季度及滚动十二个月的标准利润表、资产负债表和现金流量表
  • 读取 10-K、10-Q 的章节文本,或把整份文件转为 markdown 供检索流程使用
  • 提取 13F 机构持仓、Form 4 内部人交易、N-PORT 基金组合和 8-K 条目,输出为结构化对象与表格
适用场景
适合需要回答上市公司向 SEC 申报了什么、跨公司比较已披露财务数据,或追踪内部人交易与机构持仓的场景,无需自行编写解析代码。
运行要求
通过 uvx 从带 ai 扩展的 edgartools 包本地运行(或 pip 安装后运行 python -m edgar.ai);需要 Python 3.11+ 以及 uv 或 pip。必须设置环境变量 EDGAR_IDENTITY,内容为姓名和联系邮箱,用于向 SEC 表明身份。需要访问 SEC EDGAR 的网络;无需 API 密钥或注册。
安装前请注意
EDGAR_IDENTITY 会随每次请求发送给 SEC,请使用愿意公开的真实联系邮箱。该服务器只读取公开文件,但需遵守 SEC 每秒 10 次请求的公平访问限制。不要同时挂载此本地服务器和托管的 edgar.tools 连接器,两者功能重叠,会分散助手的路由。

安装

在 SourceWeft 中

  1. 打开 控制台中的 EdgarTools,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[EdgarTools logo]

EdgarTools — Python Library for SEC EDGAR Filings


[PyPI - Version] [Python versions] [Build status] [Monthly downloads]

EdgarTools is a Python library for SEC EDGAR filings as structured data: financial statements, insider trades, fund holdings, proxy statements and dozens of other filing types, through one consistent Python API. SEC publishes every filing since 1994 for free, and almost none of it is ready to use; EdgarTools turns a filing into a typed Python object. Free and open source, MIT-licensed.

Docs · Cheat sheet · Agents: Skill · MCP server · Hosted: edgar.tools

[EdgarTools SEC filing data extraction demo]

Quick Start

1. Install. The package is edgartools; the module you import is edgar. Python 3.11+.

bash
uv add edgartools        # or: pip install edgartools

2. Identify yourself to the SEC. EDGAR requires a contact email on every request. There is no key, signup or rate-limit tier.

python
from edgar import Company, set_identity
set_identity("[email protected]")

3. Get data.

python
# Five fiscal years of standardized income statement, from XBRLCompany("NVDA").income_statement(periods=5)#> Total Revenue $215.9B $130.5B $60.9B

Why not just call SEC's APIs?

data.sec.gov gives you JSON facts and filing indexes. Everything past that is your code. EdgarTools does that part:

  • Section text and markdown. Item 1A, Item 7 or any Item of a 10-K or 10-Q as text, and whole filings as markdown for RAG. Raw HTML is where hand-rolled parsers break.
  • Parsed forms, not XML. 13F holdings, Form 4 transactions, N-PORT portfolios and 8-K items as typed objects and DataFrames.
  • Statements that line up. Rows standardized across filers, so "Total Revenue" means the same thing for a bank and a chipmaker, plus discrete quarters (Q4 derived from the 10-K) and trailing twelve months.
  • Search and plumbing. Full-text search over filing content, the live filing feed, rate limiting, caching and offline storage.

It runs in your own process, MIT-licensed, with no API key and no vendor quota; SEC's fair-access limit of 10 requests a second still applies, and EdgarTools keeps to it.

What you can do

Full-text search across SEC filings

Search the text of every filing since 2001, not just form types and dates.

python
from edgar import search_filings
# Every 10-K filed since 2025 that mentions tariffsresults = search_filings("tariff", forms="10-K", start_date="2025-01-01")hit = results[0]hit.accession_number, hit.form, hit.filed, hit.company  # a hit's fields; filed is the filing datehit.get_filing()  # the Filing behind a hit, ready for .obj() or .markdown()
# Structured: 8-Ks that reported a cybersecurity incident (Item 1.05) in 2025search_filings(forms="8-K", items="1.05", start_date="2025-01-01", end_date="2025-12-31")#> 19 total

Full-text search guide →

Financial statements over several years

python
Company("MSFT").income_statement(periods=10)  # also .balance_sheet() and .cash_flow_statement()

Financial Statements guide →

One metric across companies

Pick rows by their standardized label, never by position: the first row of an income statement is not always total revenue.

python
import pandas as pd
revenue = {    ticker: Company(ticker).income_statement(periods=3, as_dataframe=True)            .set_index("label").filter(like="FY").loc["Total Revenue"] / 1e9    for ticker in ["JPM", "PFE", "CAT"]}pd.DataFrame(revenue).round(1)  # $ billions#> FY 2025 182.4 62.6 67.6

Quarterly figures and trailing twelve months

python
nvda = Company("NVDA")nvda.get_ttm_revenue()                                 # the last four quarters, summednvda.income_statement(period="quarterly", periods=8)   # discrete quarters; Q4 is derived from the 10-K

Sections and markdown for RAG

python
filing = Company("NVDA").latest("10-K")filing.markdown()          # the whole filing as markdown
tenk = filing.obj()tenk.risk_factors          # Item 1A as texttenk["Item 1C"]            # any Item by number

Sections guide →

Find filings, by anything

python
from edgar import find, get_current_filings, get_filings
get_filings(2025, 4, form="10-K")   # every 10-K filed in Q4 2025get_current_filings()               # the live feed, as SEC posts itfind("0000320193-25-000079")        # an accession number, CIK or ticker

Finding filings guide →

[find() resolving a ticker, a CIK and an accession number]

[get_current_filings() showing the live SEC filing feed]

13F institutional holdings

python
thirteenf = Company("BRK.A").get_filings(form="13F-HR").latest().obj()thirteenf.holdings  # one row per security: Issuer, Cusip, Ticker, SharesPrnAmount, Value, ...

Institutional Holdings guide →

[Berkshire Hathaway's latest 13F holdings]

Insider trades from Form 4

python
form4 = Company("TSLA").get_filings(form="4").latest().obj()form4.to_dataframe()  # buys, sells, grants and exercises

Insider Trades guide →

[Tesla's latest Form 4 parsed into a structured object]

Fund holdings from N-PORT

python
from edgar import Fund
Fund("VOO").get_portfolio()  # the latest N-PORT holdings as a DataFrame

Fund Portfolios guide →

8-K events and earnings releases

python
eightk = find("0001045810-26-000073").obj()  # NVIDIA, 2026-08-26eightk.items      # ['Item 2.02', 'Item 9.01']eightk.earnings   # the EX-99.1 press release tables, parsed

Current Events guide →

Library or hosted?

EdgarTools is this library: free, MIT-licensed, running in your own Python process. edgar.tools is the hosted platform built on it: the same parsing, kept running and current, with every answer cited to its filing. You are not paying for the parsing; you are paying for it to be run and answerable. No feature is ever removed from the library to sell the platform.

If you want to…Use
Build something that runs: pipelines, backfills, backtests, model corpora, notebooks, custom joins, anything repeated across hundreds of names or run inside your own networkThe library
Ask, not build: what the companies you cover filed and what changed since last time, who sold, who holds it, one person across every company they touch, screens across a universe, alerts, cited answers to forward or share with a team. From a browser, a phone, Excel, Claude or ChatGPT, or an agent that cannot run Pythonedgar.tools. Free account to start
Own a maintained dataset (insider trades, 13F, BDC portfolios, material events), every row traceable to its filing, without running the pipelineedgar.tools data licensing
Fetch one known filing or one JSON document, once, from a scriptNeither: call EDGAR directly

Both have an MCP server: the library's runs locally (see AI Integration below), and edgar.tools' is hosted at app.edgar.tools/mcp. Attach one per client, not both: they overlap and split your assistant's routing.

AI integration

EdgarTools ships an agent skill and a local MCP server, both in the ai extra. For an assistant that cannot run Python, use the hosted connector from the section above instead.

bash
pip install "edgartools[ai]"python -c "from edgar.ai import install_skill; install_skill()"  # the skill, for Claude Code and Claude Desktop

The MCP server works with any MCP client. For Claude Desktop, add it to claude_desktop_config.json:

json
{  "mcpServers": {    "edgartools": {      "command": "uvx",      "args": ["--from", "edgartools[ai]", "edgartools-mcp"],      "env": {        "EDGAR_IDENTITY": "Your Name [email protected]"      }    }  }}

uvx needs uv; without it, pip install "edgartools[ai]" and run python -m edgar.ai. Setup for other clients: MCP server guide · Skill guide.

Support the project

The SEC changes filing formats and ships a new XBRL taxonomy every year. Sponsorship is what keeps the parsers current and pays for new ones as new disclosures appear.

  • GitHub Sponsors: monthly or one-time. Companies can sponsor on their existing GitHub bill.
  • Buy Me a Coffee: a one-time thank-you.
  • Consulting: help from the library's author with SEC data pipelines and financial AI built on it.

[Sponsor on GitHub]    [Buy Me A Coffee]

Docs, help and contributing

EdgarTools is distributed under the MIT License.

来源:README.md,提交 018156a

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

5
  1. v5.62.1最新Oct 23, 2026
  2. v5.62.0Oct 11, 2026
  3. v5.61.1Oct 7, 2026
  4. v5.61.0Oct 6, 2026
  5. v5.21.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Edgar 集成