xbrlkit

ai.robosystems由 robosystems.ai 发布v0.21.4更新于 Nov 2, 2026

Read SEC EDGAR and XBRL filings with an AI: 18 tools over the filing itself. Local, free, no account

发布方自己的服务:RoboSystems

概览

AI 生成的概览

本地 MCP 服务器,把 SEC EDGAR 与 XBRL 申报文件读入内存,提供 18 个工具来查看报表、附注、正文与附件。

可以做什么
  • 按股票代码、EDGAR 编号、LEI、本地 XBRL 包、iXBRL 文件或 holon/TAVI 文档加载申报文件
  • 以表格形式取出财务报表与披露网络,查找短语对应的概念,按概念与期间或按维度取数
  • 核对小计是否勾稽,完整阅读一条披露,并对主要文档正文做正则检索
  • 阅读附件及无 XBRL 的表单(如 Form 4、13F),并全文检索 EDGAR 找出值得读的申报
  • 把申报导出为 holon、TAVI、xBRL-JSON、ClawDog 或属性图,在浏览器中渲染;安装 lpg 扩展后还可对多个申报运行只读 Cypher
适用场景
适合以对话方式查阅某份 SEC 或 ESEF 申报:取资产负债表、核对小计、找出申报方自有的扩展概念,或在 10-K 正文中检索,而无需写脚本或搭建数据库。
运行要求
以 Python 包形式在本地运行,可用 uvx 或 pip 安装;服务器需 mcp 扩展,图工具需 lpg 扩展。从 EDGAR 或 filings.xbrl.org 获取文件需要网络,本地文件可离线使用。SEC_GOV_USER_AGENT(姓名与邮箱)为可选项,仅用于 EDGAR 请求。
安装前请注意
获取的申报可能来自 RoboSystems CDN 而非 EDGAR,答案反映的是第三方解析结果,read_from 字段会说明来源。SEC_GOV_USER_AGENT 会作为 User-Agent 发送给 sec.gov,且 uvx 或 pip 安装不会读取 .env 文件。view 工具会在本机回环端口提供文档,托管查看器可读取,直到停止为止。导出操作会向输出目录写入文件。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

xbrlkit

[License: MIT]

Work with XBRL filings above Arelle: fetch a filing, parse it once into a neutral typed model, and project that model into whichever portable representation you need — or hand it one of those representations and get the model back.

  EDGAR ───────────┐  filings.xbrl.org ├──▶ Arelle ──▶ XbrlModel ──┬──▶ holon.jsonld    (RDF / JSON-LD)  XBRL zip / iXBRL ┘                 ▲         ├──▶ TAVI            (compiled model)                                     │         ├──▶ xBRL-JSON       (OIM)                                     │         ├──▶ ClawDog         (authored-report JSON-LD)          holon, TAVI, ClawDog ──────┘         └──▶ property graph  (parquet, .lbdb, icebug-disk)
                   primary HTML ──▶ xbrlkit.text ──▶ sections (text blocks, Items, tables)
                   holon, TAVI ──▶ xbrlkit view ──▶ the report, rendered in a browser
                   any of the above ──▶ xbrlkit serve ──▶ MCP client (18 shaped tools, + Cypher with [lpg])

Three ways in — the SEC, everyone else through filings.xbrl.org, and the filing itself: an XBRL package or archive (.zip), an iXBRL document (.htm), a bare instance (.xml), a filing directory, or an http(s) URL to any of them. Nothing about the middle of this requires EDGAR, or a regulator at all — a report that was never filed with anybody parses like one that was.

Five projections out, and three of those read back, so a report that was never an SEC filing gets the same treatment. Another surface, the filing's text, reads the primary HTML directly and needs neither Arelle nor the network. And xbrlkit view puts a filing on screen.

It is also a local MCP server. The package stands alone — a library and a CLI — but xbrlkit serve holds filings in memory and exposes them to Claude, ChatGPT or any MCP client through eighteen shaped tools, which makes reading a filing a conversation instead of a script: ask for a statement, the concepts behind a phrase, what foots to a subtotal, a segment breakdown, an exhibit, or a regex across the prose. Nothing is indexed and no database sits behind it — every answer is read from the filing in memory, on your machine. With the lpg extra it also writes several filings as one property graph — a company's years, or its peers — and answers read-only Cypher over it. What you can ask it →

