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 分