pequod-mcp
MCP server providing complete US ETF holdings from SEC EDGAR N-PORT filings and identifier crosswalk tools (ticker, CUSIP, FIGI) for AI agents.
README
pequod-mcp — "the Gam"
<!-- mcp-name: io.github.ABWerks/pequod-mcp -->
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
| Tool | What it does | Sources |
|---|---|---|
lookup_cik |
Ticker → SEC CIK + entity metadata (name, SIC, exchanges, fiscal year end) | SEC company_tickers.json + submissions API |
resolve_ticker |
Raw ticker + optional exchange code → Yahoo-convention symbol, verified | Exchange-suffix map (pure string mapping) + SEC + OpenFIGI |
resolve_cusip |
CUSIP (or SEDOL) → symbol, with cross-source verification | OpenFIGI (one batched request) + SEC name/ticker agreement |
resolve_figi |
Bloomberg FIGI → symbol, with cross-source verification | OpenFIGI + SEC name/ticker agreement |
get_etf_holdings |
Any 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:
- SEC registry check — if the mapped ticker is a US SEC registrant, the
entity title in
company_tickers.jsonmust agree with the OpenFIGI security name. A gross name mismatch vetoes the mapping (verification: "name_veto") rather than returning a plausible-looking wrong symbol. - 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
# with uv
uv pip install pequod-mcp
# or with pip
pip install pequod-mcp
Run it directly (stdio):
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:
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.
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:
{
"mcpServers": {
"pequod": {
"command": "pequod-mcp",
"env": {
"API_OpenFIGI": "your-key-here"
}
}
}
}
Claude Code:
claude mcp add pequod -e API_OpenFIGI=your-key-here -- pequod-mcp
Agent workflow examples
1. "What does SCHD actually hold?"
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?"
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."
Agent: get_etf_holdings("SCHD") → complete holdings A
Agent: get_etf_holdings("VYM") → complete holdings B
Agent: 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 withPEQUOD_CACHE_DIR) forcompany_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_dateandsource_urlfields 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
| Variable | Default | Purpose |
|---|---|---|
API_OpenFIGI |
(unset) | OpenFIGI API key (higher rate limits) |
PEQUOD_CACHE_DIR |
.cache/ next to the module |
On-disk cache location |
PEQUOD_YAHOO_VERIFY |
(off) | Opt-in Yahoo enrichment (needs the [yahoo] extra) |
LOG_LEVEL |
INFO |
Server log verbosity |
Development
pip install -e '.[dev]'
pytest # fully offline — fixture filings, no live network
License
Apache-2.0 — see LICENSE. Copyright 2026 AB Evergreen Analytics LLC.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。