Arelle stays the parser — nobody should reimplement DTS resolution. What it does not give you is anything ergonomic to hold: ModelXbrl is a large mutable object graph tied to a controller you have to close. XbrlModel is the answer to that — stateless, single-filing, lossless, and the waist every projection hangs off.

The one architectural rule: everything goes through XbrlModel. A feature that reaches into Arelle's ModelXbrl directly is bypassing the waist, and that is the change that turns a kit into a junk drawer.

What's in the box

parseArelle in, XbrlModel outthe load, the DTS cache policy, taxonomy packages
serializethe five projectionsholon, TAVI (+ its gap report), xBRL-JSON, ClawDog (+ its gap report), the property graph
deserializethe importersa holon, a TAVI or a ClawDog report read back into the model, no Arelle
edgarthe SECdiscovery, download, full-text search, 1994 onward
filings_orgeveryone elseESEF and the national regimes, by LEI
textthe filing as proseinline text blocks, 10-K/10-Q Items, the XML forms
servethe local MCP servereighteen shaped tools over a filing in memory; Cypher over exported graphs with [lpg]

model.py is the waist itself, schema/ declares the property graph's tables, query.py runs SPARQL over a built holon, cypher.py runs read-only Cypher over a built .lbdb or icebug-disk tree, and view.py is the loopback server behind xbrlkit view and the view_filing tool.

Install

bash
pip install xbrlkit

Exposes the xbrlkit CLI (build, fetch, query, view, cache, serve) and the library. Three optional extras: xbrlkit[lpg] for the property graph as a LadybugDB database and for querying it (pyarrow, LadybugDB), xbrlkit[icebug] for the same graph as an experimental icebug-disk tree (pyarrow only) and xbrlkit[mcp] for the MCP server. Install xbrlkit[mcp,lpg] for the server's graph tools.

From a source checkout:

bash
brew install uv justjust install     # dependencies, and .env from the template

SEC User-Agent

SEC fair access asks for a User-Agent identifying you with contact info. EDGAR works out of the box under a default that names the project, and the first unattributed fetch says so once — SEC rate limits per IP, so the shared default costs nobody else their budget. Identifying yourself is a courtesy, and one worth extending. just install already created your .env:

bash
# .envSEC_GOV_USER_AGENT="Your Name [email protected]"

.env is loaded automatically by every command run from a checkout of this repo — the lookup is relative to the installed code, not your working directory, so a uvx or pip install never picks one up. There, use export SEC_GOV_USER_AGENT=…, --user-agent (before the command), or an MCP env block (see Serve to an MCP client). Nothing outside EDGAR needs it — a local file, a JSON report and filings.xbrl.org all load without.

Usage

bash
# Build a holon.jsonld from a specific filing (-> ./output/)xbrlkit build --cik 320193 --accno 0000320193-23-000106
# The other projections: TAVI (plus its .tavi.gaps.json sidecar), xBRL-JSON,# ClawDog, the property graph (lpg: a .lbdb to query, needs the lpg extra; icebug:# an experimental directory any LadybugDB reads in place), or `all` for every one# of them but the graphxbrlkit build --cik 320193 --accno 0000320193-23-000106 --format tavixbrlkit build --cik 320193 --accno 0000320193-23-000106 --format lpgxbrlkit build --cik 320193 --accno 0000320193-23-000106 --format all
# Fetch the latest 10-K for a ticker (-> ./output/); --form and --n filterxbrlkit fetch --ticker NVDA
# Query consolidated facts in a built holon (in-memory SPARQL)xbrlkit query --in output/0000320193-23-000106.holon.jsonld --element us-gaap:Assets
# Open a filing as a rendered report in the browser — no account, no downloadxbrlkit view NVDA
# The filing itself needs no EDGAR and no network — an XBRL .zip, an iXBRL# .htm, a bare instance .xml, a filing directory. `serve` and `view` take any# source; `build` and `fetch` are the EDGAR pathxbrlkit view ./report.zipxbrlkit serve ./mmm-20241231.htm

From a source checkout, just wraps the same CLI: just build 320193 0000320193-23-000106 and just fetch NVDA.

As a library, a FilingSession resolves a filing the way view and serve do, with no extra installed:

