Pequod Mcp

io.github.ABWerks由 GitHub 帳號 ABWerks 發布v0.2.2更新於 Oct 24, 2026

Complete US ETF holdings from SEC N-PORT filings + ticker/CUSIP/FIGI crosswalk. Primary source.

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

唯讀 MCP 伺服器,可從 SEC N-PORT 申報文件傳回美國 ETF 的完整持股,並將股票代號、CUSIP、SEDOL 和 FIGI 解析為符號。

可以做什麼
它提供五個唯讀工具:lookup_cik 將股票代號對應到 SEC CIK 與實體中介資料;resolve_ticker、resolve_cusip 和 resolve_figi 將原始識別碼轉換為經驗證的符號;get_etf_holdings 從最新的每月 N-PORT 申報文件傳回基金的完整持股清單,包含名稱、代號、ISIN、FIGI、LEI、股數、美元價值、占淨資產比例、國家與貨幣。交叉對應結果會與 SEC 註冊資料及 OpenFIGI 交互核對,名稱不符時會否決該對應,而不是傳回錯誤符號。持股資料來自 SEC EDGAR 一手來源,並附上申報文件連結以供引用。
適用情境
當助理需要完整的 ETF 投資組合組成而非前十大持股摘要時,或需要將申報文件中的 CUSIP、FIGI 等識別碼解析為可交易符號時,適合使用。它也適合比較基金之間的重疊持股,因為兩次持股呼叫可依 ISIN 或代號合併。
執行需求
本機 Python 環境,透過 pip 或 uv 安裝 pequod-mcp 套件,以 stdio 方式執行。需要連線至 SEC EDGAR 和 OpenFIGI 的網路存取。選用的 API_OpenFIGI 金鑰可提高 OpenFIGI 速率限制,無金鑰也可使用。其他選用設定包括 PEQUOD_CACHE_DIR、PEQUOD_YAHOO_VERIFY 和 LOG_LEVEL。
安裝前請注意
所有工具皆為唯讀,除選用的 API_OpenFIGI 金鑰外無需其他憑證。啟用 Yahoo 增強擴充會向 Yahoo 傳送請求,意味著需自行接受其使用條款。N-PORT 持股發布存在約一至兩個月的延遲,請查看 report_date。輸出不構成投資建議,應獨立核實。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Pequod Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

pequod-mcp — "the Gam"

SEC-primary-source ETF holdings + identifier crosswalk for agents.

An MCP (Model Context Protocol) server that gives AI agents the complete holdings of any US-registered ETF straight from SEC EDGAR N-PORT filings — not a top-10 scrape — plus a set of identifier-crosswalk tools (ticker, CUSIP/SEDOL, FIGI → resolved symbol) backed by OpenFIGI and SEC reference data. Runs locally over stdio; no vendor market-data subscriptions required.

Tools

ToolWhat it doesSources
lookup_cikTicker → SEC CIK + entity metadata (name, SIC, exchanges, fiscal year end)SEC company_tickers.json + submissions API
resolve_tickerRaw ticker + optional exchange code → Yahoo-convention symbol, verifiedExchange-suffix map (pure string mapping) + SEC + OpenFIGI
resolve_cusipCUSIP (or SEDOL) → symbol, with cross-source verificationOpenFIGI (one batched request) + SEC name/ticker agreement
resolve_figiBloomberg FIGI → symbol, with cross-source verificationOpenFIGI + SEC name/ticker agreement
get_etf_holdingsAny US ETF → complete holdings list from its latest monthly N-PORT filing (name, ticker, ISIN, FIGI, LEI, shares, USD value, % of net assets, country, currency)SEC EDGAR N-PORT XML

All tools are read-only.

How verification works