python
from xbrlkit.deserialize import from_holon_jsonfrom xbrlkit.serialize import to_holon, to_tavi_reportfrom xbrlkit.serve import FilingSession
session = FilingSession()model = session.load("NVDA").model  # or "NVDA 10-Q", "cik:accession", "lei:…", a pathholon = to_holon(model)             # holon.jsonld texttavi, gaps = to_tavi_report(model)  # the TAVI model, and what it could not carrymodel = from_holon_json(holon)      # and back againsession.close()

A host running its own Arelle goes a level down: xbrlkit.parse.load_model returns the ModelXbrl, and to_xbrl_model(mx, filing) walks it into the same model, given the filing's FilingMeta (CIK and accession).

Serve to an MCP client

Two ways to run it. They differ in which process does the fetching, and so in where your SEC identity goes.

stdio — the client launches the server. The identity belongs in the server's own env block:

json
{  "mcpServers": {    "xbrlkit": {      "command": "uvx",      "args": [        "--from", "xbrlkit[mcp]@latest",        "xbrlkit", "serve", "--transport", "stdio"      ],      "env": { "SEC_GOV_USER_AGENT": "Your Name [email protected]" }    }  }}

HTTP — you start the server, the client only points at a URL. An env block in the client config would reach nothing here; set it on the command:

bash
pip install "xbrlkit[mcp]"SEC_GOV_USER_AGENT="Your Name [email protected]" xbrlkit serve# → MCP at http://127.0.0.1:8765/mcp
# or without installing anythingSEC_GOV_USER_AGENT="Your Name [email protected]" \  uvx --from "xbrlkit[mcp]@latest" xbrlkit serve
# with the graph tools: stacked lpg / icebug exports and run_cypherSEC_GOV_USER_AGENT="Your Name [email protected]" \  uvx --from "xbrlkit[mcp,lpg]@latest" xbrlkit serve
json
{  "mcpServers": {    "xbrlkit": { "type": "http", "url": "http://127.0.0.1:8765/mcp" }  }}

or, equivalently:

bash
claude mcp add --transport http xbrlkit http://127.0.0.1:8765/mcp

A .env file is not a channel for either of these. The lookup is relative to the installed code rather than your working directory, so it resolves only inside a checkout of this repo — a uvx or pip install never sees one. Use the environment, the env block, or --user-agent before the command.

Both are optional: EDGAR works unattributed under the default, saying so once. And filings.xbrl.org, local packages and TAVI/holon JSON need no identity at all.

What you can ask it

Load a filing from the chat — a ticker, an EDGAR cik:accession, a lei: for ESEF and the national regimes, a local package, or a holon or TAVI by path or URL. A ticker or cik:accession loads the filing's published holon (or its TAVI model) first when the RoboSystems CDN has one, falling back to EDGAR. That copy is RoboSystems' parse of the filing, not the filing as filed, and the answer's read_from says which one you have; --pure or XBRLKIT_ARTIFACTS_URL="" parses it from EDGAR instead. Exports go to ~/xbrlkit/output unless --out-dir says otherwise. Then:

  • Pull a statement as a table. The income statement, balance sheet, cash flow or equity statement — or any disclosure network — as rows in the filer's own order and labels, values per period column.
  • Find the concept behind a phrase. "Revenue", "operating lease liability" → the qnames this filer actually reports, its own extension concepts included, ranked with fact counts and where each appears. You never have to guess a US-GAAP name.
  • Get values by concept and period. Consolidated totals by default — no dimensional qualifier, the most precise of duplicate tags — or broken out by any axis the filing carries: segment, product, debt instrument, acquisition.
  • Check whether a subtotal foots. The calculation children with their weights, the reported total against the sum computed from them, per period, with the difference.
  • Read one disclosure whole. A note's rows with values, the same rows by its own axes, its calculation arcs footed, and its tagged text beside the numbers. The disclosures index finds the right block first, cheaply.
  • Search the prose. Regex over the whole primary document — Items, the notes, the cover, the signatures, tagged or not. A pattern that matches more than fits in the answer says which sections the rest fall in, busiest first.
  • Read the other documents. Exhibits, an 8-K's EX-99.1 earnings release — where the non-GAAP measures and guidance live, since no XBRL holds them — or a 13F's holdings table.
  • Read the forms with no XBRL at all. A Form 4's transactions and holdings, a 13F's positions, as rows with the document's header fields beside them.
  • Find filings worth reading. EDGAR full-text search across the corpus by phrase, form, date and filer, where every hit carries the id that loads it.
  • Export or render it. Write the filing as holon, TAVI, xBRL-JSON, ClawDog, a LadybugDB graph or icebug-disk tree, or the parse itself; or open it as a rendered report in the browser and hand back the link.
  • Stack filings and query across them (with the lpg extra). Export several loaded filings as one graph — a company's years, or peers — and run read-only Cypher over it with run_cypher: revenue by report and period, or a figure that one year's comparative restates.