Crosswalk results are verified without any market-data vendor:

  1. SEC registry check — if the mapped ticker is a US SEC registrant, the entity title in company_tickers.json must agree with the OpenFIGI security name. A gross name mismatch vetoes the mapping (verification: "name_veto") rather than returning a plausible-looking wrong symbol.
  2. OpenFIGI mapping — non-US symbols (outside SEC's registry) verify on the OpenFIGI mapping itself, labeled verification: "openfigi" so you can tell the confidence tiers apart.

Yahoo Finance symbology (.SW, .T, .L, … suffixes) is applied as a pure string convention — the default path makes no network calls to Yahoo.

Install

bash
# with uvuv pip install pequod-mcp
# or with pippip install pequod-mcp

Run it directly (stdio):

bash
pequod-mcp

Optional: OpenFIGI API key

The server works without a key (OpenFIGI anonymous rate limits apply). For heavier use, get a free key at https://www.openfigi.com/api and set:

bash
export API_OpenFIGI="your-key-here"

Optional: Yahoo enrichment extra

An opt-in extra adds a live Yahoo quote block to crosswalk results. It is off by default and never used otherwise; enabling it means you accept the Yahoo Finance terms of use yourself.

bash
pip install 'pequod-mcp[yahoo]'export PEQUOD_YAHOO_VERIFY=1

Configure in Claude

Claude Desktop (claude_desktop_config.json) or any MCP client with a stdio transport:

json
{  "mcpServers": {    "pequod": {      "command": "pequod-mcp",      "env": {        "API_OpenFIGI": "your-key-here"      }    }  }}

Claude Code:

bash
claude mcp add pequod -e API_OpenFIGI=your-key-here -- pequod-mcp

Agent workflow examples

1. "What does SCHD actually hold?"

text
Agent: lookup_cik("SCHD")  → { cik: "0000884394", entity_name: "SCHWAB STRATEGIC TRUST", found: true }Agent: get_etf_holdings("SCHD", cik="0000884394")  → { fund_name, report_date, source_url (the actual EDGAR filing),      total_holdings: ~100, holdings: [ { name, ticker, isin, figi,      balance, value_usd, pct_val, ... } ] }

The agent gets every position with weights, plus the EDGAR URL for citation — auditable back to the primary source.

2. "I have a CUSIP from a 13F — what stock is this?"

text
Agent: resolve_cusip("594918104")  → { yahoo_symbol: "MSFT", verified: true, verification: "openfigi+sec",      company_name: "MICROSOFT CORP", cik: "0000789019",      openfigi: { figi: "BBG000BPH459", ... } }

If OpenFIGI's mapping disagrees with SEC's registry on who the ticker belongs to, the tool refuses (verification: "name_veto") instead of handing back a wrong symbol.

3. "Compare two dividend ETFs' overlap."

text
Agent: get_etf_holdings("SCHD")   → complete holdings AAgent: get_etf_holdings("VYM")    → complete holdings BAgent: joins on isin (or ticker), computes overlap weight, reports the       shared names — all from two tool calls, both citing SEC filings.

Data provenance

  • All holdings data comes from SEC EDGAR primary sources (Form N-PORT filings, the submissions API, and company_tickers.json). Identifier crosswalks come from the OpenFIGI API (FIGI is an open OMG standard).
  • No CUSIPs in output. Tool outputs carry ticker, ISIN, FIGI, and LEI; CUSIP fields present in the underlying filings are deliberately stripped.
  • SEC fair access respected: a declared User-Agent on every request, a throttle well under EDGAR's published rate limit, and an on-disk cache (.cache/ next to the module, override with PEQUOD_CACHE_DIR) for company_tickers.json (24 h) and N-PORT documents (30 days — filed documents are immutable).
  • Fail-loud policy: if EDGAR is unreachable or a filing cannot be parsed, tools return an error. There is no degraded or partial fallback source — you either get filing-backed data or a clear failure.
  • N-PORT filings are published on a lag (holdings are typically ~1–2 months behind). The report_date and source_url fields tell you exactly which period you are looking at.
  • Not investment advice. This server relays public regulatory filings and open identifier mappings; verify independently before making investment decisions.

Environment variables

VariableDefaultPurpose
API_OpenFIGI(unset)OpenFIGI API key (higher rate limits)
PEQUOD_CACHE_DIR.cache/ next to the moduleOn-disk cache location
PEQUOD_YAHOO_VERIFY(off)Opt-in Yahoo enrichment (needs the [yahoo] extra)
LOG_LEVELINFOServer log verbosity

Development

bash
pip install -e '.[dev]'pytest            # fully offline — fixture filings, no live network

License

Apache-2.0 — see LICENSE. Copyright 2026 AB Evergreen Analytics LLC.

來源:README.md,提交 4589604

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分