No graph and no database sits behind any of it: every answer about a filing is read from that filing, and the only graph run_cypher reads is one you asked export_filing to write. Beyond fetching a filing and its documents, the one outward call is search_filings, which asks EDGAR's own full-text index which filings to go and read. Full detail, including the tool table and the --pure profile, in serve/.

Where it runs

RoboSystems. The RoboSystems platform's SEC pipeline is built on this package: filings are parsed with xbrlkit.parse (load_model on the platform's own cache directory, then to_xbrl_model), projected with to_holon, to_tavi_report and the property-graph tables, the shared sec graph is declared from xbrlkit.schema, and the full-text index behind its document search is built from xbrlkit.text.

Filing Ladder. The Filing Ladder benchmark — one filing handed to the same language model in every representation — built its 26-filing corpus of 2024–2025 10-Ks and 10-Qs with this package. Each projection is a rung of the ladder, so its published results are also a measurement of what a model can do with each of these outputs. That corpus is this package's test bench too: the text sections were checked against the filing's own text-block facts on all 26 filings, the property graph row for row against the platform's processor, and the JSON importers by round trip.

View & explore

Built holons and TAVI models render in the xbrlkit viewer — the browser side of the toolkit, a reader that renders the financial statements and lets you ask questions of the report with AI:

The viewer reads a holon entirely client-side, so a single holon.jsonld is a complete, portable, self-describing report. Its chat asks the report raw questions (jq over a TAVI model, SPARQL over a holon); xbrlkit serve is the other side of that pair — the same filing behind shaped tools, on your own machine.

xbrlkit view joins the two. It resolves a filing the way serve does, serializes it, and hands that one document to the viewer:

bash
xbrlkit view NVDA                       # the latest 10-K, rendered in a browser tabxbrlkit view "NVDA 10-Q" --as tavi      # a different form, a different serializationxbrlkit view 320193:0000320193-23-000106xbrlkit view lei:549300E9PC51EN656011   # a filer outside EDGARxbrlkit view output/x.holon.jsonld      # a document you already have, verbatimxbrlkit view NVDA --no-open             # print the link instead of opening it

Without installing anything:

bash
uvx xbrlkit view NVDA

A browser cannot be handed a local path — file:// is unreachable from an https page, and a file input cannot be pre-populated — so this serves the document instead, on an ephemeral loopback port with an unguessable path, and opens xbrlkit.com/view?url=… pointing at it (earlier releases open xbrlkit.com/?url=…, which keeps working). http://127.0.0.1 is a potentially trustworthy origin, so the https page may read it; the CORS header names the viewer's origin and no other. The document is readable there, by that origin, until you press Ctrl-C. --viewer points at a different build.

From an MCP client the same thing is the view_filing tool: "load NVDA", then "show me it".

License

MIT © 2026 RFS LLC — see LICENSE.

来源:README.md,提交 499687d

工具

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

版本历史

17
  1. v0.21.4最新Nov 1, 2026
  2. v0.21.3Oct 15, 2026
  3. v0.21.2Oct 15, 2026
  4. v0.21.0Oct 14, 2026
  5. v0.20.9Oct 5, 2026
  6. v0.20.8Oct 3, 2026
  7. v0.20.6Oct 3, 2026
  8. v0.20.5Oct 3, 2026
  9. v0.20.4Sep 30, 2026
  10. v0.20.3Sep 30, 2026
  11. v0.19.0Sep 29, 2026
  12. v0.18.5Sep 29, 2026
  13. v0.18.4Sep 26, 2026
  14. v0.18.3Sep 25, 2026
  15. v0.18.2Sep 25, 2026
  16. v0.17.1Sep 17, 2026
  17. v0.16.4Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

其他 Robosystems 集成